/* Generated by Cython 3.2.4 */ /* BEGIN: Cython Metadata { "distutils": { "extra_compile_args": [ "-Wno-unused-function" ], "name": "cassandra.cluster", "sources": [ "cassandra/cluster.py" ] }, "module_name": "cassandra.cluster" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ /* InitLimitedAPI */ #if defined(Py_LIMITED_API) #if !defined(CYTHON_LIMITED_API) #define CYTHON_LIMITED_API 1 #endif #elif defined(CYTHON_LIMITED_API) #ifdef _MSC_VER #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") #else #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. #endif #endif #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 < 0x03080000 #error Cython requires Python 3.8+. #else #define __PYX_ABI_VERSION "3_2_4" #define CYTHON_HEX_VERSION 0x030204F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !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 PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #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_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 1 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #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_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #ifndef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 1 #endif #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING 0 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) #endif #undef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND 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 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #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_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #undef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING 0 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #ifndef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #ifdef Py_GIL_DISABLED #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 #else #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #endif #if PY_VERSION_HEX < 0x030A0000 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #elif !defined(CYTHON_USE_TYPE_SLOTS) #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #elif !defined(CYTHON_USE_PYLIST_INTERNALS) #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 #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 #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #elif !defined(CYTHON_FAST_GIL) #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #ifndef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) #endif #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work #elif !defined(CYTHON_IMMORTAL_CONSTANTS) #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) #endif #endif #ifndef CYTHON_COMPRESS_STRINGS #define CYTHON_COMPRESS_STRINGS 1 #endif #ifndef CYTHON_FAST_PYCCALL #define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL #endif #ifndef CYTHON_VECTORCALL #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) #else #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) #endif #endif #if CYTHON_USE_PYLONG_INTERNALS #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(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #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_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #include typedef uintptr_t __pyx_uintptr_t; #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #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 Py_UNREACHABLE #define Py_UNREACHABLE() assert(0); abort() #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) /* CInitCode */ #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 /* PythonCompatibility */ #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API #ifndef CO_OPTIMIZED static int CO_OPTIMIZED; #endif #ifndef CO_NEWLOCALS static int CO_NEWLOCALS; #endif #ifndef CO_VARARGS static int CO_VARARGS; #endif #ifndef CO_VARKEYWORDS static int CO_VARKEYWORDS; #endif #ifndef CO_ASYNC_GENERATOR static int CO_ASYNC_GENERATOR; #endif #ifndef CO_GENERATOR static int CO_GENERATOR; #endif #ifndef CO_COROUTINE static int CO_COROUTINE; #endif #else #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #endif static int __Pyx_init_co_variables(void); #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #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 Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef Py_TPFLAGS_IMMUTABLETYPE #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) #endif #ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #ifndef 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 #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_VERSION_HEX >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #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_LIMITED_API #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) #elif CYTHON_COMPILING_IN_GRAAL #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #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_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #else #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #endif #if CYTHON_USE_MODULE_STATE static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) #else #define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) #define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) #define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) #define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) #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 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #endif #define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) #if CYTHON_USE_TYPE_SPECS #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #else #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #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) ((int)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, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #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 #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #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 CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif enum __Pyx_ReferenceSharing { __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check __Pyx_ReferenceSharing_OwnStrongReference, __Pyx_ReferenceSharing_FunctionArgument, __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar }; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) #elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) #else #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) #endif #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) #else #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) #endif #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) #else #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) #endif #else #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) #endif #if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) #else #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { *result = PyObject_GetItem(dict, key); if (*result == NULL) { if (PyErr_ExceptionMatches(PyExc_KeyError)) { PyErr_Clear(); return 0; } return -1; } return 1; } #else static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { *result = PyDict_GetItemWithError(dict, key); if (*result == NULL) { return PyErr_Occurred() ? -1 : 0; } Py_INCREF(*result); return 1; } #endif #if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) #else #define __Pyx_VISIT_CONST(obj) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) #endif #if CYTHON_ASSUME_SAFE_SIZE #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) #else #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t #define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t #if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 #define __Pyx_PySendResult PySendResult #else typedef enum { PYGEN_RETURN = 0, PYGEN_ERROR = -1, PYGEN_NEXT = 1, } __Pyx_PySendResult; #endif #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); #else #define __Pyx_pyiter_sendfunc sendfunc #endif #if !CYTHON_USE_AM_SEND #define __PYX_HAS_PY_AM_SEND 0 #elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 #define __PYX_HAS_PY_AM_SEND 1 #else #define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation #endif #if __PYX_HAS_PY_AM_SEND < 2 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #else typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; __Pyx_pyiter_sendfunc am_send; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) #endif #if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) #else #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) #endif #if PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() #else #define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp #endif #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 #ifdef __cplusplus extern "C" #endif PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); #endif #if CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { int value; PyObject *py_value = PyObject_GetAttrString(inspect, name); if (!py_value) return 0; value = (int) PyLong_AsLong(py_value); Py_DECREF(py_value); *write_to = value; return value != -1 || !PyErr_Occurred(); } static int __Pyx_init_co_variables(void) { PyObject *inspect; int result; inspect = PyImport_ImportModule("inspect"); result = #if !defined(CO_OPTIMIZED) __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && #endif #if !defined(CO_NEWLOCALS) __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && #endif #if !defined(CO_VARARGS) __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && #endif #if !defined(CO_VARKEYWORDS) __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && #endif #if !defined(CO_ASYNC_GENERATOR) __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && #endif #if !defined(CO_GENERATOR) __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && #endif #if !defined(CO_COROUTINE) __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && #endif 1; Py_DECREF(inspect); return result ? 0 : -1; } #else static int __Pyx_init_co_variables(void) { return 0; // It's a limited API-only feature } #endif /* MathInitCode */ #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES #endif #endif #include #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME #define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 #endif #ifndef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME #endif #if CYTHON_CLINE_IN_TRACEBACK #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } #else #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__cassandra__cluster #define __PYX_HAVE_API__cassandra__cluster /* Early includes */ #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif #ifdef CYTHON_FREETHREADING_COMPATIBLE #if CYTHON_FREETHREADING_COMPATIBLE #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_NOT_USED #else #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED #endif #else #define __Pyx_FREETHREADING_COMPATIBLE Py_MOD_GIL_USED #endif #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #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 #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 Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #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 CYTHON_ASSUME_SAFE_MACROS #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_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) #else #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) #endif #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __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_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) return Py_NewRef(obj); #else Py_INCREF(obj); return obj; #endif } static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) return Py_XNewRef(obj); #else Py_XINCREF(obj); return obj; #endif } static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); 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_Long(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_PyLong_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) #else #define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) #endif #define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #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__ */ /* PretendToInitialize */ #ifdef __cplusplus #if __cplusplus > 201103L #include #endif template static void __Pyx_pretend_to_initialize(T* ptr) { #if __cplusplus > 201103L if ((std::is_trivially_default_constructible::value)) #endif *ptr = T(); (void)ptr; } #else static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #endif #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * const __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char* const __pyx_f[] = { "cassandra/cluster.py", }; /* #### Code section: utility_code_proto_before_types ### */ /* Atomics.proto (used by UnpackUnboundCMethod) */ #include #ifndef CYTHON_ATOMICS #define CYTHON_ATOMICS 1 #endif #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS #define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __pyx_atomic_int_type int #define __pyx_nonatomic_int_type int #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__)) #include #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ (defined(_MSC_VER) && _MSC_VER >= 1700))) #include #endif #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type atomic_int #define __pyx_atomic_ptr_type atomic_uintptr_t #define __pyx_nonatomic_ptr_type uintptr_t #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) #define __pyx_atomic_load(value) atomic_load(value) #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C atomics" #endif #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ \ (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type std::atomic_int #define __pyx_atomic_ptr_type std::atomic_uintptr_t #define __pyx_nonatomic_ptr_type uintptr_t #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) #define __pyx_atomic_load(value) std::atomic_load(value) #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C++ atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C++ atomics" #endif #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ (__GNUC_MINOR__ > 1 ||\ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) #define __pyx_atomic_ptr_type void* #define __pyx_nonatomic_ptr_type void* #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); int result = old == *expected; *expected = old; return result; } #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); int result = old == *expected; *expected = old; return result; } #ifdef __PYX_DEBUG_ATOMICS #warning "Using GNU atomics" #endif #elif CYTHON_ATOMICS && defined(_MSC_VER) #include #undef __pyx_atomic_int_type #define __pyx_atomic_int_type long #define __pyx_atomic_ptr_type void* #undef __pyx_nonatomic_int_type #define __pyx_nonatomic_int_type long #define __pyx_nonatomic_ptr_type void* #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); int result = old == *expected; *expected = old; return result; } #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); int result = old == *expected; *expected = old; return result; } #ifdef __PYX_DEBUG_ATOMICS #pragma message ("Using MSVC atomics") #endif #else #undef CYTHON_ATOMICS #define CYTHON_ATOMICS 0 #ifdef __PYX_DEBUG_ATOMICS #warning "Not using atomics" #endif #endif /* CriticalSectionsDefinition.proto (used by CriticalSections) */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection void* #define __Pyx_PyCriticalSection2 void* #define __Pyx_PyCriticalSection_End(cs) #define __Pyx_PyCriticalSection2_End(cs) #else #define __Pyx_PyCriticalSection PyCriticalSection #define __Pyx_PyCriticalSection2 PyCriticalSection2 #define __Pyx_PyCriticalSection_End PyCriticalSection_End #define __Pyx_PyCriticalSection2_End PyCriticalSection2_End #endif /* CriticalSections.proto (used by ParseKeywordsImpl) */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) #define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) #else #define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin #define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin #endif #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_BEGIN_CRITICAL_SECTION(o) { #define __Pyx_END_CRITICAL_SECTION() } #else #define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION #endif /* IncludeStructmemberH.proto (used by FixUpExtensionType) */ #include /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_defaults; struct __pyx_defaults1; struct __pyx_defaults2; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr; /* "cassandra/cluster.py":297 * """ * * def __init__(self, page_unit=PagingUnit.ROWS, max_pages=0, max_pages_per_second=0, max_queue_size=4): # <<<<<<<<<<<<<< * self.page_unit = page_unit * self.max_pages = max_pages */ struct __pyx_defaults { PyObject_HEAD PyObject *arg0; }; /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ struct __pyx_defaults1 { PyObject_HEAD PyObject *arg0; PyObject *arg1; PyObject *arg2; }; /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ struct __pyx_defaults2 { PyObject_HEAD PyObject *arg0; PyObject *arg1; }; /* "cassandra/cluster.py":223 * * * def run_in_executor(f): # <<<<<<<<<<<<<< * """ * A decorator to run the given method in the ThreadPoolExecutor. */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor { PyObject_HEAD PyObject *__pyx_v_f; }; /* "cassandra/cluster.py":511 * * def _profiles_without_explicit_lbps(self): * names = (profile_name for # <<<<<<<<<<<<<< * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_profile; PyObject *__pyx_v_profile_name; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; int __pyx_t_3; }; /* "cassandra/cluster.py":515 * if not profile._load_balancing_policy_explicit) * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n # <<<<<<<<<<<<<< * for n in names * ) */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_n; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "cassandra/cluster.py":519 * ) * * def distance(self, host): # <<<<<<<<<<<<<< * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance { PyObject_HEAD PyObject *__pyx_v_host; }; /* "cassandra/cluster.py":520 * * def distance(self, host): * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) # <<<<<<<<<<<<<< * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ * HostDistance.REMOTE if HostDistance.REMOTE in distances else \ */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr { PyObject_HEAD struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_p; }; /* "cassandra/cluster.py":2013 * self._start_reconnector(host, is_host_addition) * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add { PyObject_HEAD PyObject *__pyx_v_futures; PyObject *__pyx_v_futures_lock; PyObject *__pyx_v_futures_results; PyObject *__pyx_v_host; PyObject *__pyx_v_self; }; /* "cassandra/cluster.py":2163 * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: # <<<<<<<<<<<<<< * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_e; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; }; /* "cassandra/cluster.py":2597 * * futures = wait_futures(self._initial_connect_futures, return_when=FIRST_COMPLETED) * while futures.not_done and not any(f.result() for f in futures.done): # <<<<<<<<<<<<<< * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_f; }; /* "cassandra/cluster.py":2600 * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * * if not any(f.result() for f in self._initial_connect_futures): # <<<<<<<<<<<<<< * msg = "Unable to connect to any servers" * if self.keyspace: */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_f; }; /* "cassandra/cluster.py":3316 * pass * * def add_or_renew_pool(self, host, is_host_addition): # <<<<<<<<<<<<<< * """ * For internal use only. */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool { PyObject_HEAD PyObject *__pyx_v_distance; PyObject *__pyx_v_host; PyObject *__pyx_v_is_host_addition; PyObject *__pyx_v_self; }; /* "cassandra/cluster.py":3324 * return None * * def run_add_or_renew_pool(): # <<<<<<<<<<<<<< * try: * if self._protocol_version >= 3: */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool { PyObject_HEAD struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *__pyx_outer_scope; PyObject *__pyx_v_errors_returned; PyObject *__pyx_v_set_keyspace_event; }; /* "cassandra/cluster.py":3415 * return futures * * def on_down(self, host): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when a node is marked down. */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down { PyObject_HEAD PyObject *__pyx_v_self; }; /* "cassandra/cluster.py":3435 * self.execute('USE %s' % (protect_name(keyspace),)) * * def _set_keyspace_for_all_pools(self, keyspace, callback): # <<<<<<<<<<<<<< * """ * Asynchronously sets the keyspace on all pools. When all */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools { PyObject_HEAD PyObject *__pyx_v_callback; PyObject *__pyx_v_errors; PyObject *__pyx_v_remaining_callbacks; }; /* "cassandra/cluster.py":3462 * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * * def user_type_registered(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when the user registers a new */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered { PyObject_HEAD PyObject *__pyx_v_field_names; PyObject *__pyx_v_self; }; /* "cassandra/cluster.py":3482 * field_names = type_meta.field_names * * def encode(val): # <<<<<<<<<<<<<< * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode { PyObject_HEAD struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *__pyx_outer_scope; PyObject *__pyx_v_val; }; /* "cassandra/cluster.py":3483 * * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( # <<<<<<<<<<<<<< * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr { PyObject_HEAD struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_field_name; }; /* "cassandra/cluster.py":3496 * * def get_pool_state(self): * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) # <<<<<<<<<<<<<< * * def get_pools(self): */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_host; PyObject *__pyx_v_pool; }; /* "cassandra/cluster.py":4159 * return None * * return dict((version, list(nodes)) for version, nodes in versions.items()) # <<<<<<<<<<<<<< * * def _get_peers_query(self, peers_query_type, connection=None): */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr { PyObject_HEAD PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_nodes; PyObject *__pyx_v_version; }; /* "cassandra/cluster.py":4929 * "statement on host %s: %s" % (host, response))) * * def _set_final_result(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result { PyObject_HEAD PyObject *__pyx_v_response; }; /* "cassandra/cluster.py":4941 * # registered callback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._callbacks * ) */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr { PyObject_HEAD struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_args; PyObject *__pyx_v_fn; PyObject *__pyx_v_kwargs; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "cassandra/cluster.py":4951 * callback_partial() * * def _set_final_exception(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception { PyObject_HEAD PyObject *__pyx_v_response; }; /* "cassandra/cluster.py":4963 * # registered errback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._errbacks * ) */ struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr { PyObject_HEAD struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_args; PyObject *__pyx_v_fn; PyObject *__pyx_v_kwargs; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, 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; #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__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #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); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #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_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #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) /* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ #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 /* PyThreadStateGet.proto (used by PyErrFetchRestore) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ #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 && PY_VERSION_HEX < 0x030C00A6 #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 /* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ #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 /* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto (used by fastcall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); #endif #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto (used by BytesEquals) */ #include /* BytesEquals.proto (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto (used by fastcall) */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) #else #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #else #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #endif #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) #else #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* PyDictVersioning.proto (used by GetModuleGlobalName) */ #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_XNewRef(__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) do {\ 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_mstate_global->__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);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) 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 /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* HasAttr.proto (used by ImportImpl) */ #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) #else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); #endif /* PyObjectCall.proto (used by PyObjectFastCall) */ #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 /* PyObjectCallMethO.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); /* PyObjectCallOneArg.proto (used by ImportImpl) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* ImportImpl.export */ static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); /* Import.proto */ static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* PyObjectFastCallMethod.proto */ #if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) #else static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); #endif /* GetTopmostException.proto (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE 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 /* PyAttributeError_Check.proto */ #define __Pyx_PyExc_AttributeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AttributeError) /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, 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_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); } #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) #ifdef PyExceptionInstance_Check #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) #else #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) #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 /* 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 /* py_dict_items.proto (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /* CallCFunction.proto (used by CallUnboundCMethod0) */ #define __Pyx_CallCFunction(cfunc, self, args)\ ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) #define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) /* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ typedef struct { PyObject *type; PyObject **method_name; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS __pyx_atomic_int_type initialized; #endif PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { #if !CYTHON_ATOMICS return 1; #else __pyx_nonatomic_int_type expected = 0; if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { return 0; } return expected; #endif } static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { #if CYTHON_ATOMICS __pyx_atomic_store(&cfunc->initialized, 2); #endif } #else #define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 #define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) #endif /* CallUnboundCMethod0.proto */ CYTHON_UNUSED static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #else #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif /* py_dict_values.proto (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /* OwnedDictNext.proto (used by ParseKeywordsImpl) */ #if CYTHON_AVOID_BORROWED_REFS static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); #else CYTHON_INLINE static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); #endif /* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywordsImpl.export */ static int __Pyx_ParseKeywordsTuple( PyObject *kwds, PyObject * const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs ); static int __Pyx_ParseKeywordDictToDict( PyObject *kwds, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name ); static int __Pyx_ParseKeywordDict( PyObject *kwds, PyObject ** const argnames[], PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs ); /* CallUnboundCMethod2.proto */ CYTHON_UNUSED static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON 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 /* ParseKeywords.proto */ static CYTHON_INLINE int __Pyx_ParseKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs ); /* 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); /* 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); /* ListAppend.proto (used by append) */ #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); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectCall2Args.proto (used by PyObjectCallMethod1) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectGetMethod.proto (used by PyObjectCallMethod1) */ #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); #endif /* PyObjectCallMethod1.proto (used by append) */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /* PyObjectDelAttr.proto (used by PyObjectSetAttrStr) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 #define __Pyx_PyObject_DelAttr(o, n) PyObject_SetAttr(o, n, NULL) #else #define __Pyx_PyObject_DelAttr(o, n) PyObject_DelAttr(o, n) #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) __Pyx_PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif /* PyObjectVectorCallKwBuilder.proto */ CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); #if CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03090000 #define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall #else #define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall #endif #define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); #else #define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict #define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) #define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) #define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) #endif /* RaiseClosureNameError.proto */ static void __Pyx_RaiseClosureNameError(const char *varname); /* dict_setdefault.proto (used by FetchCommonType) */ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); /* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); #endif /* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) /* FixUpExtensionType.proto (used by FetchCommonType) */ static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); /* AddModuleRef.proto (used by FetchSharedCythonModule) */ #if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ __PYX_LIMITED_VERSION_HEX < 0x030d0000) static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); #else #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #endif /* FetchSharedCythonModule.proto (used by FetchCommonType) */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto (used by CommonTypesMetaclass) */ static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); /* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ static int __pyx_CommonTypesMetaclass_init(PyObject *module); #define __Pyx_CommonTypesMetaclass_USED /* CallTypeTraverse.proto (used by CythonFunctionShared) */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 #else static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); #endif /* PyMethodNew.proto (used by CythonFunctionShared) */ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); /* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto (used by CythonFunction) */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (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 { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL __pyx_vectorcallfunc func_vectorcall; #endif #if CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_dict; #endif PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif PyObject *defaults; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type); 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(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* PyValueError_Check.proto */ #define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) /* RaiseException.export */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* 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 !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 /* PyObjectFormatAndDecref.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); /* JoinPyUnicode.export */ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); /* PyObjectVectorCallMethodKwBuilder.proto */ #if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 #define __Pyx_Object_VectorcallMethod_CallFromBuilder PyObject_VectorcallMethod #else static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames); #endif /* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectCallMethod0.proto (used by dict_iter) */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* RaiseNoneIterError.proto (used by UnpackTupleError) */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* UnpackTupleError.proto (used by UnpackTuple2) */ static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /* UnpackTuple2.proto (used by dict_iter) */ static CYTHON_INLINE int __Pyx_unpack_tuple2( PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple); static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); static int __Pyx_unpack_tuple2_generic( PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); /* dict_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_is_dict); static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); /* RaiseUnboundLocalError.proto */ static void __Pyx_RaiseUnboundLocalError(const char *varname); /* pep479.proto */ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); /* pyfrozenset_new.proto (used by PySetContains) */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); /* PySetContains.proto */ static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ (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, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (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, int unsafe_shared); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (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, int unsafe_shared); 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, int unsafe_shared); /* ObjectGetItem.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key); #else #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif /* PyTypeError_Check.proto */ #define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) /* CallableCheck.proto */ #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyCallable_Check(obj) (Py_TYPE(obj)->tp_call != NULL) #else #define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) #endif /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* PyDeprecationWarning_Check.proto */ #define __Pyx_PyExc_DeprecationWarning_Check(obj) __Pyx_TypeCheck(obj, PyExc_DeprecationWarning) /* PyImportError_Check.proto */ #define __Pyx_PyExc_ImportError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ImportError) /* CallUnboundCMethod1.proto */ CYTHON_UNUSED 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 /* PyObjectLookupSpecial.proto */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); #else #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* ListExtend.proto */ static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00a2 return PyList_Extend(L, v); #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 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 } /* set_iter.proto */ static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, Py_ssize_t* p_orig_length, int* p_source_is_set); static CYTHON_INLINE int __Pyx_set_iter_next( PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject **value, int source_is_set); /* py_set_discard.proto */ static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key); /* PyRange_Check.proto */ #if CYTHON_COMPILING_IN_PYPY && !defined(PyRange_Check) #define PyRange_Check(obj) __Pyx_TypeCheck((obj), &PyRange_Type) #endif /* PyLongBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #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 /* SliceObject.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); /* UnicodeConcatInPlace.proto */ # if CYTHON_COMPILING_IN_CPYTHON #if CYTHON_REFNANNY #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared, __pyx_refnanny) #else #define __Pyx_PyUnicode_ConcatInPlace(left, right, unsafe_shared) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, unsafe_shared) #endif #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique) #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_OwnStrongReference) #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_DefinitelyUnique) #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right) __Pyx_PyUnicode_ConcatInPlace(left, right, __Pyx_ReferenceSharing_SharedReference) static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared #if CYTHON_REFNANNY , void* __pyx_refnanny #endif ); #else #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace __Pyx_PyUnicode_Concat #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace __Pyx_PyUnicode_Concat #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace __Pyx_PyUnicode_Concat #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace __Pyx_PyUnicode_Concat #endif #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlaceSafe(left, right)\ ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_DefinitelyUniqueInPlace(left, right)) #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlaceSafe(left, right)\ ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(left, right)) #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlaceSafe(left, right)\ ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_FunctionArgumentInPlace(left, right)) #define __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlaceSafe(left, right)\ ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_SharedReferenceInPlace(left, right)) /* PyObject_Unicode.proto */ #define __Pyx_PyObject_Unicode(obj)\ (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) /* PyLongBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) #endif /* PyLongCompare.proto */ static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* PyKeyError_Check.proto */ #define __Pyx_PyExc_KeyError_Check(obj) __Pyx_TypeCheck(obj, PyExc_KeyError) /* py_set_remove.proto */ static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key); /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* GetAttr.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /* PyReferenceError_Check.proto */ #define __Pyx_PyExc_ReferenceError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ReferenceError) /* MergeKeywords.proto */ static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); /* PyFloatBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); #else #define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* IterNextPlain.proto (used by IterNext) */ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator); #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void); #endif /* IterNext.proto */ #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /* AssertionsEnabled.proto */ #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 static int __pyx_assertions_enabled_flag; #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) #if __clang__ || __GNUC__ __attribute__((no_sanitize("thread"))) #endif static int __Pyx_init_assertions_enabled(void) { PyObject *builtins, *debug, *debug_str; int flag; builtins = PyEval_GetBuiltins(); if (!builtins) goto bad; debug_str = PyUnicode_FromStringAndSize("__debug__", 9); if (!debug_str) goto bad; debug = PyObject_GetItem(builtins, debug_str); Py_DECREF(debug_str); if (!debug) goto bad; flag = PyObject_IsTrue(debug); Py_DECREF(debug); if (flag == -1) goto bad; __pyx_assertions_enabled_flag = flag; return 0; bad: __pyx_assertions_enabled_flag = 1; return -1; } #else #define __Pyx_init_assertions_enabled() (0) #define __pyx_assertions_enabled() (!Py_OptimizeFlag) #endif /* PyAssertionError_Check.proto */ #define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) /* PyStopIteration_Check.proto */ #define __Pyx_PyExc_StopIteration_Check(obj) __Pyx_TypeCheck(obj, PyExc_StopIteration) /* PyRuntimeError_Check.proto */ #define __Pyx_PyExc_RuntimeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_RuntimeError) /* AllocateExtensionType.proto */ static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); /* CheckTypeForFreelists.proto */ #if CYTHON_USE_FREELISTS #if CYTHON_USE_TYPE_SPECS #define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) #define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT #else #define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) #define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) #endif #define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) #endif /* ValidateBasesTuple.proto (used by PyType_Ready) */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* Py3UpdateBases.proto */ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); /* CalculateMetaclass.proto */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* ListPack.proto */ static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...); /* ClassMethod.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API #include "descrobject.h" #endif CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* CLineInTraceback.proto (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #else #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #endif /* CodeObjectCache.proto (used by AddTraceback) */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject __Pyx_CachedCodeObjectType; #else typedef PyCodeObject __Pyx_CachedCodeObjectType; #endif typedef struct { __Pyx_CachedCodeObjectType* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_atomic_int_type accessor_count; #endif }; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* GCCDiagnostics.proto */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName #else static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); #endif #else // !LIMITED_API typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); /* GetRuntimeVersion.proto */ #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 static unsigned long __Pyx_cached_runtime_version = 0; static void __Pyx_init_runtime_version(void); #else #define __Pyx_init_runtime_version() #endif static unsigned long __Pyx_get_runtime_version(void); /* ReturnWithStopIteration.proto (used by CoroutineBase) */ static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext); /* CoroutineBase.proto (used by Generator) */ struct __pyx_CoroutineObject; typedef PyObject *(*__pyx_coroutine_body_t)(struct __pyx_CoroutineObject *, PyThreadState *, PyObject *); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_ExcInfoStruct _PyErr_StackItem #else typedef struct { PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; } __Pyx_ExcInfoStruct; #endif typedef struct __pyx_CoroutineObject { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; __Pyx_ExcInfoStruct gi_exc_state; #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API PyObject *gi_weakreflist; #endif PyObject *classobj; PyObject *yieldfrom; __Pyx_pyiter_sendfunc yieldfrom_am_send; PyObject *gi_name; PyObject *gi_qualname; PyObject *gi_modulename; PyObject *gi_code; PyObject *gi_frame; #if CYTHON_USE_SYS_MONITORING && (CYTHON_PROFILE || CYTHON_TRACE) PyMonitoringState __pyx_pymonitoring_state[__Pyx_MonitoringEventTypes_CyGen_count]; uint64_t __pyx_pymonitoring_version; #endif int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name); static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); static int __Pyx_Coroutine_clear(PyObject *self); static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval); static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #if CYTHON_USE_EXC_INFO_STACK #define __Pyx_Coroutine_SwapException(self) #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) #else #define __Pyx_Coroutine_SwapException(self) {\ __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\ __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\ } #define __Pyx_Coroutine_ResetAndClearException(self) {\ __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\ (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\ } #endif #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue) #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) #endif static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen); static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen); static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen); static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure); #if __PYX_HAS_PY_AM_SEND == 2 static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send); #endif static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg); /* Generator.proto */ #define __Pyx_Generator_USED #define __Pyx_Generator_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_GeneratorType) #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\ __Pyx__Coroutine_New(__pyx_mstate_global->__pyx_GeneratorType, body, code, closure, name, qualname, module_name) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(PyObject *module); static CYTHON_INLINE PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* DecompressString.proto */ static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); /* MultiPhaseInitModuleState.proto */ #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE static PyObject *__Pyx_State_FindModule(void*); static int __Pyx_State_AddModule(PyObject* module, void*); static int __Pyx_State_RemoveModule(void*); #elif CYTHON_USE_MODULE_STATE #define __Pyx_State_FindModule PyState_FindModule #define __Pyx_State_AddModule PyState_AddModule #define __Pyx_State_RemoveModule PyState_RemoveModule #endif /* #### Code section: module_declarations ### */ /* CythonABIVersion.proto */ #if CYTHON_COMPILING_IN_LIMITED_API #if CYTHON_METH_FASTCALL #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" #else #define __PYX_FASTCALL_ABI_SUFFIX #endif #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX #else #define __PYX_LIMITED_ABI_SUFFIX #endif #if __PYX_HAS_PY_AM_SEND == 1 #define __PYX_AM_SEND_ABI_SUFFIX #elif __PYX_HAS_PY_AM_SEND == 2 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" #else #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" #endif #ifndef __PYX_MONITORING_ABI_SUFFIX #define __PYX_MONITORING_ABI_SUFFIX #endif #if CYTHON_USE_TP_FINALIZE #define __PYX_TP_FINALIZE_ABI_SUFFIX #else #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" #endif #if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) #define __PYX_FREELISTS_ABI_SUFFIX #else #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" #endif #define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." /* Module declarations from "cassandra.cluster" */ /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "cassandra.cluster" extern int __pyx_module_is_main_cassandra__cluster; int __pyx_module_is_main_cassandra__cluster = 0; /* Implementation of "cassandra.cluster" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_staticmethod; static PyObject *__pyx_builtin_property; static PyObject *__pyx_builtin_super; static PyObject *__pyx_builtin_filter; static PyObject *__pyx_builtin_all; static PyObject *__pyx_builtin_any; static PyObject *__pyx_builtin_sum; /* #### Code section: string_decls ### */ static const char __pyx_k_This_module_houses_the_main_cla[] = "\nThis module houses the main classes you will interact with,\n:class:`.Cluster` and :class:`.Session`.\n"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_9cassandra_7cluster__is_gevent_monkey_patched(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_2_try_gevent_import(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_4_is_eventlet_monkey_patched(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_6_try_eventlet_import(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_8_try_libev_import(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_try_asyncore_import(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_12_connection_reduce_fn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_import_fn); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_15NoHostAvailable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errors); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14_future_completed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_15run_in_executor_new_f(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_16run_in_executor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_18_register_cluster_shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cluster); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_20_discard_cluster_shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cluster); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_22_shutdown_clusters(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_24default_lbp_factory(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_38__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_23ContinuousPagingOptions___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_page_unit, PyObject *__pyx_v_max_pages, PyObject *__pyx_v_max_pages_per_second, PyObject *__pyx_v_max_queue_size); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_23ContinuousPagingOptions_2page_unit_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_26_addrinfo_or_none(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_contact_point, PyObject *__pyx_v_port); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_28_execution_profile_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_40__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_16ExecutionProfile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_serial_consistency_level, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_speculative_execution_policy, PyObject *__pyx_v_continuous_paging_options); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_42__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_21GraphExecutionProfile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_serial_consistency_level, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_graph_options, PyObject *__pyx_v_continuous_paging_options); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_44__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_30GraphAnalyticsExecutionProfile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_serial_consistency_level, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_graph_options); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_2_profiles_without_explicit_lbps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_8distance_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_4distance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_6populate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_hosts); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_8check_supported(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_10on_up(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_12on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_14on_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_16on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_18default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_auth_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_2auth_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_4load_balancing_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_6load_balancing_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lbp); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_8_default_load_balancing_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_10default_retry_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_12default_retry_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_policy); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_14schema_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_16schema_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_18token_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_20token_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_46__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_22__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_contact_points, PyObject *__pyx_v_port, PyObject *__pyx_v_compression, PyObject *__pyx_v_auth_provider, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_reconnection_policy, PyObject *__pyx_v_default_retry_policy, PyObject *__pyx_v_conviction_policy_factory, PyObject *__pyx_v_metrics_enabled, PyObject *__pyx_v_connection_class, PyObject *__pyx_v_ssl_options, PyObject *__pyx_v_sockopts, PyObject *__pyx_v_cql_version, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_executor_threads, PyObject *__pyx_v_max_schema_agreement_wait, PyObject *__pyx_v_control_connection_timeout, PyObject *__pyx_v_idle_heartbeat_interval, PyObject *__pyx_v_schema_event_refresh_window, PyObject *__pyx_v_topology_event_refresh_window, PyObject *__pyx_v_connect_timeout, PyObject *__pyx_v_schema_metadata_enabled, PyObject *__pyx_v_token_metadata_enabled, PyObject *__pyx_v_address_translator, PyObject *__pyx_v_status_event_refresh_window, PyObject *__pyx_v_prepare_on_all_hosts, PyObject *__pyx_v_reprepare_on_up, PyObject *__pyx_v_execution_profiles, PyObject *__pyx_v_allow_beta_protocol_version, PyObject *__pyx_v_timestamp_generator, PyObject *__pyx_v_idle_heartbeat_timeout, PyObject *__pyx_v_no_compact, PyObject *__pyx_v_ssl_context, PyObject *__pyx_v_endpoint_factory, PyObject *__pyx_v_application_name, PyObject *__pyx_v_application_version, PyObject *__pyx_v_monitor_reporting_enabled, PyObject *__pyx_v_monitor_reporting_interval, PyObject *__pyx_v_client_id, PyObject *__pyx_v_cloud, PyObject *__pyx_v_column_encryption_policy); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_24_create_thread_pool_executor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_26register_user_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_user_type, PyObject *__pyx_v_klass); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_h); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_28add_execution_profile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_profile, PyObject *__pyx_v_pool_wait_timeout); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_30get_min_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_32set_min_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_min_requests); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_34get_max_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_36set_max_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_max_requests); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_38get_core_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_40set_core_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_core_connections); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_42get_max_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_44set_max_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_max_connections); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_46connection_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_endpoint, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_48_make_connection_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_50_make_connection_kwargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_endpoint, PyObject *__pyx_v_kwargs_dict); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_52protocol_downgrade(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_endpoint, PyObject *__pyx_v_previous_version); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_54connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_wait_for_all_pools); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_56_set_default_dbaas_consistency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_session); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_58get_connection_holders(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_60shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_62__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_64__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_66_new_session(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_68_session_register_user_types(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_session); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_70_cleanup_failed_on_up_handling(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_72_on_up_future_completed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_futures, PyObject *__pyx_v_results, PyObject *__pyx_v_lock, PyObject *__pyx_v_finished_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_74on_up(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_76_start_reconnector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_is_host_addition); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_78on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_is_host_addition, PyObject *__pyx_v_expect_host_to_be_down); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_6on_add_future_completed(PyObject *__pyx_self, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_80on_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_refresh_nodes); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_82_finalize_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_set_up); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_84on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_86signal_connection_failure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_connection_exc, PyObject *__pyx_v_is_host_addition, PyObject *__pyx_v_expect_host_to_be_down); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_88add_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_endpoint, PyObject *__pyx_v_datacenter, PyObject *__pyx_v_rack, PyObject *__pyx_v_signal, PyObject *__pyx_v_refresh_nodes); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_90remove_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_92register_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_listener); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_94unregister_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_listener); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_96listeners(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_98_ensure_core_connections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_100_validate_refresh_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_table, PyObject *__pyx_v_usertype, PyObject *__pyx_v_function, PyObject *__pyx_v_aggregate); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_102_target_type_from_refresh_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_table, PyObject *__pyx_v_usertype, PyObject *__pyx_v_function, PyObject *__pyx_v_aggregate); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_104get_control_connection_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_106refresh_schema_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_108refresh_keyspace_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_110refresh_table_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_table, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_112refresh_materialized_view_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_view, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_114refresh_user_type_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_user_type, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_116refresh_user_function_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_function, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_118refresh_user_aggregate_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_aggregate, PyObject *__pyx_v_max_schema_agreement_wait); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_120refresh_nodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_force_token_rebuild); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_122set_meta_refresh_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_enabled); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_124_send_chunks(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_connection, PyObject *__pyx_v_host, PyObject *__pyx_v_chunks, PyObject *__pyx_v_set_keyspace); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_126_prepare_all_queries(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_128add_prepared(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query_id, PyObject *__pyx_v_prepared_statement); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_row_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_2row_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rf); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_4default_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_6default_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_timeout); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_8default_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_10default_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cl); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_12default_serial_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_14default_serial_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cl); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_8__init___3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_16__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_hosts, PyObject *__pyx_v_keyspace); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_48__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_18execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_timeout, PyObject *__pyx_v_trace, PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_paging_state, PyObject *__pyx_v_host, PyObject *__pyx_v_execute_as); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_50__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_20execute_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_timeout, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_paging_state, PyObject *__pyx_v_host, PyObject *__pyx_v_execute_as); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_22execute_concurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_statements_and_parameters, PyObject *__pyx_v_concurrency, PyObject *__pyx_v_raise_on_first_error, PyObject *__pyx_v_results_generator, PyObject *__pyx_v_execution_profile); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_24execute_concurrent_with_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_statement, PyObject *__pyx_v_parameters, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_54__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_26execute_concurrent_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_statements_and_parameters, PyObject *__pyx_v_concurrency, PyObject *__pyx_v_raise_on_first_error, PyObject *__pyx_v_execution_profile); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_56__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_28execute_graph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_execute_as); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_58__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_30execute_graph_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_execute_as); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_32_maybe_set_graph_paging(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_execution_profile); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_34_check_graph_paging_available(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_36_resolve_execution_profile_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_execution_profile); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_38_transform_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parameters, PyObject *__pyx_v_graph_options); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_40_target_analytics_master(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_42_on_analytics_master_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_response, PyObject *__pyx_v_master_future, PyObject *__pyx_v_query_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_60__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_44_create_response_future(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_timeout, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_paging_state, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_46get_execution_profile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_48_maybe_get_execution_profile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ep); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_50execution_profile_clone_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ep, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_52add_request_init_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_54remove_request_init_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_56_on_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_58prepare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, CYTHON_UNUSED PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_keyspace); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_60prepare_on_all_hosts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_excluded_host, PyObject *__pyx_v_keyspace); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_62shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_64__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_66__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_68__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_callback(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_pool, PyObject *__pyx_v_errors); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_17add_or_renew_pool_run_add_or_renew_pool(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_70add_or_renew_pool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_is_host_addition); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_72remove_pool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_74update_created_pools(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_lambda_funcdef_lambda8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_f); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_76on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_78on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_80set_keyspace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_pool_finished_setting_keyspace(PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_host_errors); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_82_set_keyspace_for_all_pools(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_callback); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_20user_type_registered_6encode_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_20user_type_registered_encode(PyObject *__pyx_self, PyObject *__pyx_v_val); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_84user_type_registered(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_user_type, PyObject *__pyx_v_klass); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_86submit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_14get_pool_state_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_88get_pool_state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_90get_pools(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_92_validate_set_legacy_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attr_name, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_control_connection, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_2try_reconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_4on_reconnection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_6on_exception(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_next_delay); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_30_watch_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj_weakref, PyObject *__pyx_v_method_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_32_clear_watcher(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, CYTHON_UNUSED PyObject *__pyx_v_expiring_weakref); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_timeout, PyObject *__pyx_v_schema_event_refresh_window, PyObject *__pyx_v_topology_event_refresh_window, PyObject *__pyx_v_status_event_refresh_window, PyObject *__pyx_v_schema_meta_enabled, PyObject *__pyx_v_token_meta_enabled); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_2connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_4_set_new_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conn); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_6_reconnect_internal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_8_try_connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_10reconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_12_reconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_14_get_and_set_reconnection_handler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_handler); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_16_submit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_18shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_20refresh_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_force, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_22_refresh_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_preloaded_results, PyObject *__pyx_v_schema_agreement_wait, PyObject *__pyx_v_force, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_24refresh_node_list_and_token_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_force_token_rebuild); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_26_refresh_node_list_and_token_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_preloaded_results, PyObject *__pyx_v_force_token_rebuild); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_28_is_valid_peer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_row); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_30_update_location_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_datacenter, PyObject *__pyx_v_rack); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_32_delay_for_event_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event_type, PyObject *__pyx_v_delay_window); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_34_refresh_nodes_if_not_up(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_36_handle_topology_change(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_38_handle_status_change(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_40_handle_schema_change(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_42wait_for_schema_agreement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_preloaded_results, PyObject *__pyx_v_wait_time); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_44_get_schema_mismatches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_peers_result, PyObject *__pyx_v_local_result, PyObject *__pyx_v_local_address); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_46_get_peers_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_peers_query_type, PyObject *__pyx_v_connection); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_48_signal_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_50on_up(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_52on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_54on_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_host, PyObject *__pyx_v_refresh_nodes); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_56on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_58get_connections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_60return_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_34_stop_scheduler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_scheduler, PyObject *__pyx_v_thread); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_executor); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_4schedule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_6schedule_unique(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_8_insert_task(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_task); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_12_log_if_failed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_future); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_36refresh_schema_and_set_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_control_conn, PyObject *__pyx_v_response_future, PyObject *__pyx_v_connection, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_session, PyObject *__pyx_v_message, PyObject *__pyx_v_query, PyObject *__pyx_v_timeout, PyObject *__pyx_v_metrics, PyObject *__pyx_v_prepared_statement, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_load_balancer, PyObject *__pyx_v_start_time, PyObject *__pyx_v_speculative_execution_plan, PyObject *__pyx_v_continuous_paging_state, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_2_time_remaining(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_4_start_timer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_6_cancel_timer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_8_on_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__attempts); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_10_on_speculative_execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_12_make_query_plan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_14send_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error_no_hosts); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_16_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_message, PyObject *__pyx_v_cb); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_18has_more_pages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_20warnings(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_22custom_payload(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_24start_fetching_next_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_26_reprepare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_prepare_message, PyObject *__pyx_v_host, PyObject *__pyx_v_connection, PyObject *__pyx_v_pool); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_28_set_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_connection, PyObject *__pyx_v_pool, PyObject *__pyx_v_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_30_handle_continuous_paging_first_response(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_32_set_keyspace_completed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errors); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_34_execute_after_prepare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_connection, PyObject *__pyx_v_pool, PyObject *__pyx_v_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_17_set_final_result_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_36_set_final_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_38_set_final_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_exception_from_response(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_40_handle_retry_decision(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_retry_decision, PyObject *__pyx_v_response, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_42_retry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reuse_connection, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_44_retry_task(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reuse_connection, PyObject *__pyx_v_host); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_46result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_48get_query_trace_ids(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_50get_query_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait, PyObject *__pyx_v_query_cl); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_52get_all_query_traces(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait_per, PyObject *__pyx_v_query_cl); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_54_get_query_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_max_wait, PyObject *__pyx_v_query_cl); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_56add_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_58add_errback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_60add_callbacks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_errback, PyObject *__pyx_v_callback_args, PyObject *__pyx_v_callback_kwargs, PyObject *__pyx_v_errback_args, PyObject *__pyx_v_errback_kwargs); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_62clear_callbacks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_64__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response_future, PyObject *__pyx_v_initial_response); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_2has_more_pages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_4current_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_6all(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_8one(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_10__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_12next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_14fetch_next_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_16_set_current_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_18_fetch_all(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_20_enter_list_mode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_operator); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_22__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_24__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_26__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_28get_query_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait_sec); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_30get_all_query_traces(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait_sec_per); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_32cancel_continuous_paging(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_34was_applied(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_36paging_state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_defaults(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_defaults1(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_defaults2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct__run_in_executor(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_3_distance(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_5_on_add(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_11_on_down(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_14_encode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_15_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_16_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_17_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_18__set_final_result(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_19_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_21_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ /* SmallCodeConfig */ #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 typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; PyObject *__pyx_type_9cassandra_7cluster___pyx_defaults; PyObject *__pyx_type_9cassandra_7cluster___pyx_defaults1; PyObject *__pyx_type_9cassandra_7cluster___pyx_defaults2; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception; PyObject *__pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_defaults; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_defaults1; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_defaults2; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception; PyTypeObject *__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; __Pyx_CachedCFunction __pyx_umethod_PySet_Type__update; PyObject *__pyx_tuple[37]; PyObject *__pyx_codeobj_tab[262]; PyObject *__pyx_string_tab[1872]; PyObject *__pyx_number_tab[26]; /* #### Code section: module_state_contents ### */ /* CommonTypesMetaclass.module_state_decls */ PyTypeObject *__pyx_CommonTypesMetaclassType; /* CachedMethodType.module_state_decls */ #if CYTHON_COMPILING_IN_LIMITED_API PyObject *__Pyx_CachedMethodType; #endif /* CythonFunctionShared.module_state_decls */ PyTypeObject *__pyx_CyFunctionType; /* IterNextPlain.module_state_decls */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 PyObject *__Pyx_GetBuiltinNext_LimitedAPI_cache; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct__run_in_executor[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct__run_in_executor; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_1_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_1_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_2_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_2_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_3_distance[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_3_distance; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_4_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_4_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_5_on_add[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_5_on_add; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_6_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_6_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_7_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_7_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_8_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_8_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_11_on_down[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_11_on_down; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_14_encode[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_14_encode; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_15_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_15_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_16_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_16_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_17_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_17_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_18__set_final_result[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_18__set_final_result; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_19_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_19_genexpr; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_21_genexpr[8]; int __pyx_freecount_9cassandra_7cluster___pyx_scope_struct_21_genexpr; #endif /* CodeObjectCache.module_state_decls */ struct __Pyx_CodeObjectCache __pyx_code_cache; /* Generator.module_state_decls */ PyTypeObject *__pyx_GeneratorType; /* #### Code section: module_state_end ### */ } __pyx_mstatetype; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) #define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) #else static __pyx_mstatetype __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: constant_name_defines ### */ #define __pyx_kp_u_ __pyx_string_tab[0] #define __pyx_kp_u_127_0_0_1 __pyx_string_tab[1] #define __pyx_kp_u_6_0_0 __pyx_string_tab[2] #define __pyx_kp_u_6_8_0 __pyx_string_tab[3] #define __pyx_kp_u_A_collection_of_connection_pool __pyx_string_tab[4] #define __pyx_kp_u_A_convenient_combination_of_met __pyx_string_tab[5] #define __pyx_kp_u_Added_pool_for_host_s_to_session __pyx_string_tab[6] #define __pyx_kp_u_All_connections_for_host_s_are_a __pyx_string_tab[7] #define __pyx_kp_u_All_futures_have_completed_for_a __pyx_string_tab[8] #define __pyx_kp_u_An_asynchronous_response_delive __pyx_string_tab[9] #define __pyx_kp_u_An_attempt_was_made_to_use_a_us __pyx_string_tab[10] #define __pyx_kp_u_An_internally_scheduled_tasked_f __pyx_string_tab[11] #define __pyx_kp_u_An_iterator_over_the_rows_from __pyx_string_tab[12] #define __pyx_kp_u_Another_thread_is_already_handli __pyx_string_tab[13] #define __pyx_kp_u_Attaches_a_callback_function_to __pyx_string_tab[14] #define __pyx_kp_u_Attempted_to_cancel_paging_with __pyx_string_tab[15] #define __pyx_kp_u_Attempting_to_open_new_connectio __pyx_string_tab[16] #define __pyx_kp_u_BatchStatement_execution_is_only __pyx_string_tab[17] #define __pyx_kp_u_CALL_DseClientTool_getAnalyticsG __pyx_string_tab[18] #define __pyx_kp_u_Cannot_add_execution_profiles_wh __pyx_string_tab[19] #define __pyx_kp_u_Cannot_determine_LWT_result_with __pyx_string_tab[20] #define __pyx_kp_u_Cannot_downgrade_protocol_versio __pyx_string_tab[21] #define __pyx_kp_u_Cannot_execute_graph_queries_usi __pyx_string_tab[22] #define __pyx_kp_u_Cannot_set_Cluster_default_retry __pyx_string_tab[23] #define __pyx_kp_u_Cannot_set_Cluster_load_balancin __pyx_string_tab[24] #define __pyx_kp_u_Cannot_set_Session __pyx_string_tab[25] #define __pyx_kp_u_Cannot_specify_execution_profile __pyx_string_tab[26] #define __pyx_kp_u_Cannot_use_s_when_results_have_b __pyx_string_tab[27] #define __pyx_kp_u_Cassandra_host_s_removed __pyx_string_tab[28] #define __pyx_kp_u_Client_request_timeout_See_Sessi __pyx_string_tab[29] #define __pyx_kp_u_Cluster___init___called_with_con __pyx_string_tab[30] #define __pyx_kp_u_Cluster___init___called_with_con_2 __pyx_string_tab[31] #define __pyx_kp_u_Cluster_is_already_shut_down __pyx_string_tab[32] #define __pyx_kp_u_Cluster_set_core_connections_per __pyx_string_tab[33] #define __pyx_kp_u_Cluster_set_max_connections_per __pyx_string_tab[34] #define __pyx_kp_u_Cluster_set_max_requests_per_con __pyx_string_tab[35] #define __pyx_kp_u_Cluster_set_meta_refresh_enabled __pyx_string_tab[36] #define __pyx_kp_u_Cluster_set_min_requests_per_con __pyx_string_tab[37] #define __pyx_kp_u_Clusters_constructed_with_execut __pyx_string_tab[38] #define __pyx_kp_u_Connecting_to_cluster_contact_po __pyx_string_tab[39] #define __pyx_kp_u_Connection_defunct_by_heartbeat __pyx_string_tab[40] #define __pyx_kp_u_Connection_error_when_preparing __pyx_string_tab[41] #define __pyx_kp_u_Connection_for_host_s_is_busy_mo __pyx_string_tab[42] #define __pyx_kp_u_Connection_pool_could_not_be_cre __pyx_string_tab[43] #define __pyx_kp_u_Connection_pools_established_for __pyx_string_tab[44] #define __pyx_kp_u_ContinuousPagingOptions_max_queu __pyx_string_tab[45] #define __pyx_kp_u_Control_connection_created __pyx_string_tab[46] #define __pyx_kp_u_Control_connection_failed_to_con __pyx_string_tab[47] #define __pyx_kp_u_Could_not_resolve_hostname_with __pyx_string_tab[48] #define __pyx_kp_u_Done_preparing_all_known_prepare __pyx_string_tab[49] #define __pyx_kp_u_Done_preparing_all_queries_for_h __pyx_string_tab[50] #define __pyx_kp_u_Done_preparing_queries_for_new_h __pyx_string_tab[51] #define __pyx_kp_u_Downgrading_core_protocol_versio __pyx_string_tab[52] #define __pyx_kp_u_Error_preparing_query __pyx_string_tab[53] #define __pyx_kp_u_Error_preparing_query_for_host_s __pyx_string_tab[54] #define __pyx_kp_u_Error_preparing_query_on_all_hos __pyx_string_tab[55] #define __pyx_kp_u_Error_querying_host_s __pyx_string_tab[56] #define __pyx_kp_u_Error_trying_to_prepare_all_stat __pyx_string_tab[57] #define __pyx_kp_u_Error_trying_to_prepare_all_stat_2 __pyx_string_tab[58] #define __pyx_kp_u_Error_trying_to_reconnect_contro __pyx_string_tab[59] #define __pyx_kp_u_Exception_refreshing_schema_in_r __pyx_string_tab[60] #define __pyx_kp_u_Execute_the_given_query_and_ret __pyx_string_tab[61] #define __pyx_kp_u_Execution_profile_for_graph_quer __pyx_string_tab[62] #define __pyx_kp_u_Failed_querying_analytics_master __pyx_string_tab[63] #define __pyx_kp_u_Failed_setting_keyspace_for_pool __pyx_string_tab[64] #define __pyx_kp_u_Failed_to_create_all_new_connect __pyx_string_tab[65] #define __pyx_kp_u_Failed_to_create_connection_pool __pyx_string_tab[66] #define __pyx_kp_u_Failed_to_prepare_query_for_host __pyx_string_tab[67] #define __pyx_kp_u_Failed_to_run_task_on_executor __pyx_string_tab[68] #define __pyx_kp_u_Failed_to_set_keyspace_on_all_ho __pyx_string_tab[69] #define __pyx_kp_u_Failed_to_submit_task_to_executo __pyx_string_tab[70] #define __pyx_kp_u_Found_an_invalid_row_for_peer_s __pyx_string_tab[71] #define __pyx_kp_u_Found_multiple_hosts_with_the_sa __pyx_string_tab[72] #define __pyx_kp_u_Got_different_query_ID_in_server __pyx_string_tab[73] #define __pyx_kp_u_Got_unexpected_message __pyx_string_tab[74] #define __pyx_kp_u_Got_unexpected_response_type_whe __pyx_string_tab[75] #define __pyx_kp_u_Got_unexpected_response_when_pre __pyx_string_tab[76] #define __pyx_kp_u_Got_unexpected_response_when_pre_2 __pyx_string_tab[77] #define __pyx_kp_u_Handling_new_host_r_and_notifyin __pyx_string_tab[78] #define __pyx_kp_u_Host_has_been_marked_down_or_rem __pyx_string_tab[79] #define __pyx_kp_u_Host_s_error_s __pyx_string_tab[80] #define __pyx_kp_u_Host_s_has_been_marked_down __pyx_string_tab[81] #define __pyx_kp_u_Host_s_may_be_up_will_prepare_qu __pyx_string_tab[82] #define __pyx_kp_u_Host_s_was_already_marked_up __pyx_string_tab[83] #define __pyx_kp_u_ID_mismatch_while_trying_to_repr __pyx_string_tab[84] #define __pyx_kp_u_Ignoring_schedule_unique_for_alr __pyx_string_tab[85] #define __pyx_kp_u_Ignoring_scheduled_task_after_sh __pyx_string_tab[86] #define __pyx_kp_u_Internal __pyx_string_tab[87] #define __pyx_kp_u_Invalid_execution_profile __pyx_string_tab[88] #define __pyx_kp_u_Invalid_peers_query_type_s __pyx_string_tab[89] #define __pyx_kp_u_Keyspace __pyx_string_tab[90] #define __pyx_kp_u_Keyspace_metadata_was_not_refres __pyx_string_tab[91] #define __pyx_kp_u_LWT_result_should_have_exactly_o __pyx_string_tab[92] #define __pyx_kp_u_Legacy_execution_parameters_will __pyx_string_tab[93] #define __pyx_kp_u_New_Cassandra_host_r_discovered __pyx_string_tab[94] #define __pyx_kp_u_No_LWT_were_present_in_the_Batch __pyx_string_tab[95] #define __pyx_kp_u_Node_list_was_not_refreshed_See __pyx_string_tab[96] #define __pyx_kp_u_Node_s_is_reporting_a_schema_dis __pyx_string_tab[97] #define __pyx_kp_u_Not_adding_connection_pool_for_n __pyx_string_tab[98] #define __pyx_kp_u_Not_executing_scheduled_task_due __pyx_string_tab[99] #define __pyx_kp_u_Not_starting_MonitorReporter_thr __pyx_string_tab[100] #define __pyx_kp_u_Now_that_host_s_is_up_cancelling __pyx_string_tab[101] #define __pyx_kp_u_Old_host_reconnector_found_for_s __pyx_string_tab[102] #define __pyx_kp_u_Pool_is_shutdown __pyx_string_tab[103] #define __pyx_kp_u_Prepares_a_query_string_returni __pyx_string_tab[104] #define __pyx_kp_u_Preparing_all_known_prepared_sta __pyx_string_tab[105] #define __pyx_kp_u_Profile_already_exists __pyx_string_tab[106] #define __pyx_kp_u_ProtocolError_returned_from_serv __pyx_string_tab[107] #define __pyx_kp_u_ProtocolHandler __pyx_string_tab[108] #define __pyx_kp_u_Python_3_7_and_Eventlet_cause_th __pyx_string_tab[109] #define __pyx_kp_u_Raised_when_an_operation_is_att __pyx_string_tab[110] #define __pyx_kp_u_Raised_when_meth_ResponseFuture __pyx_string_tab[111] #define __pyx_kp_u_Re_preparing_unrecognized_prepar __pyx_string_tab[112] #define __pyx_kp_u_Reconnecting_during_shutdown __pyx_string_tab[113] #define __pyx_kp_u_Refreshing_schema_in_response_to __pyx_string_tab[114] #define __pyx_kp_u_Removed_connection_pool_for_r __pyx_string_tab[115] #define __pyx_kp_u_Removing_host_s __pyx_string_tab[116] #define __pyx_kp_u_Request_timed_out_while_waiting __pyx_string_tab[117] #define __pyx_kp_u_ResponseFuture_add_callback_line __pyx_string_tab[118] #define __pyx_kp_u_ResponseFuture_add_callbacks_lin __pyx_string_tab[119] #define __pyx_kp_u_ResponseFuture_query __pyx_string_tab[120] #define __pyx_kp_u_ResponseFuture_result_line_5020 __pyx_string_tab[121] #define __pyx_kp_u_ResultSet_indexing_support_will __pyx_string_tab[122] #define __pyx_kp_u_Return_the_final_result_or_rais __pyx_string_tab[123] #define __pyx_kp_u_SELECT_FROM_system_local_WHERE_k __pyx_string_tab[124] #define __pyx_kp_u_SELECT_FROM_system_peers __pyx_string_tab[125] #define __pyx_kp_u_SELECT_FROM_system_peers_v2 __pyx_string_tab[126] #define __pyx_kp_u_SELECT_host_id_cluster_name_data __pyx_string_tab[127] #define __pyx_kp_u_SELECT_host_id_peer_data_center __pyx_string_tab[128] #define __pyx_kp_u_SELECT_host_id_peer_peer_port_da __pyx_string_tab[129] #define __pyx_kp_u_SELECT_host_id_peer_peer_port_na __pyx_string_tab[130] #define __pyx_kp_u_SELECT_peer_host_id_nt_col_name __pyx_string_tab[131] #define __pyx_kp_u_SELECT_rpc_address_FROM_system_l __pyx_string_tab[132] #define __pyx_kp_u_SELECT_schema_version_FROM_syste __pyx_string_tab[133] #define __pyx_kp_u_Schema_metadata_was_not_refreshe __pyx_string_tab[134] #define __pyx_kp_u_Session_execute_async_line_2680 __pyx_string_tab[135] #define __pyx_kp_u_Session_prepare_line_3177 __pyx_string_tab[136] #define __pyx_kp_u_Setting_the_consistency_level_at __pyx_string_tab[137] #define __pyx_kp_u_Shutting_down_Cluster_Scheduler __pyx_string_tab[138] #define __pyx_kp_u_Shutting_down_control_connection __pyx_string_tab[139] #define __pyx_kp_u_Signalling_to_control_connection __pyx_string_tab[140] #define __pyx_kp_u_Signalling_to_load_balancing_pol __pyx_string_tab[141] #define __pyx_kp_u_Skipping_schema_refresh_due_to_l __pyx_string_tab[142] #define __pyx_kp_u_Started_Session_with_client_id_a __pyx_string_tab[143] #define __pyx_kp_u_Starting_reconnector_for_host_s __pyx_string_tab[144] #define __pyx_kp_u_Starting_to_handle_up_status_of __pyx_string_tab[145] #define __pyx_kp_u_Table_metadata_was_not_refreshed __pyx_string_tab[146] #define __pyx_kp_u_Task_Scheduler __pyx_string_tab[147] #define __pyx_kp_u_The_Session_s_current_keyspace __pyx_string_tab[148] #define __pyx_kp_u_The_main_class_to_use_when_inte __pyx_string_tab[149] #define __pyx_kp_u_The_parameters_must_be_a_diction __pyx_string_tab[150] #define __pyx_kp_u_Timed_out_trying_to_prepare_all __pyx_string_tab[151] #define __pyx_kp_u_Trace_information_was_not_availa __pyx_string_tab[152] #define __pyx_kp_u_Tried_to_add_an_ExecutionProfile __pyx_string_tab[153] #define __pyx_kp_u_Tried_to_execute_unknown_prepare __pyx_string_tab[154] #define __pyx_kp_u_USE __pyx_string_tab[155] #define __pyx_kp_u_Unable_to_complete_the_operation __pyx_string_tab[156] #define __pyx_kp_u_Unable_to_connect_to_any_servers __pyx_string_tab[157] #define __pyx_kp_u_Unable_to_load_a_default_connect __pyx_string_tab[158] #define __pyx_kp_u_Unable_to_set_column_encryption __pyx_string_tab[159] #define __pyx_kp_u_Unexpected_exception_while_handl __pyx_string_tab[160] #define __pyx_kp_u_Unexpected_failure_handling_node __pyx_string_tab[161] #define __pyx_kp_u_Unexpected_failure_while_adding __pyx_string_tab[162] #define __pyx_kp_u_Unexpected_failure_while_marking __pyx_string_tab[163] #define __pyx_kp_u_User_Aggregate_metadata_was_not __pyx_string_tab[164] #define __pyx_kp_u_User_Function_metadata_was_not_r __pyx_string_tab[165] #define __pyx_kp_u_User_Type_metadata_was_not_refre __pyx_string_tab[166] #define __pyx_kp_u_User_Type_serialization_is_only __pyx_string_tab[167] #define __pyx_kp_u_User_type __pyx_string_tab[168] #define __pyx_kp_u_Using_s_on_paged_results_causes __pyx_string_tab[169] #define __pyx_kp_u_Using_ssl_options_without_ssl_co __pyx_string_tab[170] #define __pyx_kp_u_View_metadata_was_not_refreshed __pyx_string_tab[171] #define __pyx_kp_u_Waiting_to_acquire_lock_for_hand __pyx_string_tab[172] #define __pyx_kp_u__10 __pyx_string_tab[173] #define __pyx_kp_u__11 __pyx_string_tab[174] #define __pyx_kp_u__12 __pyx_string_tab[175] #define __pyx_kp_u__2 __pyx_string_tab[176] #define __pyx_kp_u__3 __pyx_string_tab[177] #define __pyx_kp_u__4 __pyx_string_tab[178] #define __pyx_kp_u__5 __pyx_string_tab[179] #define __pyx_kp_u__6 __pyx_string_tab[180] #define __pyx_kp_u__7 __pyx_string_tab[181] #define __pyx_kp_u__9 __pyx_string_tab[182] #define __pyx_kp_u_address_translator_should_not_be __pyx_string_tab[183] #define __pyx_kp_u_applied __pyx_string_tab[184] #define __pyx_kp_u_auth_provider_must_be_callable_w __pyx_string_tab[185] #define __pyx_kp_u_auth_provider_must_implement_the __pyx_string_tab[186] #define __pyx_kp_u_cassandra_cluster_py __pyx_string_tab[187] #define __pyx_kp_u_contact_points_endpoint_factory __pyx_string_tab[188] #define __pyx_kp_u_contact_points_should_not_be_a_s __pyx_string_tab[189] #define __pyx_kp_u_contact_points_should_not_contai __pyx_string_tab[190] #define __pyx_kp_u_control_connection_Aborting_wai __pyx_string_tab[191] #define __pyx_kp_u_control_connection_Attempting_t __pyx_string_tab[192] #define __pyx_kp_u_control_connection_Attempting_t_2 __pyx_string_tab[193] #define __pyx_kp_u_control_connection_Closing_old __pyx_string_tab[194] #define __pyx_kp_u_control_connection_Control_conn __pyx_string_tab[195] #define __pyx_kp_u_control_connection_Control_conn_2 __pyx_string_tab[196] #define __pyx_kp_u_control_connection_Error_connec __pyx_string_tab[197] #define __pyx_kp_u_control_connection_Error_refres __pyx_string_tab[198] #define __pyx_kp_u_control_connection_Error_refres_2 __pyx_string_tab[199] #define __pyx_kp_u_control_connection_Established __pyx_string_tab[200] #define __pyx_kp_u_control_connection_Finished_fet __pyx_string_tab[201] #define __pyx_kp_u_control_connection_Found_new_ho __pyx_string_tab[202] #define __pyx_kp_u_control_connection_Opening_new __pyx_string_tab[203] #define __pyx_kp_u_control_connection_Rebuilding_t __pyx_string_tab[204] #define __pyx_kp_u_control_connection_Reconnection __pyx_string_tab[205] #define __pyx_kp_u_control_connection_Refreshing_n __pyx_string_tab[206] #define __pyx_kp_u_control_connection_Refreshing_n_2 __pyx_string_tab[207] #define __pyx_kp_u_control_connection_Refreshing_n_3 __pyx_string_tab[208] #define __pyx_kp_u_control_connection_Removing_hos __pyx_string_tab[209] #define __pyx_kp_u_control_connection_Schemas_matc __pyx_string_tab[210] #define __pyx_kp_u_control_connection_Schemas_mism __pyx_string_tab[211] #define __pyx_kp_u_control_connection_Skipping_sch __pyx_string_tab[212] #define __pyx_kp_u_control_connection_Timed_out_wa __pyx_string_tab[213] #define __pyx_kp_u_control_connection_Waiting_for __pyx_string_tab[214] #define __pyx_kp_u_control_connection_error_reconn __pyx_string_tab[215] #define __pyx_kp_u_conviction_policy_factory_must_b __pyx_string_tab[216] #define __pyx_kp_u_coordinator_host_2 __pyx_string_tab[217] #define __pyx_kp_u_custom_payload_cannot_be_retriev __pyx_string_tab[218] #define __pyx_kp_u_default_retry_policy_should_not __pyx_string_tab[219] #define __pyx_kp_u_default_serial_consistency_level __pyx_string_tab[220] #define __pyx_kp_u_disable __pyx_string_tab[221] #define __pyx_kp_u_does_not_exist_in_keyspace __pyx_string_tab[222] #define __pyx_kp_u_does_not_exist_or_has_not_been __pyx_string_tab[223] #define __pyx_kp_u_does_not_match_the_keyspace_the __pyx_string_tab[224] #define __pyx_kp_u_enable __pyx_string_tab[225] #define __pyx_kp_u_equality_operator __pyx_string_tab[226] #define __pyx_kp_u_eventlet_patcher __pyx_string_tab[227] #define __pyx_kp_u_exception_2 __pyx_string_tab[228] #define __pyx_kp_u_gc __pyx_string_tab[229] #define __pyx_kp_u_gevent_monkey __pyx_string_tab[230] #define __pyx_kp_u_index_operator __pyx_string_tab[231] #define __pyx_kp_u_internal_Enum_for__peers_query __pyx_string_tab[232] #define __pyx_kp_u_ip_port __pyx_string_tab[233] #define __pyx_kp_u_isenabled __pyx_string_tab[234] #define __pyx_kp_u_keyspace_is_required_to_refresh __pyx_string_tab[235] #define __pyx_kp_u_load_balancing_policy_should_not __pyx_string_tab[236] #define __pyx_kp_u_max_requests_must_be_1_127_and_g __pyx_string_tab[237] #define __pyx_kp_u_min_requests_must_be_0_126_and_l __pyx_string_tab[238] #define __pyx_kp_u_no_host_queried_before_timeout __pyx_string_tab[239] #define __pyx_kp_u_no_result_yet __pyx_string_tab[240] #define __pyx_kp_u_profile_must_be_an_instance_of_E __pyx_string_tab[241] #define __pyx_kp_u_reconnection_policy_should_not_b __pyx_string_tab[242] #define __pyx_kp_u_request_id __pyx_string_tab[243] #define __pyx_kp_u_result_2 __pyx_string_tab[244] #define __pyx_kp_u_s_2 __pyx_string_tab[245] #define __pyx_kp_u_serial_consistency_level_must_be __pyx_string_tab[246] #define __pyx_kp_u_table_usertype_function_aggrega __pyx_string_tab[247] #define __pyx_kp_u_than_we_had_before __pyx_string_tab[248] #define __pyx_kp_u_timestamp_generator_must_be_call __pyx_string_tab[249] #define __pyx_kp_u_using_keyspace_s __pyx_string_tab[250] #define __pyx_kp_u_utf_8 __pyx_string_tab[251] #define __pyx_kp_u_valid_profiles_are __pyx_string_tab[252] #define __pyx_kp_u_warnings_cannot_be_retrieved_bef __pyx_string_tab[253] #define __pyx_kp_u_while_using_Configuration_Profi __pyx_string_tab[254] #define __pyx_n_u_AF_UNSPEC __pyx_string_tab[255] #define __pyx_n_u_AGGREGATE __pyx_string_tab[256] #define __pyx_n_u_AsyncoreConnection __pyx_string_tab[257] #define __pyx_n_u_AuthenticationFailed __pyx_string_tab[258] #define __pyx_n_u_BYTES __pyx_string_tab[259] #define __pyx_n_u_BatchMessage __pyx_string_tab[260] #define __pyx_n_u_BatchStatement __pyx_string_tab[261] #define __pyx_n_u_BoundStatement __pyx_string_tab[262] #define __pyx_n_u_Cluster __pyx_string_tab[263] #define __pyx_n_u_Cluster___enter __pyx_string_tab[264] #define __pyx_n_u_Cluster___exit __pyx_string_tab[265] #define __pyx_n_u_Cluster___init __pyx_string_tab[266] #define __pyx_n_u_Cluster__cleanup_failed_on_up_ha __pyx_string_tab[267] #define __pyx_n_u_Cluster__create_thread_pool_exec __pyx_string_tab[268] #define __pyx_n_u_Cluster__default_load_balancing __pyx_string_tab[269] #define __pyx_n_u_Cluster__ensure_core_connections __pyx_string_tab[270] #define __pyx_n_u_Cluster__finalize_add __pyx_string_tab[271] #define __pyx_n_u_Cluster__make_connection_factory __pyx_string_tab[272] #define __pyx_n_u_Cluster__make_connection_kwargs __pyx_string_tab[273] #define __pyx_n_u_Cluster__new_session __pyx_string_tab[274] #define __pyx_n_u_Cluster__on_up_future_completed __pyx_string_tab[275] #define __pyx_n_u_Cluster__prepare_all_queries __pyx_string_tab[276] #define __pyx_n_u_Cluster__prepare_all_queries_loc __pyx_string_tab[277] #define __pyx_n_u_Cluster__send_chunks __pyx_string_tab[278] #define __pyx_n_u_Cluster__session_register_user_t __pyx_string_tab[279] #define __pyx_n_u_Cluster__set_default_dbaas_consi __pyx_string_tab[280] #define __pyx_n_u_Cluster__start_reconnector __pyx_string_tab[281] #define __pyx_n_u_Cluster__target_type_from_refres __pyx_string_tab[282] #define __pyx_n_u_Cluster__validate_refresh_schema __pyx_string_tab[283] #define __pyx_n_u_Cluster__validate_refresh_schema_2 __pyx_string_tab[284] #define __pyx_n_u_Cluster_add_execution_profile __pyx_string_tab[285] #define __pyx_n_u_Cluster_add_execution_profile_lo __pyx_string_tab[286] #define __pyx_n_u_Cluster_add_host __pyx_string_tab[287] #define __pyx_n_u_Cluster_add_prepared __pyx_string_tab[288] #define __pyx_n_u_Cluster_auth_provider __pyx_string_tab[289] #define __pyx_n_u_Cluster_connect __pyx_string_tab[290] #define __pyx_n_u_Cluster_connection_factory __pyx_string_tab[291] #define __pyx_n_u_Cluster_default_retry_policy __pyx_string_tab[292] #define __pyx_n_u_Cluster_get_connection_holders __pyx_string_tab[293] #define __pyx_n_u_Cluster_get_control_connection_h __pyx_string_tab[294] #define __pyx_n_u_Cluster_get_core_connections_per __pyx_string_tab[295] #define __pyx_n_u_Cluster_get_max_connections_per __pyx_string_tab[296] #define __pyx_n_u_Cluster_get_max_requests_per_con __pyx_string_tab[297] #define __pyx_n_u_Cluster_get_min_requests_per_con __pyx_string_tab[298] #define __pyx_n_u_Cluster_listeners __pyx_string_tab[299] #define __pyx_n_u_Cluster_load_balancing_policy __pyx_string_tab[300] #define __pyx_n_u_Cluster_on_add __pyx_string_tab[301] #define __pyx_n_u_Cluster_on_add_locals_future_com __pyx_string_tab[302] #define __pyx_n_u_Cluster_on_down __pyx_string_tab[303] #define __pyx_n_u_Cluster_on_remove __pyx_string_tab[304] #define __pyx_n_u_Cluster_on_up __pyx_string_tab[305] #define __pyx_n_u_Cluster_protocol_downgrade __pyx_string_tab[306] #define __pyx_n_u_Cluster_refresh_keyspace_metadat __pyx_string_tab[307] #define __pyx_n_u_Cluster_refresh_materialized_vie __pyx_string_tab[308] #define __pyx_n_u_Cluster_refresh_nodes __pyx_string_tab[309] #define __pyx_n_u_Cluster_refresh_schema_metadata __pyx_string_tab[310] #define __pyx_n_u_Cluster_refresh_table_metadata __pyx_string_tab[311] #define __pyx_n_u_Cluster_refresh_user_aggregate_m __pyx_string_tab[312] #define __pyx_n_u_Cluster_refresh_user_function_me __pyx_string_tab[313] #define __pyx_n_u_Cluster_refresh_user_type_metada __pyx_string_tab[314] #define __pyx_n_u_Cluster_register_listener __pyx_string_tab[315] #define __pyx_n_u_Cluster_register_user_type __pyx_string_tab[316] #define __pyx_n_u_Cluster_remove_host __pyx_string_tab[317] #define __pyx_n_u_Cluster_schema_metadata_enabled __pyx_string_tab[318] #define __pyx_n_u_Cluster_set_core_connections_per_2 __pyx_string_tab[319] #define __pyx_n_u_Cluster_set_max_connections_per_2 __pyx_string_tab[320] #define __pyx_n_u_Cluster_set_max_requests_per_con_2 __pyx_string_tab[321] #define __pyx_n_u_Cluster_set_meta_refresh_enabled_2 __pyx_string_tab[322] #define __pyx_n_u_Cluster_set_min_requests_per_con_2 __pyx_string_tab[323] #define __pyx_n_u_Cluster_shutdown __pyx_string_tab[324] #define __pyx_n_u_Cluster_signal_connection_failur __pyx_string_tab[325] #define __pyx_n_u_Cluster_token_metadata_enabled __pyx_string_tab[326] #define __pyx_n_u_Cluster_unregister_listener __pyx_string_tab[327] #define __pyx_n_u_ConfigMode __pyx_string_tab[328] #define __pyx_n_u_ConnectionBusy __pyx_string_tab[329] #define __pyx_n_u_ConnectionException __pyx_string_tab[330] #define __pyx_n_u_ConnectionHeartbeat __pyx_string_tab[331] #define __pyx_n_u_ConnectionShutdown __pyx_string_tab[332] #define __pyx_n_u_ConsistencyLevel __pyx_string_tab[333] #define __pyx_n_u_ContinuousPagingOptions __pyx_string_tab[334] #define __pyx_n_u_ContinuousPagingOptions_PagingUn __pyx_string_tab[335] #define __pyx_n_u_ContinuousPagingOptions___init __pyx_string_tab[336] #define __pyx_n_u_ContinuousPagingOptions_page_uni __pyx_string_tab[337] #define __pyx_n_u_ContinuousPagingState __pyx_string_tab[338] #define __pyx_n_u_ControlConnection __pyx_string_tab[339] #define __pyx_n_u_ControlConnection_PeersQueryType __pyx_string_tab[340] #define __pyx_n_u_ControlConnection___init __pyx_string_tab[341] #define __pyx_n_u_ControlConnection__delay_for_eve __pyx_string_tab[342] #define __pyx_n_u_ControlConnection__get_and_set_r __pyx_string_tab[343] #define __pyx_n_u_ControlConnection__get_peers_que __pyx_string_tab[344] #define __pyx_n_u_ControlConnection__get_schema_mi __pyx_string_tab[345] #define __pyx_n_u_ControlConnection__get_schema_mi_2 __pyx_string_tab[346] #define __pyx_n_u_ControlConnection__handle_schema __pyx_string_tab[347] #define __pyx_n_u_ControlConnection__handle_status __pyx_string_tab[348] #define __pyx_n_u_ControlConnection__handle_topolo __pyx_string_tab[349] #define __pyx_n_u_ControlConnection__is_valid_peer __pyx_string_tab[350] #define __pyx_n_u_ControlConnection__reconnect __pyx_string_tab[351] #define __pyx_n_u_ControlConnection__reconnect_int __pyx_string_tab[352] #define __pyx_n_u_ControlConnection__refresh_node __pyx_string_tab[353] #define __pyx_n_u_ControlConnection__refresh_nodes __pyx_string_tab[354] #define __pyx_n_u_ControlConnection__refresh_schem __pyx_string_tab[355] #define __pyx_n_u_ControlConnection__set_new_conne __pyx_string_tab[356] #define __pyx_n_u_ControlConnection__signal_error __pyx_string_tab[357] #define __pyx_n_u_ControlConnection__submit __pyx_string_tab[358] #define __pyx_n_u_ControlConnection__try_connect __pyx_string_tab[359] #define __pyx_n_u_ControlConnection__update_locati __pyx_string_tab[360] #define __pyx_n_u_ControlConnection_connect __pyx_string_tab[361] #define __pyx_n_u_ControlConnection_get_connection __pyx_string_tab[362] #define __pyx_n_u_ControlConnection_on_add __pyx_string_tab[363] #define __pyx_n_u_ControlConnection_on_down __pyx_string_tab[364] #define __pyx_n_u_ControlConnection_on_remove __pyx_string_tab[365] #define __pyx_n_u_ControlConnection_on_up __pyx_string_tab[366] #define __pyx_n_u_ControlConnection_reconnect __pyx_string_tab[367] #define __pyx_n_u_ControlConnection_refresh_node_l __pyx_string_tab[368] #define __pyx_n_u_ControlConnection_refresh_schema __pyx_string_tab[369] #define __pyx_n_u_ControlConnection_return_connect __pyx_string_tab[370] #define __pyx_n_u_ControlConnection_shutdown __pyx_string_tab[371] #define __pyx_n_u_ControlConnection_wait_for_schem __pyx_string_tab[372] #define __pyx_n_u_ControlReconnectionHandler __pyx_string_tab[373] #define __pyx_n_u_ControlReconnectionHandler___in __pyx_string_tab[374] #define __pyx_n_u_ControlReconnectionHandler_on_e __pyx_string_tab[375] #define __pyx_n_u_ControlReconnectionHandler_on_r __pyx_string_tab[376] #define __pyx_n_u_ControlReconnectionHandler_try __pyx_string_tab[377] #define __pyx_n_u_Core __pyx_string_tab[378] #define __pyx_n_u_DATASTAX_CLOUD_PRODUCT_TYPE __pyx_string_tab[379] #define __pyx_n_u_DCAwareRoundRobinPolicy __pyx_string_tab[380] #define __pyx_n_u_DEFAULT_GRAPH_LANGUAGE __pyx_string_tab[381] #define __pyx_n_u_DEFAULT_GRAPH_PROTOCOL __pyx_string_tab[382] #define __pyx_n_u_DEFAULT_MAX_CONNECTIONS_PER_LOCA __pyx_string_tab[383] #define __pyx_n_u_DEFAULT_MAX_CONNECTIONS_PER_REMO __pyx_string_tab[384] #define __pyx_n_u_DEFAULT_MAX_REQUESTS __pyx_string_tab[385] #define __pyx_n_u_DEFAULT_MIN_CONNECTIONS_PER_LOCA __pyx_string_tab[386] #define __pyx_n_u_DEFAULT_MIN_CONNECTIONS_PER_REMO __pyx_string_tab[387] #define __pyx_n_u_DEFAULT_MIN_REQUESTS __pyx_string_tab[388] #define __pyx_n_u_DOWN __pyx_string_tab[389] #define __pyx_n_u_DSE_V2 __pyx_string_tab[390] #define __pyx_n_u_DefaultConnection __pyx_string_tab[391] #define __pyx_n_u_DefaultEndPoint __pyx_string_tab[392] #define __pyx_n_u_DefaultEndPointFactory __pyx_string_tab[393] #define __pyx_n_u_DefaultLoadBalancingPolicy __pyx_string_tab[394] #define __pyx_n_u_DependencyException __pyx_string_tab[395] #define __pyx_n_u_DriverException __pyx_string_tab[396] #define __pyx_n_u_EXEC_PROFILE_DEFAULT __pyx_string_tab[397] #define __pyx_n_u_EXEC_PROFILE_GRAPH_ANALYTICS_DEF __pyx_string_tab[398] #define __pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT __pyx_string_tab[399] #define __pyx_n_u_EXEC_PROFILE_GRAPH_SYSTEM_DEFAUL __pyx_string_tab[400] #define __pyx_n_u_Empty __pyx_string_tab[401] #define __pyx_n_u_Encoder __pyx_string_tab[402] #define __pyx_n_u_EndPoint __pyx_string_tab[403] #define __pyx_n_u_ErrorMessage __pyx_string_tab[404] #define __pyx_n_u_Event __pyx_string_tab[405] #define __pyx_n_u_EventletConnection __pyx_string_tab[406] #define __pyx_n_u_ExecuteMessage __pyx_string_tab[407] #define __pyx_n_u_ExecutionProfile __pyx_string_tab[408] #define __pyx_n_u_ExecutionProfile___init __pyx_string_tab[409] #define __pyx_n_u_ExponentialReconnectionPolicy __pyx_string_tab[410] #define __pyx_n_u_FETCH_SIZE_UNSET __pyx_string_tab[411] #define __pyx_n_u_FIRST_COMPLETED __pyx_string_tab[412] #define __pyx_n_u_FUNCTION __pyx_string_tab[413] #define __pyx_n_u_GRAPHSON_2_0 __pyx_string_tab[414] #define __pyx_n_u_GRAPHSON_3_0 __pyx_string_tab[415] #define __pyx_n_u_GRAPH_PAGING_MIN_DSE_VERSION __pyx_string_tab[416] #define __pyx_n_u_GeventConnection __pyx_string_tab[417] #define __pyx_n_u_GraphAnalyticsExecutionProfile __pyx_string_tab[418] #define __pyx_n_u_GraphAnalyticsExecutionProfile_2 __pyx_string_tab[419] #define __pyx_n_u_GraphExecutionProfile __pyx_string_tab[420] #define __pyx_n_u_GraphExecutionProfile___init __pyx_string_tab[421] #define __pyx_n_u_GraphOptions __pyx_string_tab[422] #define __pyx_n_u_GraphProtocol __pyx_string_tab[423] #define __pyx_n_u_GraphSON1Serializer __pyx_string_tab[424] #define __pyx_n_u_GraphSON2Serializer __pyx_string_tab[425] #define __pyx_n_u_GraphSON3Serializer __pyx_string_tab[426] #define __pyx_n_u_GraphSONContextRowFactory __pyx_string_tab[427] #define __pyx_n_u_GraphStatement __pyx_string_tab[428] #define __pyx_n_u_GreenThreadPoolExecutor __pyx_string_tab[429] #define __pyx_n_u_Host __pyx_string_tab[430] #define __pyx_n_u_HostConnection __pyx_string_tab[431] #define __pyx_n_u_HostConnectionPool __pyx_string_tab[432] #define __pyx_n_u_HostDistance __pyx_string_tab[433] #define __pyx_n_u_HostReconnectionHandler __pyx_string_tab[434] #define __pyx_n_u_HostTargetingStatement __pyx_string_tab[435] #define __pyx_n_u_IGNORED __pyx_string_tab[436] #define __pyx_n_u_IdentityTranslator __pyx_string_tab[437] #define __pyx_n_u_IsBootstrappingErrorMessage __pyx_string_tab[438] #define __pyx_n_u_KEYSPACE __pyx_string_tab[439] #define __pyx_n_u_LEGACY __pyx_string_tab[440] #define __pyx_n_u_LOCAL __pyx_string_tab[441] #define __pyx_n_u_LOCAL_ONE __pyx_string_tab[442] #define __pyx_n_u_LOCAL_QUORUM __pyx_string_tab[443] #define __pyx_n_u_LibevConnection __pyx_string_tab[444] #define __pyx_n_u_Lock __pyx_string_tab[445] #define __pyx_n_u_MINIMUM_NATIVE_ADDRESS_DSE_VERS __pyx_string_tab[446] #define __pyx_n_u_MIN_SUPPORTED __pyx_string_tab[447] #define __pyx_n_u_MOVED_NODE __pyx_string_tab[448] #define __pyx_n_u_Mapping __pyx_string_tab[449] #define __pyx_n_u_Metadata __pyx_string_tab[450] #define __pyx_n_u_Metrics __pyx_string_tab[451] #define __pyx_n_u_MonitorReporter __pyx_string_tab[452] #define __pyx_n_u_MonotonicTimestampGenerator __pyx_string_tab[453] #define __pyx_n_u_NEW_NODE __pyx_string_tab[454] #define __pyx_n_u_NOT_SET __pyx_string_tab[455] #define __pyx_n_u_NeverRetryPolicy __pyx_string_tab[456] #define __pyx_n_u_NoConnectionsAvailable __pyx_string_tab[457] #define __pyx_n_u_NoHostAvailable __pyx_string_tab[458] #define __pyx_n_u_NoHostAvailable___init __pyx_string_tab[459] #define __pyx_n_u_NoSpeculativeExecutionPlan __pyx_string_tab[460] #define __pyx_n_u_NoSpeculativeExecutionPolicy __pyx_string_tab[461] #define __pyx_n_u_NodeInfo __pyx_string_tab[462] #define __pyx_n_u_ONE __pyx_string_tab[463] #define __pyx_n_u_OperationTimedOut __pyx_string_tab[464] #define __pyx_n_u_OverloadedErrorMessage __pyx_string_tab[465] #define __pyx_n_u_PEERS __pyx_string_tab[466] #define __pyx_n_u_PEERS_SCHEMA __pyx_string_tab[467] #define __pyx_n_u_PROFILES __pyx_string_tab[468] #define __pyx_n_u_PagingUnit __pyx_string_tab[469] #define __pyx_n_u_PeersQueryType __pyx_string_tab[470] #define __pyx_n_u_PlainTextAuthProvider __pyx_string_tab[471] #define __pyx_n_u_PrepareMessage __pyx_string_tab[472] #define __pyx_n_u_PreparedQueryNotFound __pyx_string_tab[473] #define __pyx_n_u_PreparedStatement __pyx_string_tab[474] #define __pyx_n_u_PriorityQueue __pyx_string_tab[475] #define __pyx_n_u_ProfileManager __pyx_string_tab[476] #define __pyx_n_u_ProfileManager___init __pyx_string_tab[477] #define __pyx_n_u_ProfileManager__profiles_without __pyx_string_tab[478] #define __pyx_n_u_ProfileManager__profiles_without_2 __pyx_string_tab[479] #define __pyx_n_u_ProfileManager_check_supported __pyx_string_tab[480] #define __pyx_n_u_ProfileManager_default __pyx_string_tab[481] #define __pyx_n_u_ProfileManager_distance __pyx_string_tab[482] #define __pyx_n_u_ProfileManager_distance_locals_g __pyx_string_tab[483] #define __pyx_n_u_ProfileManager_on_add __pyx_string_tab[484] #define __pyx_n_u_ProfileManager_on_down __pyx_string_tab[485] #define __pyx_n_u_ProfileManager_on_remove __pyx_string_tab[486] #define __pyx_n_u_ProfileManager_on_up __pyx_string_tab[487] #define __pyx_n_u_ProfileManager_populate __pyx_string_tab[488] #define __pyx_n_u_ProtocolException __pyx_string_tab[489] #define __pyx_n_u_ProtocolHandler_2 __pyx_string_tab[490] #define __pyx_n_u_ProtocolVersion __pyx_string_tab[491] #define __pyx_n_u_ProtocolVersionUnsupported __pyx_string_tab[492] #define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[493] #define __pyx_n_u_QueryExhausted __pyx_string_tab[494] #define __pyx_n_u_QueryMessage __pyx_string_tab[495] #define __pyx_n_u_QueryTrace __pyx_string_tab[496] #define __pyx_n_u_REMOTE __pyx_string_tab[497] #define __pyx_n_u_REMOVED_NODE __pyx_string_tab[498] #define __pyx_n_u_RESULT_KIND_PREPARED __pyx_string_tab[499] #define __pyx_n_u_RESULT_KIND_ROWS __pyx_string_tab[500] #define __pyx_n_u_RESULT_KIND_SCHEMA_CHANGE __pyx_string_tab[501] #define __pyx_n_u_RESULT_KIND_SET_KEYSPACE __pyx_string_tab[502] #define __pyx_n_u_RESULT_KIND_VOID __pyx_string_tab[503] #define __pyx_n_u_RETHROW __pyx_string_tab[504] #define __pyx_n_u_RETRY __pyx_string_tab[505] #define __pyx_n_u_RETRY_NEXT_HOST __pyx_string_tab[506] #define __pyx_n_u_RLock __pyx_string_tab[507] #define __pyx_n_u_ROWS __pyx_string_tab[508] #define __pyx_n_u_ReadTimeoutErrorMessage __pyx_string_tab[509] #define __pyx_n_u_ReconnectionHandler __pyx_string_tab[510] #define __pyx_n_u_ResponseFuture __pyx_string_tab[511] #define __pyx_n_u_ResponseFuture___init __pyx_string_tab[512] #define __pyx_n_u_ResponseFuture___str __pyx_string_tab[513] #define __pyx_n_u_ResponseFuture__cancel_timer __pyx_string_tab[514] #define __pyx_n_u_ResponseFuture__execute_after_pr __pyx_string_tab[515] #define __pyx_n_u_ResponseFuture__get_query_trace __pyx_string_tab[516] #define __pyx_n_u_ResponseFuture__handle_continuou __pyx_string_tab[517] #define __pyx_n_u_ResponseFuture__handle_retry_dec __pyx_string_tab[518] #define __pyx_n_u_ResponseFuture__handle_retry_dec_2 __pyx_string_tab[519] #define __pyx_n_u_ResponseFuture__make_query_plan __pyx_string_tab[520] #define __pyx_n_u_ResponseFuture__on_speculative_e __pyx_string_tab[521] #define __pyx_n_u_ResponseFuture__on_timeout __pyx_string_tab[522] #define __pyx_n_u_ResponseFuture__query __pyx_string_tab[523] #define __pyx_n_u_ResponseFuture__reprepare __pyx_string_tab[524] #define __pyx_n_u_ResponseFuture__retry __pyx_string_tab[525] #define __pyx_n_u_ResponseFuture__retry_task __pyx_string_tab[526] #define __pyx_n_u_ResponseFuture__set_final_except __pyx_string_tab[527] #define __pyx_n_u_ResponseFuture__set_final_except_2 __pyx_string_tab[528] #define __pyx_n_u_ResponseFuture__set_final_result __pyx_string_tab[529] #define __pyx_n_u_ResponseFuture__set_final_result_2 __pyx_string_tab[530] #define __pyx_n_u_ResponseFuture__set_keyspace_com __pyx_string_tab[531] #define __pyx_n_u_ResponseFuture__set_result __pyx_string_tab[532] #define __pyx_n_u_ResponseFuture__start_timer __pyx_string_tab[533] #define __pyx_n_u_ResponseFuture__time_remaining __pyx_string_tab[534] #define __pyx_n_u_ResponseFuture_add_callback __pyx_string_tab[535] #define __pyx_n_u_ResponseFuture_add_callbacks __pyx_string_tab[536] #define __pyx_n_u_ResponseFuture_add_errback __pyx_string_tab[537] #define __pyx_n_u_ResponseFuture_clear_callbacks __pyx_string_tab[538] #define __pyx_n_u_ResponseFuture_custom_payload __pyx_string_tab[539] #define __pyx_n_u_ResponseFuture_get_all_query_tra __pyx_string_tab[540] #define __pyx_n_u_ResponseFuture_get_query_trace __pyx_string_tab[541] #define __pyx_n_u_ResponseFuture_get_query_trace_i __pyx_string_tab[542] #define __pyx_n_u_ResponseFuture_has_more_pages __pyx_string_tab[543] #define __pyx_n_u_ResponseFuture_result __pyx_string_tab[544] #define __pyx_n_u_ResponseFuture_send_request __pyx_string_tab[545] #define __pyx_n_u_ResponseFuture_start_fetching_ne __pyx_string_tab[546] #define __pyx_n_u_ResponseFuture_warnings __pyx_string_tab[547] #define __pyx_n_u_ResultMessage __pyx_string_tab[548] #define __pyx_n_u_ResultSet __pyx_string_tab[549] #define __pyx_n_u_ResultSet___eq __pyx_string_tab[550] #define __pyx_n_u_ResultSet___getitem __pyx_string_tab[551] #define __pyx_n_u_ResultSet___init __pyx_string_tab[552] #define __pyx_n_u_ResultSet___iter __pyx_string_tab[553] #define __pyx_n_u_ResultSet___nonzero __pyx_string_tab[554] #define __pyx_n_u_ResultSet__enter_list_mode __pyx_string_tab[555] #define __pyx_n_u_ResultSet__fetch_all __pyx_string_tab[556] #define __pyx_n_u_ResultSet__set_current_rows __pyx_string_tab[557] #define __pyx_n_u_ResultSet_all __pyx_string_tab[558] #define __pyx_n_u_ResultSet_cancel_continuous_pagi __pyx_string_tab[559] #define __pyx_n_u_ResultSet_current_rows __pyx_string_tab[560] #define __pyx_n_u_ResultSet_fetch_next_page __pyx_string_tab[561] #define __pyx_n_u_ResultSet_get_all_query_traces __pyx_string_tab[562] #define __pyx_n_u_ResultSet_get_query_trace __pyx_string_tab[563] #define __pyx_n_u_ResultSet_has_more_pages __pyx_string_tab[564] #define __pyx_n_u_ResultSet_next __pyx_string_tab[565] #define __pyx_n_u_ResultSet_one __pyx_string_tab[566] #define __pyx_n_u_ResultSet_paging_state __pyx_string_tab[567] #define __pyx_n_u_ResultSet_was_applied __pyx_string_tab[568] #define __pyx_n_u_RetryPolicy __pyx_string_tab[569] #define __pyx_n_u_SCHEMA_CHANGE __pyx_string_tab[570] #define __pyx_n_u_SELECT_LOCAL __pyx_string_tab[571] #define __pyx_n_u_SELECT_LOCAL_NO_TOKENS __pyx_string_tab[572] #define __pyx_n_u_SELECT_LOCAL_NO_TOKENS_RPC_ADDR __pyx_string_tab[573] #define __pyx_n_u_SELECT_PEERS __pyx_string_tab[574] #define __pyx_n_u_SELECT_PEERS_NO_TOKENS_TEMPLATE __pyx_string_tab[575] #define __pyx_n_u_SELECT_PEERS_NO_TOKENS_V2 __pyx_string_tab[576] #define __pyx_n_u_SELECT_PEERS_V2 __pyx_string_tab[577] #define __pyx_n_u_SELECT_SCHEMA_LOCAL __pyx_string_tab[578] #define __pyx_n_u_SELECT_SCHEMA_PEERS_TEMPLATE __pyx_string_tab[579] #define __pyx_n_u_SELECT_SCHEMA_PEERS_V2 __pyx_string_tab[580] #define __pyx_n_u_SOCK_STREAM __pyx_string_tab[581] #define __pyx_n_u_STATUS_CHANGE __pyx_string_tab[582] #define __pyx_n_u_Scheduler __pyx_string_tab[583] #define __pyx_n_u_Scheduler___init __pyx_string_tab[584] #define __pyx_n_u_Scheduler__insert_task __pyx_string_tab[585] #define __pyx_n_u_Scheduler__log_if_failed __pyx_string_tab[586] #define __pyx_n_u_Scheduler_run __pyx_string_tab[587] #define __pyx_n_u_Scheduler_schedule __pyx_string_tab[588] #define __pyx_n_u_Scheduler_schedule_unique __pyx_string_tab[589] #define __pyx_n_u_Scheduler_shutdown __pyx_string_tab[590] #define __pyx_n_u_SchemaTargetType __pyx_string_tab[591] #define __pyx_n_u_ServerError __pyx_string_tab[592] #define __pyx_n_u_Session __pyx_string_tab[593] #define __pyx_n_u_Session___del __pyx_string_tab[594] #define __pyx_n_u_Session___enter __pyx_string_tab[595] #define __pyx_n_u_Session___exit __pyx_string_tab[596] #define __pyx_n_u_Session___init __pyx_string_tab[597] #define __pyx_n_u_Session___init___locals_genexpr __pyx_string_tab[598] #define __pyx_n_u_Session__check_graph_paging_avai __pyx_string_tab[599] #define __pyx_n_u_Session__create_response_future __pyx_string_tab[600] #define __pyx_n_u_Session__maybe_get_execution_pro __pyx_string_tab[601] #define __pyx_n_u_Session__maybe_set_graph_paging __pyx_string_tab[602] #define __pyx_n_u_Session__on_analytics_master_res __pyx_string_tab[603] #define __pyx_n_u_Session__on_request __pyx_string_tab[604] #define __pyx_n_u_Session__resolve_execution_profi __pyx_string_tab[605] #define __pyx_n_u_Session__set_keyspace_for_all_po __pyx_string_tab[606] #define __pyx_n_u_Session__set_keyspace_for_all_po_2 __pyx_string_tab[607] #define __pyx_n_u_Session__target_analytics_master __pyx_string_tab[608] #define __pyx_n_u_Session__transform_params __pyx_string_tab[609] #define __pyx_n_u_Session__validate_set_legacy_con __pyx_string_tab[610] #define __pyx_n_u_Session_add_or_renew_pool __pyx_string_tab[611] #define __pyx_n_u_Session_add_or_renew_pool_locals __pyx_string_tab[612] #define __pyx_n_u_Session_add_or_renew_pool_locals_2 __pyx_string_tab[613] #define __pyx_n_u_Session_add_request_init_listene __pyx_string_tab[614] #define __pyx_n_u_Session_default_consistency_leve __pyx_string_tab[615] #define __pyx_n_u_Session_default_serial_consisten __pyx_string_tab[616] #define __pyx_n_u_Session_default_timeout __pyx_string_tab[617] #define __pyx_n_u_Session_execute __pyx_string_tab[618] #define __pyx_n_u_Session_execute_async __pyx_string_tab[619] #define __pyx_n_u_Session_execute_concurrent __pyx_string_tab[620] #define __pyx_n_u_Session_execute_concurrent_async __pyx_string_tab[621] #define __pyx_n_u_Session_execute_concurrent_with __pyx_string_tab[622] #define __pyx_n_u_Session_execute_graph __pyx_string_tab[623] #define __pyx_n_u_Session_execute_graph_async __pyx_string_tab[624] #define __pyx_n_u_Session_execution_profile_clone __pyx_string_tab[625] #define __pyx_n_u_Session_get_execution_profile __pyx_string_tab[626] #define __pyx_n_u_Session_get_pool_state __pyx_string_tab[627] #define __pyx_n_u_Session_get_pool_state_locals_ge __pyx_string_tab[628] #define __pyx_n_u_Session_get_pools __pyx_string_tab[629] #define __pyx_n_u_Session_on_down __pyx_string_tab[630] #define __pyx_n_u_Session_on_down_locals_lambda __pyx_string_tab[631] #define __pyx_n_u_Session_on_remove __pyx_string_tab[632] #define __pyx_n_u_Session_prepare __pyx_string_tab[633] #define __pyx_n_u_Session_prepare_on_all_hosts __pyx_string_tab[634] #define __pyx_n_u_Session_remove_pool __pyx_string_tab[635] #define __pyx_n_u_Session_remove_request_init_list __pyx_string_tab[636] #define __pyx_n_u_Session_row_factory __pyx_string_tab[637] #define __pyx_n_u_Session_set_keyspace __pyx_string_tab[638] #define __pyx_n_u_Session_shutdown __pyx_string_tab[639] #define __pyx_n_u_Session_submit __pyx_string_tab[640] #define __pyx_n_u_Session_update_created_pools __pyx_string_tab[641] #define __pyx_n_u_Session_user_type_registered __pyx_string_tab[642] #define __pyx_n_u_Session_user_type_registered_loc __pyx_string_tab[643] #define __pyx_n_u_Session_user_type_registered_loc_2 __pyx_string_tab[644] #define __pyx_n_u_SimpleConvictionPolicy __pyx_string_tab[645] #define __pyx_n_u_SimpleGraphStatement __pyx_string_tab[646] #define __pyx_n_u_SimpleStatement __pyx_string_tab[647] #define __pyx_n_u_SniEndPointFactory __pyx_string_tab[648] #define __pyx_n_u_TABLE __pyx_string_tab[649] #define __pyx_n_u_TOPOLOGY_CHANGE __pyx_string_tab[650] #define __pyx_n_u_TYPE __pyx_string_tab[651] #define __pyx_n_u_Thread __pyx_string_tab[652] #define __pyx_n_u_ThreadPoolExecutor __pyx_string_tab[653] #define __pyx_n_u_TokenAwarePolicy __pyx_string_tab[654] #define __pyx_n_u_TraceUnavailable __pyx_string_tab[655] #define __pyx_n_u_TruncateError __pyx_string_tab[656] #define __pyx_n_u_TwistedConnection __pyx_string_tab[657] #define __pyx_n_u_UNCOMMITTED __pyx_string_tab[658] #define __pyx_n_u_UP __pyx_string_tab[659] #define __pyx_n_u_UnavailableErrorMessage __pyx_string_tab[660] #define __pyx_n_u_UnresolvableContactPoints __pyx_string_tab[661] #define __pyx_n_u_UnsupportedOperation __pyx_string_tab[662] #define __pyx_n_u_UserType __pyx_string_tab[663] #define __pyx_n_u_UserTypeDoesNotExist __pyx_string_tab[664] #define __pyx_n_u_Version __pyx_string_tab[665] #define __pyx_n_u_WeakSet __pyx_string_tab[666] #define __pyx_n_u_WeakValueDictionary __pyx_string_tab[667] #define __pyx_n_u_WriteTimeoutErrorMessage __pyx_string_tab[668] #define __pyx_n_u__8 __pyx_string_tab[669] #define __pyx_n_u_acquire __pyx_string_tab[670] #define __pyx_n_u_add __pyx_string_tab[671] #define __pyx_n_u_addValue __pyx_string_tab[672] #define __pyx_n_u_add_callback __pyx_string_tab[673] #define __pyx_n_u_add_callbacks __pyx_string_tab[674] #define __pyx_n_u_add_done_callback __pyx_string_tab[675] #define __pyx_n_u_add_errback __pyx_string_tab[676] #define __pyx_n_u_add_execution_profile __pyx_string_tab[677] #define __pyx_n_u_add_host __pyx_string_tab[678] #define __pyx_n_u_add_or_renew_pool __pyx_string_tab[679] #define __pyx_n_u_add_or_return_host __pyx_string_tab[680] #define __pyx_n_u_add_prepared __pyx_string_tab[681] #define __pyx_n_u_add_request_init_listener __pyx_string_tab[682] #define __pyx_n_u_addr __pyx_string_tab[683] #define __pyx_n_u_address __pyx_string_tab[684] #define __pyx_n_u_address_translator __pyx_string_tab[685] #define __pyx_n_u_addrinfo_or_none __pyx_string_tab[686] #define __pyx_n_u_aggregate __pyx_string_tab[687] #define __pyx_n_u_agreed __pyx_string_tab[688] #define __pyx_n_u_all __pyx_string_tab[689] #define __pyx_n_u_all_hosts __pyx_string_tab[690] #define __pyx_n_u_allow_beta_protocol_version __pyx_string_tab[691] #define __pyx_n_u_any __pyx_string_tab[692] #define __pyx_n_u_append __pyx_string_tab[693] #define __pyx_n_u_application_name __pyx_string_tab[694] #define __pyx_n_u_application_version __pyx_string_tab[695] #define __pyx_n_u_args __pyx_string_tab[696] #define __pyx_n_u_asyncio_coroutines __pyx_string_tab[697] #define __pyx_n_u_atexit __pyx_string_tab[698] #define __pyx_n_u_attempted_hosts __pyx_string_tab[699] #define __pyx_n_u_attempts __pyx_string_tab[700] #define __pyx_n_u_attr __pyx_string_tab[701] #define __pyx_n_u_attr_name __pyx_string_tab[702] #define __pyx_n_u_auth_exc __pyx_string_tab[703] #define __pyx_n_u_auth_provider __pyx_string_tab[704] #define __pyx_n_u_auth_provider_2 __pyx_string_tab[705] #define __pyx_n_u_auth_provider_callable __pyx_string_tab[706] #define __pyx_n_u_authenticator __pyx_string_tab[707] #define __pyx_n_u_batch_type __pyx_string_tab[708] #define __pyx_n_u_binascii __pyx_string_tab[709] #define __pyx_n_u_bind __pyx_string_tab[710] #define __pyx_n_u_bind_metadata __pyx_string_tab[711] #define __pyx_n_u_bind_params __pyx_string_tab[712] #define __pyx_n_u_block __pyx_string_tab[713] #define __pyx_n_u_bool __pyx_string_tab[714] #define __pyx_n_u_borrow_connection __pyx_string_tab[715] #define __pyx_n_u_broadcast_address __pyx_string_tab[716] #define __pyx_n_u_broadcast_port __pyx_string_tab[717] #define __pyx_n_u_broadcast_rpc_address __pyx_string_tab[718] #define __pyx_n_u_broadcast_rpc_port __pyx_string_tab[719] #define __pyx_n_u_c __pyx_string_tab[720] #define __pyx_n_u_callback __pyx_string_tab[721] #define __pyx_n_u_callback_args __pyx_string_tab[722] #define __pyx_n_u_callback_kwargs __pyx_string_tab[723] #define __pyx_n_u_callback_lock __pyx_string_tab[724] #define __pyx_n_u_callback_partial __pyx_string_tab[725] #define __pyx_n_u_callbacks __pyx_string_tab[726] #define __pyx_n_u_cancel __pyx_string_tab[727] #define __pyx_n_u_cancel_continuous_paging __pyx_string_tab[728] #define __pyx_n_u_cancel_timer __pyx_string_tab[729] #define __pyx_n_u_cassandra __pyx_string_tab[730] #define __pyx_n_u_cassandra_auth __pyx_string_tab[731] #define __pyx_n_u_cassandra_cluster __pyx_string_tab[732] #define __pyx_n_u_cassandra_concurrent __pyx_string_tab[733] #define __pyx_n_u_cassandra_connection __pyx_string_tab[734] #define __pyx_n_u_cassandra_cqltypes __pyx_string_tab[735] #define __pyx_n_u_cassandra_datastax __pyx_string_tab[736] #define __pyx_n_u_cassandra_datastax_graph __pyx_string_tab[737] #define __pyx_n_u_cassandra_datastax_graph_query __pyx_string_tab[738] #define __pyx_n_u_cassandra_datastax_insights_repo __pyx_string_tab[739] #define __pyx_n_u_cassandra_datastax_insights_util __pyx_string_tab[740] #define __pyx_n_u_cassandra_encoder __pyx_string_tab[741] #define __pyx_n_u_cassandra_io_asyncorereactor __pyx_string_tab[742] #define __pyx_n_u_cassandra_io_eventletreactor __pyx_string_tab[743] #define __pyx_n_u_cassandra_io_geventreactor __pyx_string_tab[744] #define __pyx_n_u_cassandra_io_libevreactor __pyx_string_tab[745] #define __pyx_n_u_cassandra_io_twistedreactor __pyx_string_tab[746] #define __pyx_n_u_cassandra_marshal __pyx_string_tab[747] #define __pyx_n_u_cassandra_metadata __pyx_string_tab[748] #define __pyx_n_u_cassandra_metrics __pyx_string_tab[749] #define __pyx_n_u_cassandra_policies __pyx_string_tab[750] #define __pyx_n_u_cassandra_pool __pyx_string_tab[751] #define __pyx_n_u_cassandra_protocol __pyx_string_tab[752] #define __pyx_n_u_cassandra_query __pyx_string_tab[753] #define __pyx_n_u_cassandra_timestamps __pyx_string_tab[754] #define __pyx_n_u_cassandra_util __pyx_string_tab[755] #define __pyx_n_u_cb __pyx_string_tab[756] #define __pyx_n_u_cc_host __pyx_string_tab[757] #define __pyx_n_u_chain __pyx_string_tab[758] #define __pyx_n_u_change_type __pyx_string_tab[759] #define __pyx_n_u_check_graph_paging_available __pyx_string_tab[760] #define __pyx_n_u_check_hostname __pyx_string_tab[761] #define __pyx_n_u_check_supported __pyx_string_tab[762] #define __pyx_n_u_chunks __pyx_string_tab[763] #define __pyx_n_u_cl __pyx_string_tab[764] #define __pyx_n_u_class_getitem __pyx_string_tab[765] #define __pyx_n_u_cleanup_failed_on_up_handling __pyx_string_tab[766] #define __pyx_n_u_clear __pyx_string_tab[767] #define __pyx_n_u_clear_callbacks __pyx_string_tab[768] #define __pyx_n_u_clear_watcher __pyx_string_tab[769] #define __pyx_n_u_client_id __pyx_string_tab[770] #define __pyx_n_u_client_protocol_handler __pyx_string_tab[771] #define __pyx_n_u_cline_in_traceback __pyx_string_tab[772] #define __pyx_n_u_clone __pyx_string_tab[773] #define __pyx_n_u_close __pyx_string_tab[774] #define __pyx_n_u_cloud __pyx_string_tab[775] #define __pyx_n_u_cloud_config __pyx_string_tab[776] #define __pyx_n_u_cls __pyx_string_tab[777] #define __pyx_n_u_cluster __pyx_string_tab[778] #define __pyx_n_u_cluster_2 __pyx_string_tab[779] #define __pyx_n_u_cluster_name __pyx_string_tab[780] #define __pyx_n_u_clusters __pyx_string_tab[781] #define __pyx_n_u_clusters_for_shutdown __pyx_string_tab[782] #define __pyx_n_u_col_names __pyx_string_tab[783] #define __pyx_n_u_col_types __pyx_string_tab[784] #define __pyx_n_u_collections __pyx_string_tab[785] #define __pyx_n_u_collections_abc __pyx_string_tab[786] #define __pyx_n_u_column_encryption_policy __pyx_string_tab[787] #define __pyx_n_u_column_metadata __pyx_string_tab[788] #define __pyx_n_u_column_names __pyx_string_tab[789] #define __pyx_n_u_column_types __pyx_string_tab[790] #define __pyx_n_u_compression __pyx_string_tab[791] #define __pyx_n_u_concurrency __pyx_string_tab[792] #define __pyx_n_u_concurrent_futures __pyx_string_tab[793] #define __pyx_n_u_config_mode __pyx_string_tab[794] #define __pyx_n_u_configure __pyx_string_tab[795] #define __pyx_n_u_conn __pyx_string_tab[796] #define __pyx_n_u_conn_class __pyx_string_tab[797] #define __pyx_n_u_conn_exc __pyx_string_tab[798] #define __pyx_n_u_conn_factory __pyx_string_tab[799] #define __pyx_n_u_conn_fns __pyx_string_tab[800] #define __pyx_n_u_connect __pyx_string_tab[801] #define __pyx_n_u_connect_timeout __pyx_string_tab[802] #define __pyx_n_u_connect_to_remote_hosts __pyx_string_tab[803] #define __pyx_n_u_connected __pyx_string_tab[804] #define __pyx_n_u_connection __pyx_string_tab[805] #define __pyx_n_u_connection_2 __pyx_string_tab[806] #define __pyx_n_u_connection_class __pyx_string_tab[807] #define __pyx_n_u_connection_exc __pyx_string_tab[808] #define __pyx_n_u_connection_factory __pyx_string_tab[809] #define __pyx_n_u_connection_reduce_fn __pyx_string_tab[810] #define __pyx_n_u_consistency __pyx_string_tab[811] #define __pyx_n_u_consistency_level __pyx_string_tab[812] #define __pyx_n_u_consistency_level_explicit __pyx_string_tab[813] #define __pyx_n_u_contact_point __pyx_string_tab[814] #define __pyx_n_u_contact_points __pyx_string_tab[815] #define __pyx_n_u_contact_points_but_no_lbp __pyx_string_tab[816] #define __pyx_n_u_contact_points_explicit __pyx_string_tab[817] #define __pyx_n_u_context __pyx_string_tab[818] #define __pyx_n_u_continuous_paging_options __pyx_string_tab[819] #define __pyx_n_u_continuous_paging_options_2 __pyx_string_tab[820] #define __pyx_n_u_continuous_paging_session __pyx_string_tab[821] #define __pyx_n_u_continuous_paging_state __pyx_string_tab[822] #define __pyx_n_u_continuous_paging_state_2 __pyx_string_tab[823] #define __pyx_n_u_control_conn __pyx_string_tab[824] #define __pyx_n_u_control_conn_disposed __pyx_string_tab[825] #define __pyx_n_u_control_connection __pyx_string_tab[826] #define __pyx_n_u_control_connection_timeout __pyx_string_tab[827] #define __pyx_n_u_conviction_policy_factory __pyx_string_tab[828] #define __pyx_n_u_coordinator_host __pyx_string_tab[829] #define __pyx_n_u_copy __pyx_string_tab[830] #define __pyx_n_u_core_connections __pyx_string_tab[831] #define __pyx_n_u_core_connections_per_host __pyx_string_tab[832] #define __pyx_n_u_count __pyx_string_tab[833] #define __pyx_n_u_count_2 __pyx_string_tab[834] #define __pyx_n_u_cp __pyx_string_tab[835] #define __pyx_n_u_cql_encode_all_types __pyx_string_tab[836] #define __pyx_n_u_cql_version __pyx_string_tab[837] #define __pyx_n_u_create __pyx_string_tab[838] #define __pyx_n_u_create_from_sni __pyx_string_tab[839] #define __pyx_n_u_create_pyopenssl_context __pyx_string_tab[840] #define __pyx_n_u_create_response_future __pyx_string_tab[841] #define __pyx_n_u_create_thread_pool_executor __pyx_string_tab[842] #define __pyx_n_u_create_timer __pyx_string_tab[843] #define __pyx_n_u_current_host __pyx_string_tab[844] #define __pyx_n_u_current_keyspace __pyx_string_tab[845] #define __pyx_n_u_current_rows __pyx_string_tab[846] #define __pyx_n_u_current_rows_2 __pyx_string_tab[847] #define __pyx_n_u_currently_handling_node_up __pyx_string_tab[848] #define __pyx_n_u_custom_payload __pyx_string_tab[849] #define __pyx_n_u_custom_payload_2 __pyx_string_tab[850] #define __pyx_n_u_d __pyx_string_tab[851] #define __pyx_n_u_daemon __pyx_string_tab[852] #define __pyx_n_u_data_center __pyx_string_tab[853] #define __pyx_n_u_datacenter __pyx_string_tab[854] #define __pyx_n_u_dbaas __pyx_string_tab[855] #define __pyx_n_u_debug __pyx_string_tab[856] #define __pyx_n_u_decode __pyx_string_tab[857] #define __pyx_n_u_decode_message __pyx_string_tab[858] #define __pyx_n_u_decoder __pyx_string_tab[859] #define __pyx_n_u_default __pyx_string_tab[860] #define __pyx_n_u_default_consistency_level __pyx_string_tab[861] #define __pyx_n_u_default_consistency_level_2 __pyx_string_tab[862] #define __pyx_n_u_default_fetch_size __pyx_string_tab[863] #define __pyx_n_u_default_lbp_factory __pyx_string_tab[864] #define __pyx_n_u_default_lbp_profiles __pyx_string_tab[865] #define __pyx_n_u_default_load_balancing_policy __pyx_string_tab[866] #define __pyx_n_u_default_profiles __pyx_string_tab[867] #define __pyx_n_u_default_retry_policy __pyx_string_tab[868] #define __pyx_n_u_default_retry_policy_2 __pyx_string_tab[869] #define __pyx_n_u_default_serial_consistency_leve __pyx_string_tab[870] #define __pyx_n_u_default_serial_consistency_level_2 __pyx_string_tab[871] #define __pyx_n_u_default_timeout __pyx_string_tab[872] #define __pyx_n_u_default_timeout_2 __pyx_string_tab[873] #define __pyx_n_u_defaultdict __pyx_string_tab[874] #define __pyx_n_u_defunct __pyx_string_tab[875] #define __pyx_n_u_del __pyx_string_tab[876] #define __pyx_n_u_delay __pyx_string_tab[877] #define __pyx_n_u_delay_for_event_type __pyx_string_tab[878] #define __pyx_n_u_delay_window __pyx_string_tab[879] #define __pyx_n_u_delimiter_index __pyx_string_tab[880] #define __pyx_n_u_dict_factory __pyx_string_tab[881] #define __pyx_n_u_discard __pyx_string_tab[882] #define __pyx_n_u_discard_cluster_shutdown __pyx_string_tab[883] #define __pyx_n_u_discount_down_events __pyx_string_tab[884] #define __pyx_n_u_distance __pyx_string_tab[885] #define __pyx_n_u_distances __pyx_string_tab[886] #define __pyx_n_u_doc __pyx_string_tab[887] #define __pyx_n_u_done __pyx_string_tab[888] #define __pyx_n_u_dscloud __pyx_string_tab[889] #define __pyx_n_u_dse_version __pyx_string_tab[890] #define __pyx_n_u_dse_workload __pyx_string_tab[891] #define __pyx_n_u_dse_workloads __pyx_string_tab[892] #define __pyx_n_u_dumps __pyx_string_tab[893] #define __pyx_n_u_e __pyx_string_tab[894] #define __pyx_n_u_elapsed __pyx_string_tab[895] #define __pyx_n_u_enabled __pyx_string_tab[896] #define __pyx_n_u_encode __pyx_string_tab[897] #define __pyx_n_u_encode_message __pyx_string_tab[898] #define __pyx_n_u_encoder __pyx_string_tab[899] #define __pyx_n_u_endpoint __pyx_string_tab[900] #define __pyx_n_u_endpoint_factory __pyx_string_tab[901] #define __pyx_n_u_endpoint_map_for_insights __pyx_string_tab[902] #define __pyx_n_u_endpoints_resolved __pyx_string_tab[903] #define __pyx_n_u_ensure_core_connections __pyx_string_tab[904] #define __pyx_n_u_ensure_core_connections_2 __pyx_string_tab[905] #define __pyx_n_u_enter __pyx_string_tab[906] #define __pyx_n_u_enter_list_mode __pyx_string_tab[907] #define __pyx_n_u_ep __pyx_string_tab[908] #define __pyx_n_u_eps __pyx_string_tab[909] #define __pyx_n_u_eq __pyx_string_tab[910] #define __pyx_n_u_errback __pyx_string_tab[911] #define __pyx_n_u_errback_args __pyx_string_tab[912] #define __pyx_n_u_errback_kwargs __pyx_string_tab[913] #define __pyx_n_u_errbacks __pyx_string_tab[914] #define __pyx_n_u_error __pyx_string_tab[915] #define __pyx_n_u_error_no_hosts __pyx_string_tab[916] #define __pyx_n_u_errors __pyx_string_tab[917] #define __pyx_n_u_errors_2 __pyx_string_tab[918] #define __pyx_n_u_errors_returned __pyx_string_tab[919] #define __pyx_n_u_event __pyx_string_tab[920] #define __pyx_n_u_event_2 __pyx_string_tab[921] #define __pyx_n_u_event_schedule_times __pyx_string_tab[922] #define __pyx_n_u_event_type __pyx_string_tab[923] #define __pyx_n_u_eventlet __pyx_string_tab[924] #define __pyx_n_u_eventlet_patcher __pyx_string_tab[925] #define __pyx_n_u_events __pyx_string_tab[926] #define __pyx_n_u_evict_udt_class __pyx_string_tab[927] #define __pyx_n_u_exc __pyx_string_tab[928] #define __pyx_n_u_exc_info __pyx_string_tab[929] #define __pyx_n_u_exception __pyx_string_tab[930] #define __pyx_n_u_exception_from_response __pyx_string_tab[931] #define __pyx_n_u_excluded_host __pyx_string_tab[932] #define __pyx_n_u_excs __pyx_string_tab[933] #define __pyx_n_u_execute __pyx_string_tab[934] #define __pyx_n_u_execute_after_prepare __pyx_string_tab[935] #define __pyx_n_u_execute_as __pyx_string_tab[936] #define __pyx_n_u_execute_async __pyx_string_tab[937] #define __pyx_n_u_execute_concurrent __pyx_string_tab[938] #define __pyx_n_u_execute_concurrent_async __pyx_string_tab[939] #define __pyx_n_u_execute_concurrent_with_args __pyx_string_tab[940] #define __pyx_n_u_execute_graph __pyx_string_tab[941] #define __pyx_n_u_execute_graph_async __pyx_string_tab[942] #define __pyx_n_u_execution_profile __pyx_string_tab[943] #define __pyx_n_u_execution_profile_clone_update __pyx_string_tab[944] #define __pyx_n_u_execution_profile_to_string __pyx_string_tab[945] #define __pyx_n_u_execution_profiles __pyx_string_tab[946] #define __pyx_n_u_executor __pyx_string_tab[947] #define __pyx_n_u_executor_2 __pyx_string_tab[948] #define __pyx_n_u_executor_threads __pyx_string_tab[949] #define __pyx_n_u_exit __pyx_string_tab[950] #define __pyx_n_u_expect_host_to_be_down __pyx_string_tab[951] #define __pyx_n_u_expected __pyx_string_tab[952] #define __pyx_n_u_expiring_weakref __pyx_string_tab[953] #define __pyx_n_u_extend __pyx_string_tab[954] #define __pyx_n_u_f __pyx_string_tab[955] #define __pyx_n_u_factory __pyx_string_tab[956] #define __pyx_n_u_fail_on_error __pyx_string_tab[957] #define __pyx_n_u_fetch_all __pyx_string_tab[958] #define __pyx_n_u_fetch_next_page __pyx_string_tab[959] #define __pyx_n_u_fetch_size __pyx_string_tab[960] #define __pyx_n_u_field_name __pyx_string_tab[961] #define __pyx_n_u_field_names __pyx_string_tab[962] #define __pyx_n_u_filter __pyx_string_tab[963] #define __pyx_n_u_final_exception __pyx_string_tab[964] #define __pyx_n_u_final_result __pyx_string_tab[965] #define __pyx_n_u_finalize_add __pyx_string_tab[966] #define __pyx_n_u_finished_future __pyx_string_tab[967] #define __pyx_n_u_fn __pyx_string_tab[968] #define __pyx_n_u_force __pyx_string_tab[969] #define __pyx_n_u_force_token_rebuild __pyx_string_tab[970] #define __pyx_n_u_format __pyx_string_tab[971] #define __pyx_n_u_found_hosts __pyx_string_tab[972] #define __pyx_n_u_from_message __pyx_string_tab[973] #define __pyx_n_u_func __pyx_string_tab[974] #define __pyx_n_u_function __pyx_string_tab[975] #define __pyx_n_u_functools __pyx_string_tab[976] #define __pyx_n_u_future __pyx_string_tab[977] #define __pyx_n_u_future_completed __pyx_string_tab[978] #define __pyx_n_u_future_completed_2 __pyx_string_tab[979] #define __pyx_n_u_futures __pyx_string_tab[980] #define __pyx_n_u_futures_lock __pyx_string_tab[981] #define __pyx_n_u_futures_results __pyx_string_tab[982] #define __pyx_n_u_futurist __pyx_string_tab[983] #define __pyx_n_u_gaierror __pyx_string_tab[984] #define __pyx_n_u_genexpr __pyx_string_tab[985] #define __pyx_n_u_get __pyx_string_tab[986] #define __pyx_n_u_getLogger __pyx_string_tab[987] #define __pyx_n_u_get_all_query_traces __pyx_string_tab[988] #define __pyx_n_u_get_and_set_reconnection_handle __pyx_string_tab[989] #define __pyx_n_u_get_and_set_reconnection_handler __pyx_string_tab[990] #define __pyx_n_u_get_broadcast_address __pyx_string_tab[991] #define __pyx_n_u_get_broadcast_port __pyx_string_tab[992] #define __pyx_n_u_get_broadcast_rpc_address __pyx_string_tab[993] #define __pyx_n_u_get_broadcast_rpc_port __pyx_string_tab[994] #define __pyx_n_u_get_cloud_config __pyx_string_tab[995] #define __pyx_n_u_get_connection_holders __pyx_string_tab[996] #define __pyx_n_u_get_connections __pyx_string_tab[997] #define __pyx_n_u_get_control_connection_host __pyx_string_tab[998] #define __pyx_n_u_get_core_connections_per_host __pyx_string_tab[999] #define __pyx_n_u_get_execution_profile __pyx_string_tab[1000] #define __pyx_n_u_get_host __pyx_string_tab[1001] #define __pyx_n_u_get_lower_supported __pyx_string_tab[1002] #define __pyx_n_u_get_max_connections_per_host __pyx_string_tab[1003] #define __pyx_n_u_get_max_requests_per_connection __pyx_string_tab[1004] #define __pyx_n_u_get_min_requests_per_connection __pyx_string_tab[1005] #define __pyx_n_u_get_options_map __pyx_string_tab[1006] #define __pyx_n_u_get_peers_query __pyx_string_tab[1007] #define __pyx_n_u_get_pool_state __pyx_string_tab[1008] #define __pyx_n_u_get_pools __pyx_string_tab[1009] #define __pyx_n_u_get_query_trace __pyx_string_tab[1010] #define __pyx_n_u_get_query_trace_2 __pyx_string_tab[1011] #define __pyx_n_u_get_query_trace_ids __pyx_string_tab[1012] #define __pyx_n_u_get_schema_mismatches __pyx_string_tab[1013] #define __pyx_n_u_get_state __pyx_string_tab[1014] #define __pyx_n_u_getaddrinfo __pyx_string_tab[1015] #define __pyx_n_u_getitem __pyx_string_tab[1016] #define __pyx_n_u_gevent __pyx_string_tab[1017] #define __pyx_n_u_gevent_socket __pyx_string_tab[1018] #define __pyx_n_u_got __pyx_string_tab[1019] #define __pyx_n_u_graph_engine __pyx_string_tab[1020] #define __pyx_n_u_graph_graphson2_row_factory __pyx_string_tab[1021] #define __pyx_n_u_graph_graphson3_row_factory __pyx_string_tab[1022] #define __pyx_n_u_graph_language __pyx_string_tab[1023] #define __pyx_n_u_graph_name __pyx_string_tab[1024] #define __pyx_n_u_graph_object_row_factory __pyx_string_tab[1025] #define __pyx_n_u_graph_options __pyx_string_tab[1026] #define __pyx_n_u_graph_paging __pyx_string_tab[1027] #define __pyx_n_u_graph_paging_available __pyx_string_tab[1028] #define __pyx_n_u_graph_parameters __pyx_string_tab[1029] #define __pyx_n_u_graph_protocol __pyx_string_tab[1030] #define __pyx_n_u_graph_source __pyx_string_tab[1031] #define __pyx_n_u_groupby __pyx_string_tab[1032] #define __pyx_n_u_h __pyx_string_tab[1033] #define __pyx_n_u_handle_continuous_paging_first __pyx_string_tab[1034] #define __pyx_n_u_handle_retry_decision __pyx_string_tab[1035] #define __pyx_n_u_handle_schema_change __pyx_string_tab[1036] #define __pyx_n_u_handle_status_change __pyx_string_tab[1037] #define __pyx_n_u_handle_topology_change __pyx_string_tab[1038] #define __pyx_n_u_has_continuous_paging_next_pages __pyx_string_tab[1039] #define __pyx_n_u_has_more_pages __pyx_string_tab[1040] #define __pyx_n_u_have_future __pyx_string_tab[1041] #define __pyx_n_u_hex __pyx_string_tab[1042] #define __pyx_n_u_hexlify __pyx_string_tab[1043] #define __pyx_n_u_holders __pyx_string_tab[1044] #define __pyx_n_u_host __pyx_string_tab[1045] #define __pyx_n_u_host_2 __pyx_string_tab[1046] #define __pyx_n_u_host_distance __pyx_string_tab[1047] #define __pyx_n_u_host_dse_version __pyx_string_tab[1048] #define __pyx_n_u_host_endpoint __pyx_string_tab[1049] #define __pyx_n_u_host_errors __pyx_string_tab[1050] #define __pyx_n_u_host_id __pyx_string_tab[1051] #define __pyx_n_u_host_ids __pyx_string_tab[1052] #define __pyx_n_u_host_release_version __pyx_string_tab[1053] #define __pyx_n_u_hosts __pyx_string_tab[1054] #define __pyx_n_u_i __pyx_string_tab[1055] #define __pyx_n_u_idle_heartbeat __pyx_string_tab[1056] #define __pyx_n_u_idle_heartbeat_interval __pyx_string_tab[1057] #define __pyx_n_u_idle_heartbeat_timeout __pyx_string_tab[1058] #define __pyx_n_u_import_fn __pyx_string_tab[1059] #define __pyx_n_u_import_result __pyx_string_tab[1060] #define __pyx_n_u_info __pyx_string_tab[1061] #define __pyx_n_u_init __pyx_string_tab[1062] #define __pyx_n_u_initial_connect_futures __pyx_string_tab[1063] #define __pyx_n_u_initial_response __pyx_string_tab[1064] #define __pyx_n_u_initialize_reactor __pyx_string_tab[1065] #define __pyx_n_u_insert_task __pyx_string_tab[1066] #define __pyx_n_u_int64_pack __pyx_string_tab[1067] #define __pyx_n_u_interval_sec __pyx_string_tab[1068] #define __pyx_n_u_ip __pyx_string_tab[1069] #define __pyx_n_u_is_analytics_source __pyx_string_tab[1070] #define __pyx_n_u_is_batch_statement __pyx_string_tab[1071] #define __pyx_n_u_is_beta_protocol_error __pyx_string_tab[1072] #define __pyx_n_u_is_closed __pyx_string_tab[1073] #define __pyx_n_u_is_control_connection __pyx_string_tab[1074] #define __pyx_n_u_is_core_graph __pyx_string_tab[1075] #define __pyx_n_u_is_coroutine __pyx_string_tab[1076] #define __pyx_n_u_is_currently_reconnecting __pyx_string_tab[1077] #define __pyx_n_u_is_defunct __pyx_string_tab[1078] #define __pyx_n_u_is_down __pyx_string_tab[1079] #define __pyx_n_u_is_eventlet __pyx_string_tab[1080] #define __pyx_n_u_is_eventlet_monkey_patched __pyx_string_tab[1081] #define __pyx_n_u_is_gevent_monkey_patched __pyx_string_tab[1082] #define __pyx_n_u_is_host_addition __pyx_string_tab[1083] #define __pyx_n_u_is_idempotent __pyx_string_tab[1084] #define __pyx_n_u_is_monkey_patched __pyx_string_tab[1085] #define __pyx_n_u_is_schema_agreed __pyx_string_tab[1086] #define __pyx_n_u_is_serial __pyx_string_tab[1087] #define __pyx_n_u_is_set __pyx_string_tab[1088] #define __pyx_n_u_is_setup __pyx_string_tab[1089] #define __pyx_n_u_is_shutdown __pyx_string_tab[1090] #define __pyx_n_u_is_shutdown_2 __pyx_string_tab[1091] #define __pyx_n_u_is_up __pyx_string_tab[1092] #define __pyx_n_u_is_valid_peer __pyx_string_tab[1093] #define __pyx_n_u_items __pyx_string_tab[1094] #define __pyx_n_u_iter __pyx_string_tab[1095] #define __pyx_n_u_itertools __pyx_string_tab[1096] #define __pyx_n_u_join __pyx_string_tab[1097] #define __pyx_n_u_json __pyx_string_tab[1098] #define __pyx_n_u_key __pyx_string_tab[1099] #define __pyx_n_u_keys __pyx_string_tab[1100] #define __pyx_n_u_keyspace __pyx_string_tab[1101] #define __pyx_n_u_keyspace_2 __pyx_string_tab[1102] #define __pyx_n_u_keyspaces __pyx_string_tab[1103] #define __pyx_n_u_kind __pyx_string_tab[1104] #define __pyx_n_u_klass __pyx_string_tab[1105] #define __pyx_n_u_ks_chunk __pyx_string_tab[1106] #define __pyx_n_u_ks_meta __pyx_string_tab[1107] #define __pyx_n_u_ks_metadata __pyx_string_tab[1108] #define __pyx_n_u_ks_statements __pyx_string_tab[1109] #define __pyx_n_u_kwargs __pyx_string_tab[1110] #define __pyx_n_u_kwargs_dict __pyx_string_tab[1111] #define __pyx_n_u_lambda __pyx_string_tab[1112] #define __pyx_n_u_last_error __pyx_string_tab[1113] #define __pyx_n_u_lbp __pyx_string_tab[1114] #define __pyx_n_u_list_mode __pyx_string_tab[1115] #define __pyx_n_u_listen_address __pyx_string_tab[1116] #define __pyx_n_u_listen_port __pyx_string_tab[1117] #define __pyx_n_u_listener __pyx_string_tab[1118] #define __pyx_n_u_listener_lock __pyx_string_tab[1119] #define __pyx_n_u_listeners __pyx_string_tab[1120] #define __pyx_n_u_listeners_2 __pyx_string_tab[1121] #define __pyx_n_u_load_balancer __pyx_string_tab[1122] #define __pyx_n_u_load_balancer_2 __pyx_string_tab[1123] #define __pyx_n_u_load_balancing_policy __pyx_string_tab[1124] #define __pyx_n_u_load_balancing_policy_2 __pyx_string_tab[1125] #define __pyx_n_u_load_balancing_policy_explicit __pyx_string_tab[1126] #define __pyx_n_u_local_address __pyx_string_tab[1127] #define __pyx_n_u_local_query __pyx_string_tab[1128] #define __pyx_n_u_local_result __pyx_string_tab[1129] #define __pyx_n_u_local_row __pyx_string_tab[1130] #define __pyx_n_u_local_rows __pyx_string_tab[1131] #define __pyx_n_u_local_rpc_address_query __pyx_string_tab[1132] #define __pyx_n_u_local_rpc_address_result __pyx_string_tab[1133] #define __pyx_n_u_local_success __pyx_string_tab[1134] #define __pyx_n_u_location __pyx_string_tab[1135] #define __pyx_n_u_lock __pyx_string_tab[1136] #define __pyx_n_u_lock_2 __pyx_string_tab[1137] #define __pyx_n_u_log __pyx_string_tab[1138] #define __pyx_n_u_log_if_failed __pyx_string_tab[1139] #define __pyx_n_u_logging __pyx_string_tab[1140] #define __pyx_n_u_main __pyx_string_tab[1141] #define __pyx_n_u_make_connection_factory __pyx_string_tab[1142] #define __pyx_n_u_make_connection_kwargs __pyx_string_tab[1143] #define __pyx_n_u_make_query_plan __pyx_string_tab[1144] #define __pyx_n_u_make_query_plan_2 __pyx_string_tab[1145] #define __pyx_n_u_mapping __pyx_string_tab[1146] #define __pyx_n_u_master_future __pyx_string_tab[1147] #define __pyx_n_u_master_query_future __pyx_string_tab[1148] #define __pyx_n_u_max_connections __pyx_string_tab[1149] #define __pyx_n_u_max_connections_per_host __pyx_string_tab[1150] #define __pyx_n_u_max_pages __pyx_string_tab[1151] #define __pyx_n_u_max_pages_per_second __pyx_string_tab[1152] #define __pyx_n_u_max_queue_size __pyx_string_tab[1153] #define __pyx_n_u_max_requests __pyx_string_tab[1154] #define __pyx_n_u_max_requests_per_connection __pyx_string_tab[1155] #define __pyx_n_u_max_schema_agreement_wait __pyx_string_tab[1156] #define __pyx_n_u_max_trace_wait __pyx_string_tab[1157] #define __pyx_n_u_max_wait __pyx_string_tab[1158] #define __pyx_n_u_max_wait_per __pyx_string_tab[1159] #define __pyx_n_u_max_wait_sec __pyx_string_tab[1160] #define __pyx_n_u_max_wait_sec_per __pyx_string_tab[1161] #define __pyx_n_u_max_workers __pyx_string_tab[1162] #define __pyx_n_u_maybe_get_execution_profile __pyx_string_tab[1163] #define __pyx_n_u_maybe_set_graph_paging __pyx_string_tab[1164] #define __pyx_n_u_message __pyx_string_tab[1165] #define __pyx_n_u_messages __pyx_string_tab[1166] #define __pyx_n_u_metaclass __pyx_string_tab[1167] #define __pyx_n_u_metadata __pyx_string_tab[1168] #define __pyx_n_u_method_name __pyx_string_tab[1169] #define __pyx_n_u_metrics __pyx_string_tab[1170] #define __pyx_n_u_metrics_2 __pyx_string_tab[1171] #define __pyx_n_u_metrics_enabled __pyx_string_tab[1172] #define __pyx_n_u_min_requests __pyx_string_tab[1173] #define __pyx_n_u_min_requests_per_connection __pyx_string_tab[1174] #define __pyx_n_u_module __pyx_string_tab[1175] #define __pyx_n_u_modules __pyx_string_tab[1176] #define __pyx_n_u_monitor_reporter __pyx_string_tab[1177] #define __pyx_n_u_monitor_reporting_enabled __pyx_string_tab[1178] #define __pyx_n_u_monitor_reporting_interval __pyx_string_tab[1179] #define __pyx_n_u_mro_entries __pyx_string_tab[1180] #define __pyx_n_u_msg __pyx_string_tab[1181] #define __pyx_n_u_murmur3 __pyx_string_tab[1182] #define __pyx_n_u_n __pyx_string_tab[1183] #define __pyx_n_u_name __pyx_string_tab[1184] #define __pyx_n_u_name_2 __pyx_string_tab[1185] #define __pyx_n_u_named_tuple_factory __pyx_string_tab[1186] #define __pyx_n_u_names __pyx_string_tab[1187] #define __pyx_n_u_native_transport_address __pyx_string_tab[1188] #define __pyx_n_u_new __pyx_string_tab[1189] #define __pyx_n_u_new_authenticator __pyx_string_tab[1190] #define __pyx_n_u_new_continuous_paging_session __pyx_string_tab[1191] #define __pyx_n_u_new_f __pyx_string_tab[1192] #define __pyx_n_u_new_handler __pyx_string_tab[1193] #define __pyx_n_u_new_keyspace __pyx_string_tab[1194] #define __pyx_n_u_new_metadata_id __pyx_string_tab[1195] #define __pyx_n_u_new_plan __pyx_string_tab[1196] #define __pyx_n_u_new_pool __pyx_string_tab[1197] #define __pyx_n_u_new_schedule __pyx_string_tab[1198] #define __pyx_n_u_new_session __pyx_string_tab[1199] #define __pyx_n_u_new_version __pyx_string_tab[1200] #define __pyx_n_u_next __pyx_string_tab[1201] #define __pyx_n_u_next_2 __pyx_string_tab[1202] #define __pyx_n_u_next_delay __pyx_string_tab[1203] #define __pyx_n_u_next_execution __pyx_string_tab[1204] #define __pyx_n_u_next_time __pyx_string_tab[1205] #define __pyx_n_u_no_compact __pyx_string_tab[1206] #define __pyx_n_u_nodes __pyx_string_tab[1207] #define __pyx_n_u_nonzero __pyx_string_tab[1208] #define __pyx_n_u_not_done __pyx_string_tab[1209] #define __pyx_n_u_now __pyx_string_tab[1210] #define __pyx_n_u_nt_col_name __pyx_string_tab[1211] #define __pyx_n_u_obj __pyx_string_tab[1212] #define __pyx_n_u_obj_weakref __pyx_string_tab[1213] #define __pyx_n_u_object __pyx_string_tab[1214] #define __pyx_n_u_old __pyx_string_tab[1215] #define __pyx_n_u_old_host __pyx_string_tab[1216] #define __pyx_n_u_old_reconnector __pyx_string_tab[1217] #define __pyx_n_u_on_add __pyx_string_tab[1218] #define __pyx_n_u_on_analytics_master_result __pyx_string_tab[1219] #define __pyx_n_u_on_connection_error __pyx_string_tab[1220] #define __pyx_n_u_on_down __pyx_string_tab[1221] #define __pyx_n_u_on_exception __pyx_string_tab[1222] #define __pyx_n_u_on_ignore __pyx_string_tab[1223] #define __pyx_n_u_on_message __pyx_string_tab[1224] #define __pyx_n_u_on_other_error __pyx_string_tab[1225] #define __pyx_n_u_on_read_timeout __pyx_string_tab[1226] #define __pyx_n_u_on_reconnection __pyx_string_tab[1227] #define __pyx_n_u_on_remove __pyx_string_tab[1228] #define __pyx_n_u_on_request __pyx_string_tab[1229] #define __pyx_n_u_on_request_error __pyx_string_tab[1230] #define __pyx_n_u_on_retry __pyx_string_tab[1231] #define __pyx_n_u_on_speculative_execute __pyx_string_tab[1232] #define __pyx_n_u_on_timeout __pyx_string_tab[1233] #define __pyx_n_u_on_unavailable __pyx_string_tab[1234] #define __pyx_n_u_on_up __pyx_string_tab[1235] #define __pyx_n_u_on_up_future_completed __pyx_string_tab[1236] #define __pyx_n_u_on_write_timeout __pyx_string_tab[1237] #define __pyx_n_u_one __pyx_string_tab[1238] #define __pyx_n_u_open_count __pyx_string_tab[1239] #define __pyx_n_u_operator __pyx_string_tab[1240] #define __pyx_n_u_orphaned_request_ids __pyx_string_tab[1241] #define __pyx_n_u_orphaned_threshold __pyx_string_tab[1242] #define __pyx_n_u_orphaned_threshold_reached __pyx_string_tab[1243] #define __pyx_n_u_other __pyx_string_tab[1244] #define __pyx_n_u_p __pyx_string_tab[1245] #define __pyx_n_u_page_iter __pyx_string_tab[1246] #define __pyx_n_u_page_unit __pyx_string_tab[1247] #define __pyx_n_u_page_unit_bytes __pyx_string_tab[1248] #define __pyx_n_u_paging_state __pyx_string_tab[1249] #define __pyx_n_u_paging_state_2 __pyx_string_tab[1250] #define __pyx_n_u_parameters __pyx_string_tab[1251] #define __pyx_n_u_parsed_rows __pyx_string_tab[1252] #define __pyx_n_u_partial __pyx_string_tab[1253] #define __pyx_n_u_partitioner __pyx_string_tab[1254] #define __pyx_n_u_password __pyx_string_tab[1255] #define __pyx_n_u_patcher __pyx_string_tab[1256] #define __pyx_n_u_peer __pyx_string_tab[1257] #define __pyx_n_u_peers_query __pyx_string_tab[1258] #define __pyx_n_u_peers_query_type __pyx_string_tab[1259] #define __pyx_n_u_peers_result __pyx_string_tab[1260] #define __pyx_n_u_peers_success __pyx_string_tab[1261] #define __pyx_n_u_pk_indexes __pyx_string_tab[1262] #define __pyx_n_u_policy __pyx_string_tab[1263] #define __pyx_n_u_pool __pyx_string_tab[1264] #define __pyx_n_u_pool_finished_setting_keyspace __pyx_string_tab[1265] #define __pyx_n_u_pool_state __pyx_string_tab[1266] #define __pyx_n_u_pool_states __pyx_string_tab[1267] #define __pyx_n_u_pool_wait_timeout __pyx_string_tab[1268] #define __pyx_n_u_pools __pyx_string_tab[1269] #define __pyx_n_u_pop __pyx_string_tab[1270] #define __pyx_n_u_populate __pyx_string_tab[1271] #define __pyx_n_u_port __pyx_string_tab[1272] #define __pyx_n_u_preloaded_results __pyx_string_tab[1273] #define __pyx_n_u_prepare __pyx_string_tab[1274] #define __pyx_n_u_prepare_2 __pyx_string_tab[1275] #define __pyx_n_u_prepare_all_queries __pyx_string_tab[1276] #define __pyx_n_u_prepare_message __pyx_string_tab[1277] #define __pyx_n_u_prepare_on_all_hosts __pyx_string_tab[1278] #define __pyx_n_u_prepared_keyspace __pyx_string_tab[1279] #define __pyx_n_u_prepared_statement __pyx_string_tab[1280] #define __pyx_n_u_prepared_statement_lock __pyx_string_tab[1281] #define __pyx_n_u_prepared_statements __pyx_string_tab[1282] #define __pyx_n_u_previous __pyx_string_tab[1283] #define __pyx_n_u_previous_version __pyx_string_tab[1284] #define __pyx_n_u_product_type __pyx_string_tab[1285] #define __pyx_n_u_profile __pyx_string_tab[1286] #define __pyx_n_u_profile_manager __pyx_string_tab[1287] #define __pyx_n_u_profile_manager_2 __pyx_string_tab[1288] #define __pyx_n_u_profile_name __pyx_string_tab[1289] #define __pyx_n_u_profiles __pyx_string_tab[1290] #define __pyx_n_u_profiles_without_explicit_lbps __pyx_string_tab[1291] #define __pyx_n_u_property __pyx_string_tab[1292] #define __pyx_n_u_protect_name __pyx_string_tab[1293] #define __pyx_n_u_protocol_downgrade __pyx_string_tab[1294] #define __pyx_n_u_protocol_handler __pyx_string_tab[1295] #define __pyx_n_u_protocol_version __pyx_string_tab[1296] #define __pyx_n_u_protocol_version_2 __pyx_string_tab[1297] #define __pyx_n_u_protocol_version_explicit __pyx_string_tab[1298] #define __pyx_n_u_proxy __pyx_string_tab[1299] #define __pyx_n_u_proxy_execute_key __pyx_string_tab[1300] #define __pyx_n_u_put_nowait __pyx_string_tab[1301] #define __pyx_n_u_qualname __pyx_string_tab[1302] #define __pyx_n_u_query __pyx_string_tab[1303] #define __pyx_n_u_query_2 __pyx_string_tab[1304] #define __pyx_n_u_query_cl __pyx_string_tab[1305] #define __pyx_n_u_query_future __pyx_string_tab[1306] #define __pyx_n_u_query_id __pyx_string_tab[1307] #define __pyx_n_u_query_params __pyx_string_tab[1308] #define __pyx_n_u_query_plan __pyx_string_tab[1309] #define __pyx_n_u_query_retries __pyx_string_tab[1310] #define __pyx_n_u_query_string __pyx_string_tab[1311] #define __pyx_n_u_query_template __pyx_string_tab[1312] #define __pyx_n_u_query_traces __pyx_string_tab[1313] #define __pyx_n_u_queue __pyx_string_tab[1314] #define __pyx_n_u_queue_2 __pyx_string_tab[1315] #define __pyx_n_u_rack __pyx_string_tab[1316] #define __pyx_n_u_raise_on_first_error __pyx_string_tab[1317] #define __pyx_n_u_random __pyx_string_tab[1318] #define __pyx_n_u_raw_contact_points __pyx_string_tab[1319] #define __pyx_n_u_re __pyx_string_tab[1320] #define __pyx_n_u_rebuild_token_map __pyx_string_tab[1321] #define __pyx_n_u_reconnect __pyx_string_tab[1322] #define __pyx_n_u_reconnect_2 __pyx_string_tab[1323] #define __pyx_n_u_reconnect_internal __pyx_string_tab[1324] #define __pyx_n_u_reconnection_handler __pyx_string_tab[1325] #define __pyx_n_u_reconnection_handler_2 __pyx_string_tab[1326] #define __pyx_n_u_reconnection_lock __pyx_string_tab[1327] #define __pyx_n_u_reconnection_policy __pyx_string_tab[1328] #define __pyx_n_u_reconnector __pyx_string_tab[1329] #define __pyx_n_u_reduce __pyx_string_tab[1330] #define __pyx_n_u_ref __pyx_string_tab[1331] #define __pyx_n_u_refresh __pyx_string_tab[1332] #define __pyx_n_u_refresh_keyspace_metadata __pyx_string_tab[1333] #define __pyx_n_u_refresh_materialized_view_metada __pyx_string_tab[1334] #define __pyx_n_u_refresh_node_list_and_token_map __pyx_string_tab[1335] #define __pyx_n_u_refresh_node_list_and_token_map_2 __pyx_string_tab[1336] #define __pyx_n_u_refresh_nodes __pyx_string_tab[1337] #define __pyx_n_u_refresh_nodes_if_not_up __pyx_string_tab[1338] #define __pyx_n_u_refresh_schema __pyx_string_tab[1339] #define __pyx_n_u_refresh_schema_2 __pyx_string_tab[1340] #define __pyx_n_u_refresh_schema_and_set_result __pyx_string_tab[1341] #define __pyx_n_u_refresh_schema_metadata __pyx_string_tab[1342] #define __pyx_n_u_refresh_table_metadata __pyx_string_tab[1343] #define __pyx_n_u_refresh_user_aggregate_metadata __pyx_string_tab[1344] #define __pyx_n_u_refresh_user_function_metadata __pyx_string_tab[1345] #define __pyx_n_u_refresh_user_type_metadata __pyx_string_tab[1346] #define __pyx_n_u_register __pyx_string_tab[1347] #define __pyx_n_u_register_cluster_shutdown __pyx_string_tab[1348] #define __pyx_n_u_register_listener __pyx_string_tab[1349] #define __pyx_n_u_register_timeout __pyx_string_tab[1350] #define __pyx_n_u_register_user_type __pyx_string_tab[1351] #define __pyx_n_u_register_watchers __pyx_string_tab[1352] #define __pyx_n_u_release __pyx_string_tab[1353] #define __pyx_n_u_release_version __pyx_string_tab[1354] #define __pyx_n_u_remaining_callbacks __pyx_string_tab[1355] #define __pyx_n_u_remove __pyx_string_tab[1356] #define __pyx_n_u_remove_host __pyx_string_tab[1357] #define __pyx_n_u_remove_pool __pyx_string_tab[1358] #define __pyx_n_u_remove_request_init_listener __pyx_string_tab[1359] #define __pyx_n_u_repr __pyx_string_tab[1360] #define __pyx_n_u_reprepare __pyx_string_tab[1361] #define __pyx_n_u_reprepare_on_up __pyx_string_tab[1362] #define __pyx_n_u_req_id __pyx_string_tab[1363] #define __pyx_n_u_req_id_2 __pyx_string_tab[1364] #define __pyx_n_u_request_encoded_size __pyx_string_tab[1365] #define __pyx_n_u_request_id_2 __pyx_string_tab[1366] #define __pyx_n_u_request_init_callbacks __pyx_string_tab[1367] #define __pyx_n_u_request_timeout __pyx_string_tab[1368] #define __pyx_n_u_request_timeout_key __pyx_string_tab[1369] #define __pyx_n_u_request_timer __pyx_string_tab[1370] #define __pyx_n_u_requests __pyx_string_tab[1371] #define __pyx_n_u_resolve_contact_points_to_strin __pyx_string_tab[1372] #define __pyx_n_u_resolve_execution_profile_optio __pyx_string_tab[1373] #define __pyx_n_u_response __pyx_string_tab[1374] #define __pyx_n_u_response_future __pyx_string_tab[1375] #define __pyx_n_u_responses __pyx_string_tab[1376] #define __pyx_n_u_result __pyx_string_tab[1377] #define __pyx_n_u_result_meta __pyx_string_tab[1378] #define __pyx_n_u_result_metadata __pyx_string_tab[1379] #define __pyx_n_u_result_metadata_id __pyx_string_tab[1380] #define __pyx_n_u_results __pyx_string_tab[1381] #define __pyx_n_u_results_generator __pyx_string_tab[1382] #define __pyx_n_u_retry __pyx_string_tab[1383] #define __pyx_n_u_retry_2 __pyx_string_tab[1384] #define __pyx_n_u_retry_decision __pyx_string_tab[1385] #define __pyx_n_u_retry_num __pyx_string_tab[1386] #define __pyx_n_u_retry_policy __pyx_string_tab[1387] #define __pyx_n_u_retry_policy_2 __pyx_string_tab[1388] #define __pyx_n_u_retry_task __pyx_string_tab[1389] #define __pyx_n_u_retry_type __pyx_string_tab[1390] #define __pyx_n_u_return_connection __pyx_string_tab[1391] #define __pyx_n_u_return_when __pyx_string_tab[1392] #define __pyx_n_u_reuse __pyx_string_tab[1393] #define __pyx_n_u_reuse_connection __pyx_string_tab[1394] #define __pyx_n_u_rf __pyx_string_tab[1395] #define __pyx_n_u_rfind __pyx_string_tab[1396] #define __pyx_n_u_row __pyx_string_tab[1397] #define __pyx_n_u_row_factory __pyx_string_tab[1398] #define __pyx_n_u_row_factory_2 __pyx_string_tab[1399] #define __pyx_n_u_rpc_address __pyx_string_tab[1400] #define __pyx_n_u_run __pyx_string_tab[1401] #define __pyx_n_u_run_add_or_renew_pool __pyx_string_tab[1402] #define __pyx_n_u_run_at __pyx_string_tab[1403] #define __pyx_n_u_run_in_executor __pyx_string_tab[1404] #define __pyx_n_u_run_in_executor_locals_new_f __pyx_string_tab[1405] #define __pyx_n_u_run_now __pyx_string_tab[1406] #define __pyx_n_u_rv __pyx_string_tab[1407] #define __pyx_n_u_s __pyx_string_tab[1408] #define __pyx_n_u_schedule __pyx_string_tab[1409] #define __pyx_n_u_schedule_unique __pyx_string_tab[1410] #define __pyx_n_u_scheduled_tasks __pyx_string_tab[1411] #define __pyx_n_u_scheduler __pyx_string_tab[1412] #define __pyx_n_u_schema_agreement_lock __pyx_string_tab[1413] #define __pyx_n_u_schema_agreement_wait __pyx_string_tab[1414] #define __pyx_n_u_schema_change __pyx_string_tab[1415] #define __pyx_n_u_schema_change_event __pyx_string_tab[1416] #define __pyx_n_u_schema_event_refresh_window __pyx_string_tab[1417] #define __pyx_n_u_schema_event_refresh_window_2 __pyx_string_tab[1418] #define __pyx_n_u_schema_meta_enabled __pyx_string_tab[1419] #define __pyx_n_u_schema_meta_enabled_2 __pyx_string_tab[1420] #define __pyx_n_u_schema_metadata_enabled __pyx_string_tab[1421] #define __pyx_n_u_schema_mismatches __pyx_string_tab[1422] #define __pyx_n_u_schema_ver __pyx_string_tab[1423] #define __pyx_n_u_schema_version __pyx_string_tab[1424] #define __pyx_n_u_sel_local __pyx_string_tab[1425] #define __pyx_n_u_sel_peers __pyx_string_tab[1426] #define __pyx_n_u_select_peers_query __pyx_string_tab[1427] #define __pyx_n_u_self __pyx_string_tab[1428] #define __pyx_n_u_self_weakref __pyx_string_tab[1429] #define __pyx_n_u_send __pyx_string_tab[1430] #define __pyx_n_u_send_chunks __pyx_string_tab[1431] #define __pyx_n_u_send_msg __pyx_string_tab[1432] #define __pyx_n_u_send_request __pyx_string_tab[1433] #define __pyx_n_u_serial_cl __pyx_string_tab[1434] #define __pyx_n_u_serial_consistency_level __pyx_string_tab[1435] #define __pyx_n_u_serialize __pyx_string_tab[1436] #define __pyx_n_u_serialized_parameters __pyx_string_tab[1437] #define __pyx_n_u_serializer __pyx_string_tab[1438] #define __pyx_n_u_session __pyx_string_tab[1439] #define __pyx_n_u_session_id __pyx_string_tab[1440] #define __pyx_n_u_session_register_user_types __pyx_string_tab[1441] #define __pyx_n_u_sessions __pyx_string_tab[1442] #define __pyx_n_u_set __pyx_string_tab[1443] #define __pyx_n_u_set_core_connections_per_host __pyx_string_tab[1444] #define __pyx_n_u_set_current_rows __pyx_string_tab[1445] #define __pyx_n_u_set_default_dbaas_consistency __pyx_string_tab[1446] #define __pyx_n_u_set_down __pyx_string_tab[1447] #define __pyx_n_u_set_final_exception __pyx_string_tab[1448] #define __pyx_n_u_set_final_result __pyx_string_tab[1449] #define __pyx_n_u_set_keyspace __pyx_string_tab[1450] #define __pyx_n_u_set_keyspace_blocking __pyx_string_tab[1451] #define __pyx_n_u_set_keyspace_completed __pyx_string_tab[1452] #define __pyx_n_u_set_keyspace_event __pyx_string_tab[1453] #define __pyx_n_u_set_keyspace_for_all_conns __pyx_string_tab[1454] #define __pyx_n_u_set_keyspace_for_all_pools __pyx_string_tab[1455] #define __pyx_n_u_set_location_info __pyx_string_tab[1456] #define __pyx_n_u_set_max_connections_per_host __pyx_string_tab[1457] #define __pyx_n_u_set_max_requests_per_connection __pyx_string_tab[1458] #define __pyx_n_u_set_meta_refresh_enabled __pyx_string_tab[1459] #define __pyx_n_u_set_min_requests_per_connection __pyx_string_tab[1460] #define __pyx_n_u_set_name __pyx_string_tab[1461] #define __pyx_n_u_set_new_connection __pyx_string_tab[1462] #define __pyx_n_u_set_result __pyx_string_tab[1463] #define __pyx_n_u_set_source_analytics __pyx_string_tab[1464] #define __pyx_n_u_set_up __pyx_string_tab[1465] #define __pyx_n_u_setdefault __pyx_string_tab[1466] #define __pyx_n_u_setter __pyx_string_tab[1467] #define __pyx_n_u_shared_results __pyx_string_tab[1468] #define __pyx_n_u_should_rebuild_token_map __pyx_string_tab[1469] #define __pyx_n_u_shutdown __pyx_string_tab[1470] #define __pyx_n_u_shutdown_clusters __pyx_string_tab[1471] #define __pyx_n_u_signal __pyx_string_tab[1472] #define __pyx_n_u_signal_connection_failure __pyx_string_tab[1473] #define __pyx_n_u_signal_error __pyx_string_tab[1474] #define __pyx_n_u_skip_meta __pyx_string_tab[1475] #define __pyx_n_u_sleep __pyx_string_tab[1476] #define __pyx_n_u_sni_host __pyx_string_tab[1477] #define __pyx_n_u_sni_port __pyx_string_tab[1478] #define __pyx_n_u_socket __pyx_string_tab[1479] #define __pyx_n_u_sockopts __pyx_string_tab[1480] #define __pyx_n_u_spec_delay __pyx_string_tab[1481] #define __pyx_n_u_spec_exec_plan __pyx_string_tab[1482] #define __pyx_n_u_spec_exec_policy __pyx_string_tab[1483] #define __pyx_n_u_spec_execution_plan __pyx_string_tab[1484] #define __pyx_n_u_speculative_execution_plan __pyx_string_tab[1485] #define __pyx_n_u_speculative_execution_policy __pyx_string_tab[1486] #define __pyx_n_u_ssl_context __pyx_string_tab[1487] #define __pyx_n_u_ssl_options __pyx_string_tab[1488] #define __pyx_n_u_start __pyx_string_tab[1489] #define __pyx_n_u_start_fetching_next_page __pyx_string_tab[1490] #define __pyx_n_u_start_reconnector __pyx_string_tab[1491] #define __pyx_n_u_start_time __pyx_string_tab[1492] #define __pyx_n_u_start_time_2 __pyx_string_tab[1493] #define __pyx_n_u_start_timer __pyx_string_tab[1494] #define __pyx_n_u_startup_version __pyx_string_tab[1495] #define __pyx_n_u_statement __pyx_string_tab[1496] #define __pyx_n_u_statement_keyspace __pyx_string_tab[1497] #define __pyx_n_u_statements __pyx_string_tab[1498] #define __pyx_n_u_statements_and_parameters __pyx_string_tab[1499] #define __pyx_n_u_statements_and_parameters_2 __pyx_string_tab[1500] #define __pyx_n_u_staticmethod __pyx_string_tab[1501] #define __pyx_n_u_status_change __pyx_string_tab[1502] #define __pyx_n_u_status_event_refresh_window __pyx_string_tab[1503] #define __pyx_n_u_status_event_refresh_window_2 __pyx_string_tab[1504] #define __pyx_n_u_stop __pyx_string_tab[1505] #define __pyx_n_u_stop_scheduler __pyx_string_tab[1506] #define __pyx_n_u_str __pyx_string_tab[1507] #define __pyx_n_u_stream_id __pyx_string_tab[1508] #define __pyx_n_u_stream_was_orphaned __pyx_string_tab[1509] #define __pyx_n_u_strs_resolved_map __pyx_string_tab[1510] #define __pyx_n_u_submit __pyx_string_tab[1511] #define __pyx_n_u_submit_2 __pyx_string_tab[1512] #define __pyx_n_u_success __pyx_string_tab[1513] #define __pyx_n_u_sum __pyx_string_tab[1514] #define __pyx_n_u_summary __pyx_string_tab[1515] #define __pyx_n_u_super __pyx_string_tab[1516] #define __pyx_n_u_supports_continuous_paging_state __pyx_string_tab[1517] #define __pyx_n_u_sys __pyx_string_tab[1518] #define __pyx_n_u_table __pyx_string_tab[1519] #define __pyx_n_u_target_analytics_master __pyx_string_tab[1520] #define __pyx_n_u_target_type __pyx_string_tab[1521] #define __pyx_n_u_target_type_from_refresh_args __pyx_string_tab[1522] #define __pyx_n_u_targeted_query __pyx_string_tab[1523] #define __pyx_n_u_task __pyx_string_tab[1524] #define __pyx_n_u_test __pyx_string_tab[1525] #define __pyx_n_u_this_time __pyx_string_tab[1526] #define __pyx_n_u_thread __pyx_string_tab[1527] #define __pyx_n_u_threading __pyx_string_tab[1528] #define __pyx_n_u_throw __pyx_string_tab[1529] #define __pyx_n_u_time __pyx_string_tab[1530] #define __pyx_n_u_time_2 __pyx_string_tab[1531] #define __pyx_n_u_time_remaining __pyx_string_tab[1532] #define __pyx_n_u_timeout __pyx_string_tab[1533] #define __pyx_n_u_timeout_2 __pyx_string_tab[1534] #define __pyx_n_u_timer __pyx_string_tab[1535] #define __pyx_n_u_timestamp __pyx_string_tab[1536] #define __pyx_n_u_timestamp_generator __pyx_string_tab[1537] #define __pyx_n_u_to_call __pyx_string_tab[1538] #define __pyx_n_u_to_exception __pyx_string_tab[1539] #define __pyx_n_u_token_map __pyx_string_tab[1540] #define __pyx_n_u_token_meta_enabled __pyx_string_tab[1541] #define __pyx_n_u_token_meta_enabled_2 __pyx_string_tab[1542] #define __pyx_n_u_token_metadata_enabled __pyx_string_tab[1543] #define __pyx_n_u_tokens __pyx_string_tab[1544] #define __pyx_n_u_topology_change __pyx_string_tab[1545] #define __pyx_n_u_topology_event_refresh_window __pyx_string_tab[1546] #define __pyx_n_u_topology_event_refresh_window_2 __pyx_string_tab[1547] #define __pyx_n_u_total_timeout __pyx_string_tab[1548] #define __pyx_n_u_tpe_class __pyx_string_tab[1549] #define __pyx_n_u_trace __pyx_string_tab[1550] #define __pyx_n_u_trace_id __pyx_string_tab[1551] #define __pyx_n_u_tracing __pyx_string_tab[1552] #define __pyx_n_u_transform_params __pyx_string_tab[1553] #define __pyx_n_u_try_asyncore_import __pyx_string_tab[1554] #define __pyx_n_u_try_connect __pyx_string_tab[1555] #define __pyx_n_u_try_eventlet_import __pyx_string_tab[1556] #define __pyx_n_u_try_gevent_import __pyx_string_tab[1557] #define __pyx_n_u_try_libev_import __pyx_string_tab[1558] #define __pyx_n_u_try_reconnect __pyx_string_tab[1559] #define __pyx_n_u_tuple_factory __pyx_string_tab[1560] #define __pyx_n_u_type __pyx_string_tab[1561] #define __pyx_n_u_type_map __pyx_string_tab[1562] #define __pyx_n_u_type_meta __pyx_string_tab[1563] #define __pyx_n_u_udt_name __pyx_string_tab[1564] #define __pyx_n_u_unknown __pyx_string_tab[1565] #define __pyx_n_u_unregister_listener __pyx_string_tab[1566] #define __pyx_n_u_update __pyx_string_tab[1567] #define __pyx_n_u_update_created_pools __pyx_string_tab[1568] #define __pyx_n_u_update_custom_payload __pyx_string_tab[1569] #define __pyx_n_u_update_location_info __pyx_string_tab[1570] #define __pyx_n_u_use_client_timestamp __pyx_string_tab[1571] #define __pyx_n_u_user_type __pyx_string_tab[1572] #define __pyx_n_u_user_type_map __pyx_string_tab[1573] #define __pyx_n_u_user_type_registered __pyx_string_tab[1574] #define __pyx_n_u_user_types __pyx_string_tab[1575] #define __pyx_n_u_user_types_2 __pyx_string_tab[1576] #define __pyx_n_u_username __pyx_string_tab[1577] #define __pyx_n_u_usertype __pyx_string_tab[1578] #define __pyx_n_u_uses_eventlet __pyx_string_tab[1579] #define __pyx_n_u_uses_keyspace_flag __pyx_string_tab[1580] #define __pyx_n_u_uses_native_address_query __pyx_string_tab[1581] #define __pyx_n_u_uses_peers_v2 __pyx_string_tab[1582] #define __pyx_n_u_uses_twisted __pyx_string_tab[1583] #define __pyx_n_u_uuid __pyx_string_tab[1584] #define __pyx_n_u_uuid4 __pyx_string_tab[1585] #define __pyx_n_u_v __pyx_string_tab[1586] #define __pyx_n_u_val __pyx_string_tab[1587] #define __pyx_n_u_valid_insights_version __pyx_string_tab[1588] #define __pyx_n_u_validate_refresh_schema __pyx_string_tab[1589] #define __pyx_n_u_validate_set_legacy_config __pyx_string_tab[1590] #define __pyx_n_u_value __pyx_string_tab[1591] #define __pyx_n_u_values __pyx_string_tab[1592] #define __pyx_n_u_version __pyx_string_tab[1593] #define __pyx_n_u_version_info __pyx_string_tab[1594] #define __pyx_n_u_version_supports_insights __pyx_string_tab[1595] #define __pyx_n_u_versions __pyx_string_tab[1596] #define __pyx_n_u_view __pyx_string_tab[1597] #define __pyx_n_u_wait __pyx_string_tab[1598] #define __pyx_n_u_wait_for_all_pools __pyx_string_tab[1599] #define __pyx_n_u_wait_for_response __pyx_string_tab[1600] #define __pyx_n_u_wait_for_responses __pyx_string_tab[1601] #define __pyx_n_u_wait_for_schema_agreement __pyx_string_tab[1602] #define __pyx_n_u_wait_futures __pyx_string_tab[1603] #define __pyx_n_u_wait_time __pyx_string_tab[1604] #define __pyx_n_u_warn __pyx_string_tab[1605] #define __pyx_n_u_warned_timeout __pyx_string_tab[1606] #define __pyx_n_u_warning __pyx_string_tab[1607] #define __pyx_n_u_warnings __pyx_string_tab[1608] #define __pyx_n_u_warnings_2 __pyx_string_tab[1609] #define __pyx_n_u_was_applied __pyx_string_tab[1610] #define __pyx_n_u_was_up __pyx_string_tab[1611] #define __pyx_n_u_watch_callback __pyx_string_tab[1612] #define __pyx_n_u_weakref __pyx_string_tab[1613] #define __pyx_n_u_workload __pyx_string_tab[1614] #define __pyx_n_u_workloads __pyx_string_tab[1615] #define __pyx_n_u_wraps __pyx_string_tab[1616] #define __pyx_n_u_xs __pyx_string_tab[1617] #define __pyx_kp_b_gremlin_groovy __pyx_string_tab[1618] #define __pyx_kp_b_iso88591_1 __pyx_string_tab[1619] #define __pyx_kp_b_iso88591_1_1_0_1EQ __pyx_string_tab[1620] #define __pyx_kp_b_iso88591_1_1_Q __pyx_string_tab[1621] #define __pyx_kp_b_iso88591_1_1_a __pyx_string_tab[1622] #define __pyx_kp_b_iso88591_1_1_vQa_AQ_AQ_Qd_t4q_6_D_6_D_av __pyx_string_tab[1623] #define __pyx_kp_b_iso88591_1_2 __pyx_string_tab[1624] #define __pyx_kp_b_iso88591_1_3 __pyx_string_tab[1625] #define __pyx_kp_b_iso88591_1_4 __pyx_string_tab[1626] #define __pyx_kp_b_iso88591_1_4q_6_B_4_y_9C_1_Qa_vQ_G1A_wav __pyx_string_tab[1627] #define __pyx_kp_b_iso88591_1_HD_T_wgQ_Kq_q_t9G5_D_S_m2TQR __pyx_string_tab[1628] #define __pyx_kp_b_iso88591_1_HD_xt_RS_A_Ba_4q_4_a_1_5OtST __pyx_string_tab[1629] #define __pyx_kp_b_iso88591_1_q_L_A_G1A_KuAT __pyx_string_tab[1630] #define __pyx_kp_b_iso88591_1_t_8 __pyx_string_tab[1631] #define __pyx_kp_b_iso88591_2_4t_oQlBRR_ffg6LLggmmn __pyx_string_tab[1632] #define __pyx_kp_b_iso88591_2_P_wiq_q_ivV84q_q_vWBd_z_L_a_m __pyx_string_tab[1633] #define __pyx_kp_b_iso88591_2_fD_4AT_DHddppq_4t1_uA_9_q_a_v __pyx_string_tab[1634] #define __pyx_kp_b_iso88591_31_4z_1_1A_4_S_1_AQ_5_4_q_A_8_q __pyx_string_tab[1635] #define __pyx_kp_b_iso88591_31_Q_r_Rt1_6c9SSTTggh_c_QoQ_Q_e __pyx_string_tab[1636] #define __pyx_kp_b_iso88591_44SSoop_t_q_7BUU_ggh __pyx_string_tab[1637] #define __pyx_kp_b_iso88591_4M_AF_q_1_1_7_Q_w_6a_Q_4q_L_m1 __pyx_string_tab[1638] #define __pyx_kp_b_iso88591_4_CuD_A_hh_A_q_N_Jb_4_G1_L_at1 __pyx_string_tab[1639] #define __pyx_kp_b_iso88591_4_Q_QfJa_1_1_as_iq_H_6avZq_q_81 __pyx_string_tab[1640] #define __pyx_kp_b_iso88591_4y_Ya_q __pyx_string_tab[1641] #define __pyx_kp_b_iso88591_66Fa_4_c_d2DCq_4q_4_AT1A_3jPQ __pyx_string_tab[1642] #define __pyx_kp_b_iso88591_6_7Gq_VW_Qa_xwa_3Fa __pyx_string_tab[1643] #define __pyx_kp_b_iso88591_6a_4t_oQlBRRZZccmmsst6LLggmmn __pyx_string_tab[1644] #define __pyx_kp_b_iso88591_6j_7q_aR_t_W_LIUhhvv_H_H_O_O_P __pyx_string_tab[1645] #define __pyx_kp_b_iso88591_7_WWX_M_M_A_A_AQ_a __pyx_string_tab[1646] #define __pyx_kp_b_iso88591_83a_d_t87_aq_4q_4AQ_1_4AQ_1_Q_Q __pyx_string_tab[1647] #define __pyx_kp_b_iso88591_99QQR_Zwj_IQ_A_1_t1_t1_T_q_6_0 __pyx_string_tab[1648] #define __pyx_kp_b_iso88591_9Be5_1 __pyx_string_tab[1649] #define __pyx_kp_b_iso88591_9_HE_gU_uC_T_Q_q_nAV7_ST_2_a_wa __pyx_string_tab[1650] #define __pyx_kp_b_iso88591_9_q_SST_22PPQ_Kq_O_s_nCwha_Kq_I __pyx_string_tab[1651] #define __pyx_kp_b_iso88591_A __pyx_string_tab[1652] #define __pyx_kp_b_iso88591_A2_G5_4_gQ_9AV4q_a __pyx_string_tab[1653] #define __pyx_kp_b_iso88591_A45_L_q_avQa_0_PPQ_E_5Rz_n_Q_4q __pyx_string_tab[1654] #define __pyx_kp_b_iso88591_AJ_7_D_a_t_1_at_HA_q __pyx_string_tab[1655] #define __pyx_kp_b_iso88591_A_1F_RS __pyx_string_tab[1656] #define __pyx_kp_b_iso88591_A_1L_1_aq_q_A_MYZZ_y_AQ_a_9_Qa_G __pyx_string_tab[1657] #define __pyx_kp_b_iso88591_A_1_1_1_1_1_1_q __pyx_string_tab[1658] #define __pyx_kp_b_iso88591_A_1_1_4q_Qj_xvS_4q_t_j_81_1_F_M __pyx_string_tab[1659] #define __pyx_kp_b_iso88591_A_1_AQ __pyx_string_tab[1660] #define __pyx_kp_b_iso88591_A_2 __pyx_string_tab[1661] #define __pyx_kp_b_iso88591_A_2Q __pyx_string_tab[1662] #define __pyx_kp_b_iso88591_A_2S_9_Qa_t __pyx_string_tab[1663] #define __pyx_kp_b_iso88591_A_3 __pyx_string_tab[1664] #define __pyx_kp_b_iso88591_A_31A __pyx_string_tab[1665] #define __pyx_kp_b_iso88591_A_31_Q_QgQ_O1A_q_q_E_aq_4x_S_1_j __pyx_string_tab[1666] #define __pyx_kp_b_iso88591_A_3b_z_1_t1_j_s_j __pyx_string_tab[1667] #define __pyx_kp_b_iso88591_A_4 __pyx_string_tab[1668] #define __pyx_kp_b_iso88591_A_4RRSS_SWWiijSWWXSWWX_1_at_ha __pyx_string_tab[1669] #define __pyx_kp_b_iso88591_A_4_1_xq_DDWWaab_L_KuAT_a_1 __pyx_string_tab[1670] #define __pyx_kp_b_iso88591_A_4_3k_T_s_1_I_XQa_a_1_I_V1A_q __pyx_string_tab[1671] #define __pyx_kp_b_iso88591_A_4_9C_1_1_t7_1 __pyx_string_tab[1672] #define __pyx_kp_b_iso88591_A_4_A_a_C_Bd_4_AQ_AQ_q_1 __pyx_string_tab[1673] #define __pyx_kp_b_iso88591_A_4_A_a_a_8 __pyx_string_tab[1674] #define __pyx_kp_b_iso88591_A_4_A_a_d_Qa_q_9_4r __pyx_string_tab[1675] #define __pyx_kp_b_iso88591_A_4_H4I_WX_a_TTXXhhi_Zq_HA_e4t_D __pyx_string_tab[1676] #define __pyx_kp_b_iso88591_A_4_Rq_D_IZ_q_t_Na __pyx_string_tab[1677] #define __pyx_kp_b_iso88591_A_4_S_1_AQ_Q_Kq __pyx_string_tab[1678] #define __pyx_kp_b_iso88591_A_4_S_1_AQ_a_Kq __pyx_string_tab[1679] #define __pyx_kp_b_iso88591_A_4_q __pyx_string_tab[1680] #define __pyx_kp_b_iso88591_A_4_q_9_T_q __pyx_string_tab[1681] #define __pyx_kp_b_iso88591_A_4_q_A_1_HD_1_t_1_q_gQd_xr_q_q __pyx_string_tab[1682] #define __pyx_kp_b_iso88591_A_4_y_s_a_4_t_4AQ_a_2_it1_Jd_q_1 __pyx_string_tab[1683] #define __pyx_kp_b_iso88591_A_4q __pyx_string_tab[1684] #define __pyx_kp_b_iso88591_A_4q_1_Q_9_Q __pyx_string_tab[1685] #define __pyx_kp_b_iso88591_A_4q_4D8PPQQYYZ_axt1_a_d_a_4q_a __pyx_string_tab[1686] #define __pyx_kp_b_iso88591_A_4q_4q_A_N_at1_q __pyx_string_tab[1687] #define __pyx_kp_b_iso88591_A_4q_4q_a_PPRRS_4_q_xq_bbc_Kq_N __pyx_string_tab[1688] #define __pyx_kp_b_iso88591_A_4q_4z_WA_Q_HG1D __pyx_string_tab[1689] #define __pyx_kp_b_iso88591_A_4q_5_t_Rq_iq_XQa_iq_1_a __pyx_string_tab[1690] #define __pyx_kp_b_iso88591_A_4q_6_Oq_t1_6_UUV_t1_6_1_q_6_Q __pyx_string_tab[1691] #define __pyx_kp_b_iso88591_A_4q_6_a_IQ_Jaq_KuAT_Qa_L_A_Jaq __pyx_string_tab[1692] #define __pyx_kp_b_iso88591_A_4q_A_A_B_o_9_r_jjk_81A_Z_q_q __pyx_string_tab[1693] #define __pyx_kp_b_iso88591_A_4q_A_t4_q_4t1_4t_1_d_4q_4uA_t1 __pyx_string_tab[1694] #define __pyx_kp_b_iso88591_A_4q_D_G1F_M __pyx_string_tab[1695] #define __pyx_kp_b_iso88591_A_4q_HAT __pyx_string_tab[1696] #define __pyx_kp_b_iso88591_A_4q_T_WHA_AQ_z __pyx_string_tab[1697] #define __pyx_kp_b_iso88591_A_4q_T_t_d2B_1FRUUaab_A_KuAT_D_q __pyx_string_tab[1698] #define __pyx_kp_b_iso88591_A_4q_Ya_9_IYit_c_PQ __pyx_string_tab[1699] #define __pyx_kp_b_iso88591_A_4q_at1_d_4_6Fat8S_bbc __pyx_string_tab[1700] #define __pyx_kp_b_iso88591_A_4q_wa __pyx_string_tab[1701] #define __pyx_kp_b_iso88591_A_4t1_4xy_q_XQ __pyx_string_tab[1702] #define __pyx_kp_b_iso88591_A_4t1_Q_H_D_G6_Q_M_M __pyx_string_tab[1703] #define __pyx_kp_b_iso88591_A_4t1_T_c_1_Qa_HD_Zq_vQ_DA __pyx_string_tab[1704] #define __pyx_kp_b_iso88591_A_4t7_t1 __pyx_string_tab[1705] #define __pyx_kp_b_iso88591_A_4t_D_A_6_MQ_Q_0_Q_Qd_7wa_1_a_E __pyx_string_tab[1706] #define __pyx_kp_b_iso88591_A_4t_Faq __pyx_string_tab[1707] #define __pyx_kp_b_iso88591_A_4t_oQlBRRZZccmmsst6LLggmmn __pyx_string_tab[1708] #define __pyx_kp_b_iso88591_A_4t_oQlBRR_ffppyyz6LLggmmn __pyx_string_tab[1709] #define __pyx_kp_b_iso88591_A_4uCt4q_0 __pyx_string_tab[1710] #define __pyx_kp_b_iso88591_A_4vQ_t1_1_at_xq_q __pyx_string_tab[1711] #define __pyx_kp_b_iso88591_A_4x_S_1_A_q_d_Kq_H_Kq __pyx_string_tab[1712] #define __pyx_kp_b_iso88591_A_4x_q_81A_q_D_he1_AQ_AWD_Qa __pyx_string_tab[1713] #define __pyx_kp_b_iso88591_A_4xs_2_a_Q_4_5_47H_hh6G_TUUaaee __pyx_string_tab[1714] #define __pyx_kp_b_iso88591_A_4y_1_1_M_4z_4uA __pyx_string_tab[1715] #define __pyx_kp_b_iso88591_A_4z_a_AQ_Q_A_4q_m_gQl_Whhi_AQ_A __pyx_string_tab[1716] #define __pyx_kp_b_iso88591_A_5_D_Qa_uA_2_1 __pyx_string_tab[1717] #define __pyx_kp_b_iso88591_A_6_AT_Q_t9_8_Q_Q_4q_gQ_H_i_1_vQ __pyx_string_tab[1718] #define __pyx_kp_b_iso88591_A_6_Gq_T_Qd_Mccd_4q_fA_1_I_0_4t9 __pyx_string_tab[1719] #define __pyx_kp_b_iso88591_A_6_Ja __pyx_string_tab[1720] #define __pyx_kp_b_iso88591_A_6d_1 __pyx_string_tab[1721] #define __pyx_kp_b_iso88591_A_7 __pyx_string_tab[1722] #define __pyx_kp_b_iso88591_A_7_1 __pyx_string_tab[1723] #define __pyx_kp_b_iso88591_A_7_1_4_y_q_4wa_00_11A __pyx_string_tab[1724] #define __pyx_kp_b_iso88591_A_7s_2_ZZ_6a __pyx_string_tab[1725] #define __pyx_kp_b_iso88591_A_7t1A __pyx_string_tab[1726] #define __pyx_kp_b_iso88591_A_81A_wa_gQ_waq_q_q_e83j_A_6_J_P __pyx_string_tab[1727] #define __pyx_kp_b_iso88591_A_8_1_xs __pyx_string_tab[1728] #define __pyx_kp_b_iso88591_A_9N_HC_q_t_as_4_Q_81_LFR_I_7q_e __pyx_string_tab[1729] #define __pyx_kp_b_iso88591_A_A __pyx_string_tab[1730] #define __pyx_kp_b_iso88591_A_AQ_Fa __pyx_string_tab[1731] #define __pyx_kp_b_iso88591_A_AQ_q_a __pyx_string_tab[1732] #define __pyx_kp_b_iso88591_A_AT_6aq_F_6_q_1G6_q __pyx_string_tab[1733] #define __pyx_kp_b_iso88591_A_A_2 __pyx_string_tab[1734] #define __pyx_kp_b_iso88591_A_A_3m1Cs_D_Cq_9_j_y_1_q_Q_y_1 __pyx_string_tab[1735] #define __pyx_kp_b_iso88591_A_A_Qd_4q_AQ_HE_gWA_AZq __pyx_string_tab[1736] #define __pyx_kp_b_iso88591_A_A_q_aq_waz_Q_q_4t1_N_AZt1_WAZ __pyx_string_tab[1737] #define __pyx_kp_b_iso88591_A_Cwe1_Jaq_AQ_MQ __pyx_string_tab[1738] #define __pyx_kp_b_iso88591_A_D_2T_Ct1_vQ_jjk_0_1EQ __pyx_string_tab[1739] #define __pyx_kp_b_iso88591_A_D_d_q_d_Q_4s_A_Jb_F_Rq_Ba_q __pyx_string_tab[1740] #define __pyx_kp_b_iso88591_A_D_j_A_a __pyx_string_tab[1741] #define __pyx_kp_b_iso88591_A_E_YgQ_31 __pyx_string_tab[1742] #define __pyx_kp_b_iso88591_A_E_YgQ_6 __pyx_string_tab[1743] #define __pyx_kp_b_iso88591_A_E_YgQ_7_1 __pyx_string_tab[1744] #define __pyx_kp_b_iso88591_A_E_YgQ_81A __pyx_string_tab[1745] #define __pyx_kp_b_iso88591_A_E_YgQ_9AYa __pyx_string_tab[1746] #define __pyx_kp_b_iso88591_A_E_YgQ_Qa __pyx_string_tab[1747] #define __pyx_kp_b_iso88591_A_E_at1_7_1Ja_wat1_q __pyx_string_tab[1748] #define __pyx_kp_b_iso88591_A_F_q_fA_5_t1_QgQ_vQ_QQR __pyx_string_tab[1749] #define __pyx_kp_b_iso88591_A_G1F_q_gQ __pyx_string_tab[1750] #define __pyx_kp_b_iso88591_A_G1_A_6_gYc1B_QTTU_j_T_1D_SST_t __pyx_string_tab[1751] #define __pyx_kp_b_iso88591_A_G2T_q __pyx_string_tab[1752] #define __pyx_kp_b_iso88591_A_G2T_q_2 __pyx_string_tab[1753] #define __pyx_kp_b_iso88591_A_HAQ __pyx_string_tab[1754] #define __pyx_kp_b_iso88591_A_HAQ_xq_KuAT_q_q_7q __pyx_string_tab[1755] #define __pyx_kp_b_iso88591_A_HA_Qa __pyx_string_tab[1756] #define __pyx_kp_b_iso88591_A_IQ __pyx_string_tab[1757] #define __pyx_kp_b_iso88591_A_IQgXQ_q __pyx_string_tab[1758] #define __pyx_kp_b_iso88591_A_IZt1_IT_q __pyx_string_tab[1759] #define __pyx_kp_b_iso88591_A_Ja_4t7_t4q_Jd_2C_PQQWW_t_G1_4 __pyx_string_tab[1760] #define __pyx_kp_b_iso88591_A_Je_1_Je1_M_iq_e1_Ja_F __pyx_string_tab[1761] #define __pyx_kp_b_iso88591_A_Jl_l_86_AZz __pyx_string_tab[1762] #define __pyx_kp_b_iso88591_A_KuAT_QgWG1_A __pyx_string_tab[1763] #define __pyx_kp_b_iso88591_A_L_vQa_O1_L_A_a_A_A_1_IU_d_Q_q __pyx_string_tab[1764] #define __pyx_kp_b_iso88591_A_M_fE_a __pyx_string_tab[1765] #define __pyx_kp_b_iso88591_A_N_1_4uA_9Jiq_q __pyx_string_tab[1766] #define __pyx_kp_b_iso88591_A_N_4z_y_U_Rt1_A_e1_G4q_A __pyx_string_tab[1767] #define __pyx_kp_b_iso88591_A_N_4z_y_U_Rt1_e1_G4q_A __pyx_string_tab[1768] #define __pyx_kp_b_iso88591_A_N_a_gQ_7_1_uCt89A_d_Qa_nCq_A_1 __pyx_string_tab[1769] #define __pyx_kp_b_iso88591_A_N_d_X_1_Ks_Q_q_A_a_Q_Qa_t_WA_I __pyx_string_tab[1770] #define __pyx_kp_b_iso88591_A_Q_HD_1_t_IQa_4wd_1_Q_t5_4q_9C __pyx_string_tab[1771] #define __pyx_kp_b_iso88591_A_Qa_t_Q __pyx_string_tab[1772] #define __pyx_kp_b_iso88591_A_Qd_Q_wat_Jd_TI_dde __pyx_string_tab[1773] #define __pyx_kp_b_iso88591_A_Qe1_1_vQ_J_1 __pyx_string_tab[1774] #define __pyx_kp_b_iso88591_A_Qha __pyx_string_tab[1775] #define __pyx_kp_b_iso88591_A_Qj_t_HAZt_NhVW __pyx_string_tab[1776] #define __pyx_kp_b_iso88591_A_Ql __pyx_string_tab[1777] #define __pyx_kp_b_iso88591_A_T_A_t9IQm __pyx_string_tab[1778] #define __pyx_kp_b_iso88591_A_T_N __pyx_string_tab[1779] #define __pyx_kp_b_iso88591_A_WAT_Gv_YZ_T_8_1_c_Q __pyx_string_tab[1780] #define __pyx_kp_b_iso88591_A_a_1 __pyx_string_tab[1781] #define __pyx_kp_b_iso88591_A_a_4q_d_d_4q_A_q __pyx_string_tab[1782] #define __pyx_kp_b_iso88591_A_a_Q __pyx_string_tab[1783] #define __pyx_kp_b_iso88591_A_a_q_1_vQ_a_vQ __pyx_string_tab[1784] #define __pyx_kp_b_iso88591_A_c_z_S_RS __pyx_string_tab[1785] #define __pyx_kp_b_iso88591_A_d_N_a_q_hd_HD8K4q __pyx_string_tab[1786] #define __pyx_kp_b_iso88591_A_d_Qa_a_YYZ_1_a_1_iq_HHAYa __pyx_string_tab[1787] #define __pyx_kp_b_iso88591_A_e1A_gU_1_t9IYavQ_s_D_a_A_uCq_I __pyx_string_tab[1788] #define __pyx_kp_b_iso88591_A_e1A_gU_1_t9IYavQ_s_S_Cq_t_33a __pyx_string_tab[1789] #define __pyx_kp_b_iso88591_A_fJa_1_xq __pyx_string_tab[1790] #define __pyx_kp_b_iso88591_A_m1_d_1_FfFRS_J_PXX___T_Q_4_V8S __pyx_string_tab[1791] #define __pyx_kp_b_iso88591_A_q __pyx_string_tab[1792] #define __pyx_kp_b_iso88591_A_q_M_77Gs_L_4O3a __pyx_string_tab[1793] #define __pyx_kp_b_iso88591_A_q_O1_O1_aq_N_N __pyx_string_tab[1794] #define __pyx_kp_b_iso88591_A_q_Zt9D __pyx_string_tab[1795] #define __pyx_kp_b_iso88591_A_q_xx_1_q __pyx_string_tab[1796] #define __pyx_kp_b_iso88591_A_t __pyx_string_tab[1797] #define __pyx_kp_b_iso88591_A_t1 __pyx_string_tab[1798] #define __pyx_kp_b_iso88591_A_t1A __pyx_string_tab[1799] #define __pyx_kp_b_iso88591_A_t1D __pyx_string_tab[1800] #define __pyx_kp_b_iso88591_A_t1I_7q_T_D_TU_t1O4s_axq_gT_Ct1 __pyx_string_tab[1801] #define __pyx_kp_b_iso88591_A_t1_2 __pyx_string_tab[1802] #define __pyx_kp_b_iso88591_A_t1_3 __pyx_string_tab[1803] #define __pyx_kp_b_iso88591_A_t1_4 __pyx_string_tab[1804] #define __pyx_kp_b_iso88591_A_t1_5 __pyx_string_tab[1805] #define __pyx_kp_b_iso88591_A_t1_5_D_T_1_3a_vQa_A __pyx_string_tab[1806] #define __pyx_kp_b_iso88591_A_t1_Cwd_QfF_t1_1_vQa_wc_U_XQa_F __pyx_string_tab[1807] #define __pyx_kp_b_iso88591_A_t1_O1_4q_Q_Jiq_y_KuAT_9A_IYa __pyx_string_tab[1808] #define __pyx_kp_b_iso88591_A_t1_O1_Jd_AT_4q_q_HE_gWA __pyx_string_tab[1809] #define __pyx_kp_b_iso88591_A_t1_t1_A_vQa_t1_L_a_O1 __pyx_string_tab[1810] #define __pyx_kp_b_iso88591_A_t1_t_D_A_t9IYat_q_1_1_d_m_LA_J __pyx_string_tab[1811] #define __pyx_kp_b_iso88591_A_t4y_t9IWBha_q __pyx_string_tab[1812] #define __pyx_kp_b_iso88591_A_t7 __pyx_string_tab[1813] #define __pyx_kp_b_iso88591_A_t7_avQ_1_vQ_8_4wat1_1 __pyx_string_tab[1814] #define __pyx_kp_b_iso88591_A_t9AQ __pyx_string_tab[1815] #define __pyx_kp_b_iso88591_A_t_0 __pyx_string_tab[1816] #define __pyx_kp_b_iso88591_A_t_1 __pyx_string_tab[1817] #define __pyx_kp_b_iso88591_A_t_1_2 __pyx_string_tab[1818] #define __pyx_kp_b_iso88591_A_t_2 __pyx_string_tab[1819] #define __pyx_kp_b_iso88591_A_t_81 __pyx_string_tab[1820] #define __pyx_kp_b_iso88591_A_t_Q __pyx_string_tab[1821] #define __pyx_kp_b_iso88591_A_t_Qa __pyx_string_tab[1822] #define __pyx_kp_b_iso88591_A_t_a __pyx_string_tab[1823] #define __pyx_kp_b_iso88591_A_t_a_2 __pyx_string_tab[1824] #define __pyx_kp_b_iso88591_A_t_aq __pyx_string_tab[1825] #define __pyx_kp_b_iso88591_A_t_c_8_1 __pyx_string_tab[1826] #define __pyx_kp_b_iso88591_A_uA __pyx_string_tab[1827] #define __pyx_kp_b_iso88591_A_vQa_O1_G_b_3a_E __pyx_string_tab[1828] #define __pyx_kp_b_iso88591_A_vZq_4_UUVVW __pyx_string_tab[1829] #define __pyx_kp_b_iso88591_A_waq_a __pyx_string_tab[1830] #define __pyx_kp_b_iso88591_A_wb_3ar_d_r_t2Q_31L_l_AQQRRVVaa __pyx_string_tab[1831] #define __pyx_kp_b_iso88591_BBS_T_B_B_C_q_I_Vllm __pyx_string_tab[1832] #define __pyx_kp_b_iso88591_BB___4y_1_q_0B_0_4t_T_vQa_1_4q __pyx_string_tab[1833] #define __pyx_kp_b_iso88591_C1_4t_oQlBRR_ggqq_6LLggmmn __pyx_string_tab[1834] #define __pyx_kp_b_iso88591_MMh_i_T_T_U_r_C_Pffyyz __pyx_string_tab[1835] #define __pyx_kp_b_iso88591_Oq_4q_1D_T_eSTTWWXX_q __pyx_string_tab[1836] #define __pyx_kp_b_iso88591_PPQ_0_1_1_q __pyx_string_tab[1837] #define __pyx_kp_b_iso88591_Q __pyx_string_tab[1838] #define __pyx_kp_b_iso88591_Q_t1_t_1D_fIQ_vQ_Fiq_a_q __pyx_string_tab[1839] #define __pyx_kp_b_iso88591_Q_t3a_1E_Rxq __pyx_string_tab[1840] #define __pyx_kp_b_iso88591_Qa __pyx_string_tab[1841] #define __pyx_kp_b_iso88591_Qa_2 __pyx_string_tab[1842] #define __pyx_kp_b_iso88591_U_1_1 __pyx_string_tab[1843] #define __pyx_kp_b_iso88591_U_1_y __pyx_string_tab[1844] #define __pyx_kp_b_iso88591_YYuuv_4x_S_1_Ba_4z_D_q_4wa_A_q __pyx_string_tab[1845] #define __pyx_kp_b_iso88591_Zq_Q_33H_A_31_A_31_S_q_5Q_q_Q_M __pyx_string_tab[1846] #define __pyx_kp_b_iso88591_Zq_Q_q_q_C_7q_Q_U_14K_YZ4NN___4 __pyx_string_tab[1847] #define __pyx_kp_b_iso88591_Zt3H __pyx_string_tab[1848] #define __pyx_kp_b_iso88591__13 __pyx_string_tab[1849] #define __pyx_kp_b_iso88591__14 __pyx_string_tab[1850] #define __pyx_kp_b_iso88591__15 __pyx_string_tab[1851] #define __pyx_kp_b_iso88591_a_4t_oQ6LLggmmn __pyx_string_tab[1852] #define __pyx_kp_b_iso88591_a_4t_oQlBRRYYbbllqqr6LLggmmn __pyx_string_tab[1853] #define __pyx_kp_b_iso88591_a_A_1_a_uCq_q_Q __pyx_string_tab[1854] #define __pyx_kp_b_iso88591_a_a __pyx_string_tab[1855] #define __pyx_kp_b_iso88591_a_t1_5Qd_H_q_vQ_WW_a_a_q __pyx_string_tab[1856] #define __pyx_kp_b_iso88591_a_t_31A __pyx_string_tab[1857] #define __pyx_kp_b_iso88591_aq __pyx_string_tab[1858] #define __pyx_kp_b_iso88591_oQ_t1_oQa_t4q_6_t1_8_1_L_A_IQj __pyx_string_tab[1859] #define __pyx_kp_b_iso88591_q __pyx_string_tab[1860] #define __pyx_kp_b_iso88591_q_6_4IQ __pyx_string_tab[1861] #define __pyx_kp_b_iso88591_q_Kq_IQ_L_IU_Ja_q_L_q_q_XQ_Kwa __pyx_string_tab[1862] #define __pyx_kp_b_iso88591_q_Q __pyx_string_tab[1863] #define __pyx_kp_b_iso88591_q_q_G9A_q_G1A_Cs __pyx_string_tab[1864] #define __pyx_kp_b_iso88591_v_F_6_q_q_q __pyx_string_tab[1865] #define __pyx_kp_b_iso88591_waq_q_at9A_t1 __pyx_string_tab[1866] #define __pyx_kp_b_iso88591_waz_x_A_q __pyx_string_tab[1867] #define __pyx_kp_b_iso88591_wc_q_6_F __pyx_string_tab[1868] #define __pyx_kp_b_iso88591_xq_7_6_A_7_1_1_vQ_Fa_q_e_33j_A __pyx_string_tab[1869] #define __pyx_kp_b_iso88591_xwa_q_7q __pyx_string_tab[1870] #define __pyx_n_b_g __pyx_string_tab[1871] #define __pyx_float_0_1 __pyx_number_tab[0] #define __pyx_float_0_2 __pyx_number_tab[1] #define __pyx_float_1_0 __pyx_number_tab[2] #define __pyx_float_2_0 __pyx_number_tab[3] #define __pyx_float_5_0 __pyx_number_tab[4] #define __pyx_float_0_01 __pyx_number_tab[5] #define __pyx_float_10_0 __pyx_number_tab[6] #define __pyx_float_30_0 __pyx_number_tab[7] #define __pyx_float_600_0 __pyx_number_tab[8] #define __pyx_int_0 __pyx_number_tab[9] #define __pyx_int_neg_1 __pyx_number_tab[10] #define __pyx_int_1 __pyx_number_tab[11] #define __pyx_int_2 __pyx_number_tab[12] #define __pyx_int_3 __pyx_number_tab[13] #define __pyx_int_4 __pyx_number_tab[14] #define __pyx_int_5 __pyx_number_tab[15] #define __pyx_int_7 __pyx_number_tab[16] #define __pyx_int_8 __pyx_number_tab[17] #define __pyx_int_10 __pyx_number_tab[18] #define __pyx_int_30 __pyx_number_tab[19] #define __pyx_int_100 __pyx_number_tab[20] #define __pyx_int_126 __pyx_number_tab[21] #define __pyx_int_127 __pyx_number_tab[22] #define __pyx_int_1000 __pyx_number_tab[23] #define __pyx_int_5000 __pyx_number_tab[24] #define __pyx_int_9042 __pyx_number_tab[25] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #if CYTHON_PEP489_MULTI_PHASE_INIT __Pyx_State_RemoveModule(NULL); #endif Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_defaults); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_defaults); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_defaults1); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_defaults1); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_defaults2); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_defaults2); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception); Py_CLEAR(clear_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr); Py_CLEAR(clear_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr); for (int i=0; i<37; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<262; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } for (int i=0; i<1872; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } for (int i=0; i<26; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_clear_contents ### */ /* CommonTypesMetaclass.module_state_clear */ Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); /* CythonFunctionShared.module_state_clear */ Py_CLEAR(clear_module_state->__pyx_CyFunctionType); /* Generator.module_state_clear */ Py_CLEAR(clear_module_state->__pyx_GeneratorType); /* #### Code section: module_state_clear_end ### */ return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_defaults); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_defaults); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_defaults1); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_defaults1); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_defaults2); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_defaults2); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception); Py_VISIT(traverse_module_state->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr); Py_VISIT(traverse_module_state->__pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr); for (int i=0; i<37; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<262; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } for (int i=0; i<1872; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } for (int i=0; i<26; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_traverse_contents ### */ /* CommonTypesMetaclass.module_state_traverse */ Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); /* CythonFunctionShared.module_state_traverse */ Py_VISIT(traverse_module_state->__pyx_CyFunctionType); /* Generator.module_state_traverse */ Py_VISIT(traverse_module_state->__pyx_GeneratorType); /* #### Code section: module_state_traverse_end ### */ return 0; } #endif /* #### Code section: module_code ### */ /* "cassandra/cluster.py":115 * from cassandra.util import WeakSet # NOQA * * def _is_gevent_monkey_patched(): # <<<<<<<<<<<<<< * if 'gevent.monkey' not in sys.modules: * return False */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_1_is_gevent_monkey_patched(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_1_is_gevent_monkey_patched = {"_is_gevent_monkey_patched", (PyCFunction)__pyx_pw_9cassandra_7cluster_1_is_gevent_monkey_patched, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_1_is_gevent_monkey_patched(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_gevent_monkey_patched (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster__is_gevent_monkey_patched(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster__is_gevent_monkey_patched(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_gevent = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_gevent_monkey_patched", 0); /* "cassandra/cluster.py":116 * * def _is_gevent_monkey_patched(): * if 'gevent.monkey' not in sys.modules: # <<<<<<<<<<<<<< * return False * import gevent.socket */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u_gevent_monkey, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":117 * def _is_gevent_monkey_patched(): * if 'gevent.monkey' not in sys.modules: * return False # <<<<<<<<<<<<<< * import gevent.socket * return socket.socket is gevent.socket.socket */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":116 * * def _is_gevent_monkey_patched(): * if 'gevent.monkey' not in sys.modules: # <<<<<<<<<<<<<< * return False * import gevent.socket */ } /* "cassandra/cluster.py":118 * if 'gevent.monkey' not in sys.modules: * return False * import gevent.socket # <<<<<<<<<<<<<< * return socket.socket is gevent.socket.socket * */ __pyx_t_4 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_gevent_socket, 0, 0, NULL, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 118, __pyx_L1_error) __pyx_t_2 = __pyx_t_4; __Pyx_GOTREF(__pyx_t_2); __pyx_v_gevent = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":119 * return False * import gevent.socket * return socket.socket is gevent.socket.socket # <<<<<<<<<<<<<< * * def _try_gevent_import(): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_gevent, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (__pyx_t_1 == __pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "cassandra/cluster.py":115 * from cassandra.util import WeakSet # NOQA * * def _is_gevent_monkey_patched(): # <<<<<<<<<<<<<< * if 'gevent.monkey' not in sys.modules: * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster._is_gevent_monkey_patched", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_gevent); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":121 * return socket.socket is gevent.socket.socket * * def _try_gevent_import(): # <<<<<<<<<<<<<< * if _is_gevent_monkey_patched(): * from cassandra.io.geventreactor import GeventConnection */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_3_try_gevent_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_3_try_gevent_import = {"_try_gevent_import", (PyCFunction)__pyx_pw_9cassandra_7cluster_3_try_gevent_import, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_3_try_gevent_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_try_gevent_import (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_2_try_gevent_import(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_2_try_gevent_import(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_GeventConnection = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_gevent_import", 0); /* "cassandra/cluster.py":122 * * def _try_gevent_import(): * if _is_gevent_monkey_patched(): # <<<<<<<<<<<<<< * from cassandra.io.geventreactor import GeventConnection * return (GeventConnection,None) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_gevent_monkey_patched); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":123 * def _try_gevent_import(): * if _is_gevent_monkey_patched(): * from cassandra.io.geventreactor import GeventConnection # <<<<<<<<<<<<<< * return (GeventConnection,None) * else: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GeventConnection}; __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_geventreactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L1_error) } __pyx_t_1 = __pyx_t_6; __Pyx_GOTREF(__pyx_t_1); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GeventConnection}; __pyx_t_7 = 0; { __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); switch (__pyx_t_7) { case 0: __Pyx_INCREF(__pyx_t_3); __pyx_v_GeventConnection = __pyx_t_3; break; default:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":124 * if _is_gevent_monkey_patched(): * from cassandra.io.geventreactor import GeventConnection * return (GeventConnection,None) # <<<<<<<<<<<<<< * else: * return (None,None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_GeventConnection); __Pyx_GIVEREF(__pyx_v_GeventConnection); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_GeventConnection) != (0)) __PYX_ERR(0, 124, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 124, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":122 * * def _try_gevent_import(): * if _is_gevent_monkey_patched(): # <<<<<<<<<<<<<< * from cassandra.io.geventreactor import GeventConnection * return (GeventConnection,None) */ } /* "cassandra/cluster.py":126 * return (GeventConnection,None) * else: * return (None,None) # <<<<<<<<<<<<<< * * def _is_eventlet_monkey_patched(): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[0]); __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; } /* "cassandra/cluster.py":121 * return socket.socket is gevent.socket.socket * * def _try_gevent_import(): # <<<<<<<<<<<<<< * if _is_gevent_monkey_patched(): * from cassandra.io.geventreactor import GeventConnection */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster._try_gevent_import", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_GeventConnection); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":128 * return (None,None) * * def _is_eventlet_monkey_patched(): # <<<<<<<<<<<<<< * if 'eventlet.patcher' not in sys.modules: * return False */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_5_is_eventlet_monkey_patched(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_5_is_eventlet_monkey_patched = {"_is_eventlet_monkey_patched", (PyCFunction)__pyx_pw_9cassandra_7cluster_5_is_eventlet_monkey_patched, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_5_is_eventlet_monkey_patched(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_eventlet_monkey_patched (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_4_is_eventlet_monkey_patched(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_4_is_eventlet_monkey_patched(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_eventlet = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; 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; size_t __pyx_t_9; int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_eventlet_monkey_patched", 0); /* "cassandra/cluster.py":129 * * def _is_eventlet_monkey_patched(): * if 'eventlet.patcher' not in sys.modules: # <<<<<<<<<<<<<< * return False * try: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_modules); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_kp_u_eventlet_patcher, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":130 * def _is_eventlet_monkey_patched(): * if 'eventlet.patcher' not in sys.modules: * return False # <<<<<<<<<<<<<< * try: * import eventlet.patcher */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":129 * * def _is_eventlet_monkey_patched(): * if 'eventlet.patcher' not in sys.modules: # <<<<<<<<<<<<<< * return False * try: */ } /* "cassandra/cluster.py":131 * if 'eventlet.patcher' not in sys.modules: * return False * try: # <<<<<<<<<<<<<< * import eventlet.patcher * return eventlet.patcher.is_monkey_patched('socket') */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":132 * return False * try: * import eventlet.patcher # <<<<<<<<<<<<<< * return eventlet.patcher.is_monkey_patched('socket') * # Another case related to PYTHON-1364 */ __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_eventlet_patcher, 0, 0, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 132, __pyx_L4_error) __pyx_t_2 = __pyx_t_7; __Pyx_GOTREF(__pyx_t_2); __pyx_v_eventlet = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":133 * try: * import eventlet.patcher * return eventlet.patcher.is_monkey_patched('socket') # <<<<<<<<<<<<<< * # Another case related to PYTHON-1364 * except AttributeError: */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_eventlet, __pyx_mstate_global->__pyx_n_u_patcher); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = __pyx_t_8; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_socket}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_monkey_patched, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L8_try_return; /* "cassandra/cluster.py":131 * if 'eventlet.patcher' not in sys.modules: * return False * try: # <<<<<<<<<<<<<< * import eventlet.patcher * return eventlet.patcher.is_monkey_patched('socket') */ } __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":135 * return eventlet.patcher.is_monkey_patched('socket') * # Another case related to PYTHON-1364 * except AttributeError: # <<<<<<<<<<<<<< * return False * */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError)))); if (__pyx_t_10) { __Pyx_ErrRestore(0,0,0); /* "cassandra/cluster.py":136 * # Another case related to PYTHON-1364 * except AttributeError: * return False # <<<<<<<<<<<<<< * * def _try_eventlet_import(): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L7_except_return; } goto __pyx_L6_except_error; /* "cassandra/cluster.py":131 * if 'eventlet.patcher' not in sys.modules: * return False * try: # <<<<<<<<<<<<<< * import eventlet.patcher * return eventlet.patcher.is_monkey_patched('socket') */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L8_try_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; __pyx_L7_except_return:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L0; } /* "cassandra/cluster.py":128 * return (None,None) * * def _is_eventlet_monkey_patched(): # <<<<<<<<<<<<<< * if 'eventlet.patcher' not in sys.modules: * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster._is_eventlet_monkey_patched", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_eventlet); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":138 * return False * * def _try_eventlet_import(): # <<<<<<<<<<<<<< * if _is_eventlet_monkey_patched(): * from cassandra.io.eventletreactor import EventletConnection */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7_try_eventlet_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7_try_eventlet_import = {"_try_eventlet_import", (PyCFunction)__pyx_pw_9cassandra_7cluster_7_try_eventlet_import, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7_try_eventlet_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_try_eventlet_import (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_6_try_eventlet_import(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_6_try_eventlet_import(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_EventletConnection = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_eventlet_import", 0); /* "cassandra/cluster.py":139 * * def _try_eventlet_import(): * if _is_eventlet_monkey_patched(): # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * return (EventletConnection,None) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_is_eventlet_monkey_patched); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":140 * def _try_eventlet_import(): * if _is_eventlet_monkey_patched(): * from cassandra.io.eventletreactor import EventletConnection # <<<<<<<<<<<<<< * return (EventletConnection,None) * else: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_EventletConnection}; __pyx_t_6 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_eventletreactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) } __pyx_t_1 = __pyx_t_6; __Pyx_GOTREF(__pyx_t_1); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_EventletConnection}; __pyx_t_7 = 0; { __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_7]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); switch (__pyx_t_7) { case 0: __Pyx_INCREF(__pyx_t_3); __pyx_v_EventletConnection = __pyx_t_3; break; default:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":141 * if _is_eventlet_monkey_patched(): * from cassandra.io.eventletreactor import EventletConnection * return (EventletConnection,None) # <<<<<<<<<<<<<< * else: * return (None,None) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_EventletConnection); __Pyx_GIVEREF(__pyx_v_EventletConnection); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_EventletConnection) != (0)) __PYX_ERR(0, 141, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 141, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":139 * * def _try_eventlet_import(): * if _is_eventlet_monkey_patched(): # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * return (EventletConnection,None) */ } /* "cassandra/cluster.py":143 * return (EventletConnection,None) * else: * return (None,None) # <<<<<<<<<<<<<< * * def _try_libev_import(): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_mstate_global->__pyx_tuple[0]); __pyx_r = __pyx_mstate_global->__pyx_tuple[0]; goto __pyx_L0; } /* "cassandra/cluster.py":138 * return False * * def _try_eventlet_import(): # <<<<<<<<<<<<<< * if _is_eventlet_monkey_patched(): * from cassandra.io.eventletreactor import EventletConnection */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster._try_eventlet_import", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_EventletConnection); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":145 * return (None,None) * * def _try_libev_import(): # <<<<<<<<<<<<<< * try: * from cassandra.io.libevreactor import LibevConnection */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9_try_libev_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9_try_libev_import = {"_try_libev_import", (PyCFunction)__pyx_pw_9cassandra_7cluster_9_try_libev_import, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9_try_libev_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_try_libev_import (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_8_try_libev_import(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_8_try_libev_import(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_LibevConnection = NULL; PyObject *__pyx_v_e = 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; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_libev_import", 0); /* "cassandra/cluster.py":146 * * def _try_libev_import(): * try: # <<<<<<<<<<<<<< * from cassandra.io.libevreactor import LibevConnection * return (LibevConnection,None) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":147 * def _try_libev_import(): * try: * from cassandra.io.libevreactor import LibevConnection # <<<<<<<<<<<<<< * return (LibevConnection,None) * except DependencyException as e: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LibevConnection}; __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_libevreactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L3_error) } __pyx_t_4 = __pyx_t_5; __Pyx_GOTREF(__pyx_t_4); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_LibevConnection}; __pyx_t_6 = 0; { __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_6]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 147, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); switch (__pyx_t_6) { case 0: __Pyx_INCREF(__pyx_t_7); __pyx_v_LibevConnection = __pyx_t_7; break; default:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":148 * try: * from cassandra.io.libevreactor import LibevConnection * return (LibevConnection,None) # <<<<<<<<<<<<<< * except DependencyException as e: * return (None, e) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_LibevConnection); __Pyx_GIVEREF(__pyx_v_LibevConnection); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_LibevConnection) != (0)) __PYX_ERR(0, 148, __pyx_L3_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 148, __pyx_L3_error); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":146 * * def _try_libev_import(): * try: # <<<<<<<<<<<<<< * from cassandra.io.libevreactor import LibevConnection * return (LibevConnection,None) */ } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":149 * from cassandra.io.libevreactor import LibevConnection * return (LibevConnection,None) * except DependencyException as e: # <<<<<<<<<<<<<< * return (None, e) * */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DependencyException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ErrRestore(__pyx_t_4, __pyx_t_7, __pyx_t_8); __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster._try_libev_import", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 149, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; /*try:*/ { /* "cassandra/cluster.py":150 * return (LibevConnection,None) * except DependencyException as e: * return (None, e) # <<<<<<<<<<<<<< * * def _try_asyncore_import(): */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, Py_None) != (0)) __PYX_ERR(0, 150, __pyx_L14_error); __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_e) != (0)) __PYX_ERR(0, 150, __pyx_L14_error); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L13_return; } /* "cassandra/cluster.py":149 * from cassandra.io.libevreactor import LibevConnection * return (LibevConnection,None) * except DependencyException as e: # <<<<<<<<<<<<<< * return (None, e) * */ /*finally:*/ { __pyx_L14_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ( unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_13, __pyx_t_14); __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L5_except_error; } __pyx_L13_return: { __pyx_t_17 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; __pyx_r = __pyx_t_17; __pyx_t_17 = 0; goto __pyx_L6_except_return; } } } goto __pyx_L5_except_error; /* "cassandra/cluster.py":146 * * def _try_libev_import(): * try: # <<<<<<<<<<<<<< * from cassandra.io.libevreactor import LibevConnection * return (LibevConnection,None) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; } /* "cassandra/cluster.py":145 * return (None,None) * * def _try_libev_import(): # <<<<<<<<<<<<<< * try: * from cassandra.io.libevreactor import LibevConnection */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster._try_libev_import", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_LibevConnection); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":152 * return (None, e) * * def _try_asyncore_import(): # <<<<<<<<<<<<<< * try: * from cassandra.io.asyncorereactor import AsyncoreConnection */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_11_try_asyncore_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_11_try_asyncore_import = {"_try_asyncore_import", (PyCFunction)__pyx_pw_9cassandra_7cluster_11_try_asyncore_import, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_11_try_asyncore_import(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_try_asyncore_import (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_10_try_asyncore_import(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_try_asyncore_import(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_AsyncoreConnection = NULL; PyObject *__pyx_v_e = 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; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; char const *__pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_asyncore_import", 0); /* "cassandra/cluster.py":153 * * def _try_asyncore_import(): * try: # <<<<<<<<<<<<<< * from cassandra.io.asyncorereactor import AsyncoreConnection * return (AsyncoreConnection,None) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":154 * def _try_asyncore_import(): * try: * from cassandra.io.asyncorereactor import AsyncoreConnection # <<<<<<<<<<<<<< * return (AsyncoreConnection,None) * except DependencyException as e: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AsyncoreConnection}; __pyx_t_5 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_asyncorereactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L3_error) } __pyx_t_4 = __pyx_t_5; __Pyx_GOTREF(__pyx_t_4); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_AsyncoreConnection}; __pyx_t_6 = 0; { __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_4, __pyx_imported_names[__pyx_t_6]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 154, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); switch (__pyx_t_6) { case 0: __Pyx_INCREF(__pyx_t_7); __pyx_v_AsyncoreConnection = __pyx_t_7; break; default:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":155 * try: * from cassandra.io.asyncorereactor import AsyncoreConnection * return (AsyncoreConnection,None) # <<<<<<<<<<<<<< * except DependencyException as e: * return (None, e) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_AsyncoreConnection); __Pyx_GIVEREF(__pyx_v_AsyncoreConnection); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_AsyncoreConnection) != (0)) __PYX_ERR(0, 155, __pyx_L3_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None) != (0)) __PYX_ERR(0, 155, __pyx_L3_error); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":153 * * def _try_asyncore_import(): * try: # <<<<<<<<<<<<<< * from cassandra.io.asyncorereactor import AsyncoreConnection * return (AsyncoreConnection,None) */ } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":156 * from cassandra.io.asyncorereactor import AsyncoreConnection * return (AsyncoreConnection,None) * except DependencyException as e: # <<<<<<<<<<<<<< * return (None, e) * */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DependencyException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 156, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ErrRestore(__pyx_t_4, __pyx_t_7, __pyx_t_8); __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster._try_asyncore_import", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 156, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; /*try:*/ { /* "cassandra/cluster.py":157 * return (AsyncoreConnection,None) * except DependencyException as e: * return (None, e) # <<<<<<<<<<<<<< * * def _connection_reduce_fn(val,import_fn): */ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, Py_None) != (0)) __PYX_ERR(0, 157, __pyx_L14_error); __Pyx_INCREF(__pyx_v_e); __Pyx_GIVEREF(__pyx_v_e); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_e) != (0)) __PYX_ERR(0, 157, __pyx_L14_error); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L13_return; } /* "cassandra/cluster.py":156 * from cassandra.io.asyncorereactor import AsyncoreConnection * return (AsyncoreConnection,None) * except DependencyException as e: # <<<<<<<<<<<<<< * return (None, e) * */ /*finally:*/ { __pyx_L14_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ExceptionSwap(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17); if ( unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_13, &__pyx_t_14) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_13, &__pyx_t_14); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_10 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_12 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_13, __pyx_t_14); __pyx_t_5 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_12; goto __pyx_L5_except_error; } __pyx_L13_return: { __pyx_t_17 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; __pyx_r = __pyx_t_17; __pyx_t_17 = 0; goto __pyx_L6_except_return; } } } goto __pyx_L5_except_error; /* "cassandra/cluster.py":153 * * def _try_asyncore_import(): * try: # <<<<<<<<<<<<<< * from cassandra.io.asyncorereactor import AsyncoreConnection * return (AsyncoreConnection,None) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; } /* "cassandra/cluster.py":152 * return (None, e) * * def _try_asyncore_import(): # <<<<<<<<<<<<<< * try: * from cassandra.io.asyncorereactor import AsyncoreConnection */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster._try_asyncore_import", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_AsyncoreConnection); __Pyx_XDECREF(__pyx_v_e); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":159 * return (None, e) * * def _connection_reduce_fn(val,import_fn): # <<<<<<<<<<<<<< * (rv, excs) = val * # If we've already found a workable Connection class return immediately */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_13_connection_reduce_fn(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_13_connection_reduce_fn = {"_connection_reduce_fn", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_13_connection_reduce_fn, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_13_connection_reduce_fn(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_val = 0; PyObject *__pyx_v_import_fn = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_connection_reduce_fn (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_val,&__pyx_mstate_global->__pyx_n_u_import_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 159, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 159, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 159, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_connection_reduce_fn", 0) < (0)) __PYX_ERR(0, 159, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_connection_reduce_fn", 1, 2, 2, i); __PYX_ERR(0, 159, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 159, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 159, __pyx_L3_error) } __pyx_v_val = values[0]; __pyx_v_import_fn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_connection_reduce_fn", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 159, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._connection_reduce_fn", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_12_connection_reduce_fn(__pyx_self, __pyx_v_val, __pyx_v_import_fn); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_12_connection_reduce_fn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_val, PyObject *__pyx_v_import_fn) { PyObject *__pyx_v_rv = NULL; PyObject *__pyx_v_excs = NULL; PyObject *__pyx_v_import_result = NULL; PyObject *__pyx_v_exc = 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)(PyObject *); int __pyx_t_5; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_connection_reduce_fn", 0); /* "cassandra/cluster.py":160 * * def _connection_reduce_fn(val,import_fn): * (rv, excs) = val # <<<<<<<<<<<<<< * # If we've already found a workable Connection class return immediately * if rv: */ if ((likely(PyTuple_CheckExact(__pyx_v_val))) || (PyList_CheckExact(__pyx_v_val))) { PyObject* sequence = __pyx_v_val; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 160, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 160, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 160, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_rv = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_excs = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":162 * (rv, excs) = val * # If we've already found a workable Connection class return immediately * if rv: # <<<<<<<<<<<<<< * return val * (import_result, exc) = import_fn() */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_rv); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 162, __pyx_L1_error) if (__pyx_t_5) { /* "cassandra/cluster.py":163 * # If we've already found a workable Connection class return immediately * if rv: * return val # <<<<<<<<<<<<<< * (import_result, exc) = import_fn() * if exc: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_val); __pyx_r = __pyx_v_val; goto __pyx_L0; /* "cassandra/cluster.py":162 * (rv, excs) = val * # If we've already found a workable Connection class return immediately * if rv: # <<<<<<<<<<<<<< * return val * (import_result, exc) = import_fn() */ } /* "cassandra/cluster.py":164 * if rv: * return val * (import_result, exc) = import_fn() # <<<<<<<<<<<<<< * if exc: * excs.append(exc) */ __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_import_fn); __pyx_t_3 = __pyx_v_import_fn; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 164, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); } #else __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); index = 0; __pyx_t_3 = __pyx_t_4(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_1 = __pyx_t_4(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_7), 2) < (0)) __PYX_ERR(0, 164, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 164, __pyx_L1_error) __pyx_L7_unpacking_done:; } __pyx_v_import_result = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":165 * return val * (import_result, exc) = import_fn() * if exc: # <<<<<<<<<<<<<< * excs.append(exc) * return (rv or import_result, excs) */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_exc); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 165, __pyx_L1_error) if (__pyx_t_5) { /* "cassandra/cluster.py":166 * (import_result, exc) = import_fn() * if exc: * excs.append(exc) # <<<<<<<<<<<<<< * return (rv or import_result, excs) * */ __pyx_t_8 = __Pyx_PyObject_Append(__pyx_v_excs, __pyx_v_exc); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 166, __pyx_L1_error) /* "cassandra/cluster.py":165 * return val * (import_result, exc) = import_fn() * if exc: # <<<<<<<<<<<<<< * excs.append(exc) * return (rv or import_result, excs) */ } /* "cassandra/cluster.py":167 * if exc: * excs.append(exc) * return (rv or import_result, excs) # <<<<<<<<<<<<<< * * log = logging.getLogger(__name__) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_rv); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 167, __pyx_L1_error) if (!__pyx_t_5) { } else { __Pyx_INCREF(__pyx_v_rv); __pyx_t_2 = __pyx_v_rv; goto __pyx_L9_bool_binop_done; } __Pyx_INCREF(__pyx_v_import_result); __pyx_t_2 = __pyx_v_import_result; __pyx_L9_bool_binop_done:; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 167, __pyx_L1_error); __Pyx_INCREF(__pyx_v_excs); __Pyx_GIVEREF(__pyx_v_excs); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_excs) != (0)) __PYX_ERR(0, 167, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":159 * return (None, e) * * def _connection_reduce_fn(val,import_fn): # <<<<<<<<<<<<<< * (rv, excs) = val * # If we've already found a workable Connection class return immediately */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster._connection_reduce_fn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XDECREF(__pyx_v_excs); __Pyx_XDECREF(__pyx_v_import_result); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":211 * """ * * def __init__(self, message, errors): # <<<<<<<<<<<<<< * Exception.__init__(self, message, errors) * self.errors = errors */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_15NoHostAvailable_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_15NoHostAvailable_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_15NoHostAvailable_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_15NoHostAvailable_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_message = 0; PyObject *__pyx_v_errors = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_message,&__pyx_mstate_global->__pyx_n_u_errors,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 211, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 211, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 211, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 211, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 211, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 211, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 211, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 211, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_message = values[1]; __pyx_v_errors = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 211, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.NoHostAvailable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_15NoHostAvailable___init__(__pyx_self, __pyx_v_self, __pyx_v_message, __pyx_v_errors); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_15NoHostAvailable___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message, PyObject *__pyx_v_errors) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":212 * * def __init__(self, message, errors): * Exception.__init__(self, message, errors) # <<<<<<<<<<<<<< * self.errors = errors * */ __pyx_t_2 = ((PyObject *)(((PyTypeObject*)PyExc_Exception))); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_self, __pyx_v_message, __pyx_v_errors}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":213 * def __init__(self, message, errors): * Exception.__init__(self, message, errors) * self.errors = errors # <<<<<<<<<<<<<< * * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors, __pyx_v_errors) < (0)) __PYX_ERR(0, 213, __pyx_L1_error) /* "cassandra/cluster.py":211 * """ * * def __init__(self, message, errors): # <<<<<<<<<<<<<< * Exception.__init__(self, message, errors) * self.errors = errors */ /* 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_AddTraceback("cassandra.cluster.NoHostAvailable.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":216 * * * def _future_completed(future): # <<<<<<<<<<<<<< * """ Helper for run_in_executor() """ * exc = future.exception() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_15_future_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14_future_completed, " Helper for run_in_executor() "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_15_future_completed = {"_future_completed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_15_future_completed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14_future_completed}; static PyObject *__pyx_pw_9cassandra_7cluster_15_future_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_future_completed (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 216, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 216, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_future_completed", 0) < (0)) __PYX_ERR(0, 216, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_future_completed", 1, 1, 1, i); __PYX_ERR(0, 216, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 216, __pyx_L3_error) } __pyx_v_future = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_future_completed", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 216, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14_future_completed(__pyx_self, __pyx_v_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14_future_completed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_future) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_future_completed", 0); /* "cassandra/cluster.py":218 * def _future_completed(future): * """ Helper for run_in_executor() """ * exc = future.exception() # <<<<<<<<<<<<<< * if exc: * log.debug("Failed to run task on executor", exc_info=exc) */ __pyx_t_2 = __pyx_v_future; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_exception, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":219 * """ Helper for run_in_executor() """ * exc = future.exception() * if exc: # <<<<<<<<<<<<<< * log.debug("Failed to run task on executor", exc_info=exc) * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_exc); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 219, __pyx_L1_error) if (__pyx_t_4) { /* "cassandra/cluster.py":220 * exc = future.exception() * if exc: * log.debug("Failed to run task on executor", exc_info=exc) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Failed_to_run_task_on_executor}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, __pyx_v_exc, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 220, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":219 * """ Helper for run_in_executor() """ * exc = future.exception() * if exc: # <<<<<<<<<<<<<< * log.debug("Failed to run task on executor", exc_info=exc) * */ } /* "cassandra/cluster.py":216 * * * def _future_completed(future): # <<<<<<<<<<<<<< * """ Helper for run_in_executor() """ * exc = future.exception() */ /* 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("cassandra.cluster._future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":223 * * * def run_in_executor(f): # <<<<<<<<<<<<<< * """ * A decorator to run the given method in the ThreadPoolExecutor. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17run_in_executor(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_16run_in_executor, "\n A decorator to run the given method in the ThreadPoolExecutor.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17run_in_executor = {"run_in_executor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17run_in_executor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_16run_in_executor}; static PyObject *__pyx_pw_9cassandra_7cluster_17run_in_executor(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_f = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run_in_executor (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 223, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 223, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "run_in_executor", 0) < (0)) __PYX_ERR(0, 223, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("run_in_executor", 1, 1, 1, i); __PYX_ERR(0, 223, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 223, __pyx_L3_error) } __pyx_v_f = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("run_in_executor", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 223, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.run_in_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_16run_in_executor(__pyx_self, __pyx_v_f); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":228 * """ * * @wraps(f) # <<<<<<<<<<<<<< * def new_f(self, *args, **kwargs): * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_15run_in_executor_1new_f(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_15run_in_executor_1new_f = {"new_f", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_15run_in_executor_1new_f, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_15run_in_executor_1new_f(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_f (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 228, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 228, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "new_f", 1) < (0)) __PYX_ERR(0, 228, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("new_f", 0, 1, 1, i); __PYX_ERR(0, 228, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 228, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("new_f", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 228, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.run_in_executor.new_f", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_15run_in_executor_new_f(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_15run_in_executor_new_f(PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *__pyx_cur_scope; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *__pyx_outer_scope; PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; size_t __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("new_f", 0); __pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "cassandra/cluster.py":231 * def new_f(self, *args, **kwargs): * * if self.is_shutdown: # <<<<<<<<<<<<<< * return * try: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __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(0, 231, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":232 * * if self.is_shutdown: * return # <<<<<<<<<<<<<< * try: * future = self.executor.submit(f, self, *args, **kwargs) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":231 * def new_f(self, *args, **kwargs): * * if self.is_shutdown: # <<<<<<<<<<<<<< * return * try: */ } /* "cassandra/cluster.py":233 * if self.is_shutdown: * return * try: # <<<<<<<<<<<<<< * future = self.executor.submit(f, self, *args, **kwargs) * future.add_done_callback(_future_completed) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "cassandra/cluster.py":234 * return * try: * future = self.executor.submit(f, self, *args, **kwargs) # <<<<<<<<<<<<<< * future.add_done_callback(_future_completed) * except Exception: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_executor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_f)) { __Pyx_RaiseClosureNameError("f"); __PYX_ERR(0, 234, __pyx_L4_error) } __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_f) != (0)) __PYX_ERR(0, 234, __pyx_L4_error); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self) != (0)) __PYX_ERR(0, 234, __pyx_L4_error); __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 234, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 234, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_future = __pyx_t_8; __pyx_t_8 = 0; /* "cassandra/cluster.py":235 * try: * future = self.executor.submit(f, self, *args, **kwargs) * future.add_done_callback(_future_completed) # <<<<<<<<<<<<<< * except Exception: * log.exception("Failed to submit task to executor") */ __pyx_t_1 = __pyx_v_future; __Pyx_INCREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_future_completed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 235, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_done_callback, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 235, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":233 * if self.is_shutdown: * return * try: # <<<<<<<<<<<<<< * future = self.executor.submit(f, self, *args, **kwargs) * future.add_done_callback(_future_completed) */ } __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; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __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; /* "cassandra/cluster.py":236 * future = self.executor.submit(f, self, *args, **kwargs) * future.add_done_callback(_future_completed) * except Exception: # <<<<<<<<<<<<<< * log.exception("Failed to submit task to executor") * */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster.run_in_executor.new_f", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_1) < 0) __PYX_ERR(0, 236, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_1); /* "cassandra/cluster.py":237 * future.add_done_callback(_future_completed) * except Exception: * log.exception("Failed to submit task to executor") # <<<<<<<<<<<<<< * * return new_f */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 237, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 237, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_9 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Failed_to_submit_task_to_executo}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 237, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; /* "cassandra/cluster.py":233 * if self.is_shutdown: * return * try: # <<<<<<<<<<<<<< * future = self.executor.submit(f, self, *args, **kwargs) * future.add_done_callback(_future_completed) */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L9_try_end:; } /* "cassandra/cluster.py":228 * """ * * @wraps(f) # <<<<<<<<<<<<<< * def new_f(self, *args, **kwargs): * */ /* 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_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("cassandra.cluster.run_in_executor.new_f", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_future); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":223 * * * def run_in_executor(f): # <<<<<<<<<<<<<< * """ * A decorator to run the given method in the ThreadPoolExecutor. */ static PyObject *__pyx_pf_9cassandra_7cluster_16run_in_executor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_f) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *__pyx_cur_scope; PyObject *__pyx_v_new_f = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run_in_executor", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct__run_in_executor(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 223, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_f = __pyx_v_f; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f); /* "cassandra/cluster.py":228 * """ * * @wraps(f) # <<<<<<<<<<<<<< * def new_f(self, *args, **kwargs): * */ __pyx_t_2 = NULL; __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_wraps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_f}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_15run_in_executor_1new_f, 0, __pyx_mstate_global->__pyx_n_u_run_in_executor_locals_new_f, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_new_f = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":239 * log.exception("Failed to submit task to executor") * * return new_f # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_new_f); __pyx_r = __pyx_v_new_f; goto __pyx_L0; /* "cassandra/cluster.py":223 * * * def run_in_executor(f): # <<<<<<<<<<<<<< * """ * A decorator to run the given method in the ThreadPoolExecutor. */ /* 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("cassandra.cluster.run_in_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_new_f); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":245 * * * def _register_cluster_shutdown(cluster): # <<<<<<<<<<<<<< * _clusters_for_shutdown.add(cluster) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_19_register_cluster_shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_19_register_cluster_shutdown = {"_register_cluster_shutdown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_19_register_cluster_shutdown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_19_register_cluster_shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_cluster = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_register_cluster_shutdown (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cluster,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 245, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 245, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_register_cluster_shutdown", 0) < (0)) __PYX_ERR(0, 245, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_register_cluster_shutdown", 1, 1, 1, i); __PYX_ERR(0, 245, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 245, __pyx_L3_error) } __pyx_v_cluster = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_register_cluster_shutdown", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 245, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._register_cluster_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_18_register_cluster_shutdown(__pyx_self, __pyx_v_cluster); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_18_register_cluster_shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cluster) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_register_cluster_shutdown", 0); /* "cassandra/cluster.py":246 * * def _register_cluster_shutdown(cluster): * _clusters_for_shutdown.add(cluster) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clusters_for_shutdown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_cluster}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":245 * * * def _register_cluster_shutdown(cluster): # <<<<<<<<<<<<<< * _clusters_for_shutdown.add(cluster) * */ /* 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_AddTraceback("cassandra.cluster._register_cluster_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":249 * * * def _discard_cluster_shutdown(cluster): # <<<<<<<<<<<<<< * _clusters_for_shutdown.discard(cluster) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_21_discard_cluster_shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_21_discard_cluster_shutdown = {"_discard_cluster_shutdown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_21_discard_cluster_shutdown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_21_discard_cluster_shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_cluster = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_discard_cluster_shutdown (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cluster,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 249, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 249, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_discard_cluster_shutdown", 0) < (0)) __PYX_ERR(0, 249, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_discard_cluster_shutdown", 1, 1, 1, i); __PYX_ERR(0, 249, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 249, __pyx_L3_error) } __pyx_v_cluster = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_discard_cluster_shutdown", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 249, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._discard_cluster_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_20_discard_cluster_shutdown(__pyx_self, __pyx_v_cluster); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_20_discard_cluster_shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cluster) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_discard_cluster_shutdown", 0); /* "cassandra/cluster.py":250 * * def _discard_cluster_shutdown(cluster): * _clusters_for_shutdown.discard(cluster) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clusters_for_shutdown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_discard); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_cluster}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":249 * * * def _discard_cluster_shutdown(cluster): # <<<<<<<<<<<<<< * _clusters_for_shutdown.discard(cluster) * */ /* 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_AddTraceback("cassandra.cluster._discard_cluster_shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":253 * * * def _shutdown_clusters(): # <<<<<<<<<<<<<< * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" * for cluster in clusters: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_23_shutdown_clusters(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_23_shutdown_clusters = {"_shutdown_clusters", (PyCFunction)__pyx_pw_9cassandra_7cluster_23_shutdown_clusters, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_23_shutdown_clusters(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_shutdown_clusters (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_22_shutdown_clusters(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_22_shutdown_clusters(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_clusters = NULL; PyObject *__pyx_v_cluster = 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; size_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_shutdown_clusters", 0); /* "cassandra/cluster.py":254 * * def _shutdown_clusters(): * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" # <<<<<<<<<<<<<< * for cluster in clusters: * cluster.shutdown() */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clusters_for_shutdown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_clusters = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":255 * def _shutdown_clusters(): * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" * for cluster in clusters: # <<<<<<<<<<<<<< * cluster.shutdown() * */ if (likely(PyList_CheckExact(__pyx_v_clusters)) || PyTuple_CheckExact(__pyx_v_clusters)) { __pyx_t_1 = __pyx_v_clusters; __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_clusters); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 255, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 255, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 255, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); #endif ++__pyx_t_6; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_7(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 255, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_cluster, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":256 * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" * for cluster in clusters: * cluster.shutdown() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __pyx_v_cluster; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":255 * def _shutdown_clusters(): * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" * for cluster in clusters: # <<<<<<<<<<<<<< * cluster.shutdown() * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":253 * * * def _shutdown_clusters(): # <<<<<<<<<<<<<< * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" * for cluster in clusters: */ /* 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_AddTraceback("cassandra.cluster._shutdown_clusters", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clusters); __Pyx_XDECREF(__pyx_v_cluster); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":262 * * * def default_lbp_factory(): # <<<<<<<<<<<<<< * if murmur3 is not None: * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_25default_lbp_factory(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_25default_lbp_factory = {"default_lbp_factory", (PyCFunction)__pyx_pw_9cassandra_7cluster_25default_lbp_factory, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_25default_lbp_factory(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_lbp_factory (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_24default_lbp_factory(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_24default_lbp_factory(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_lbp_factory", 0); /* "cassandra/cluster.py":263 * * def default_lbp_factory(): * if murmur3 is not None: # <<<<<<<<<<<<<< * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) * return DCAwareRoundRobinPolicy() */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_murmur3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":264 * def default_lbp_factory(): * if murmur3 is not None: * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) # <<<<<<<<<<<<<< * return DCAwareRoundRobinPolicy() * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TokenAwarePolicy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DCAwareRoundRobinPolicy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":263 * * def default_lbp_factory(): * if murmur3 is not None: # <<<<<<<<<<<<<< * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) * return DCAwareRoundRobinPolicy() */ } /* "cassandra/cluster.py":265 * if murmur3 is not None: * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) * return DCAwareRoundRobinPolicy() # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DCAwareRoundRobinPolicy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":262 * * * def default_lbp_factory(): # <<<<<<<<<<<<<< * if murmur3 is not None: * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) */ /* function exit code */ __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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.default_lbp_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":297 * """ * * def __init__(self, page_unit=PagingUnit.ROWS, max_pages=0, max_pages_per_second=0, max_queue_size=4): # <<<<<<<<<<<<<< * self.page_unit = page_unit * self.max_pages = max_pages */ static PyObject *__pyx_pf_9cassandra_7cluster_38__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_0)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_mstate_global->__pyx_int_0)) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_0)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject*)__pyx_mstate_global->__pyx_int_0)) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_4)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_4)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject*)__pyx_mstate_global->__pyx_int_4)) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 297, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_23ContinuousPagingOptions_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_23ContinuousPagingOptions_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_23ContinuousPagingOptions_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_23ContinuousPagingOptions_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_page_unit = 0; PyObject *__pyx_v_max_pages = 0; PyObject *__pyx_v_max_pages_per_second = 0; PyObject *__pyx_v_max_queue_size = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_page_unit,&__pyx_mstate_global->__pyx_n_u_max_pages,&__pyx_mstate_global->__pyx_n_u_max_pages_per_second,&__pyx_mstate_global->__pyx_n_u_max_queue_size,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 297, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 297, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_4))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, i); __PYX_ERR(0, 297, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 297, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 297, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_4))); } __pyx_v_self = values[0]; __pyx_v_page_unit = values[1]; __pyx_v_max_pages = values[2]; __pyx_v_max_pages_per_second = values[3]; __pyx_v_max_queue_size = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 297, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ContinuousPagingOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_23ContinuousPagingOptions___init__(__pyx_self, __pyx_v_self, __pyx_v_page_unit, __pyx_v_max_pages, __pyx_v_max_pages_per_second, __pyx_v_max_queue_size); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_23ContinuousPagingOptions___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_page_unit, PyObject *__pyx_v_max_pages, PyObject *__pyx_v_max_pages_per_second, PyObject *__pyx_v_max_queue_size) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":298 * * def __init__(self, page_unit=PagingUnit.ROWS, max_pages=0, max_pages_per_second=0, max_queue_size=4): * self.page_unit = page_unit # <<<<<<<<<<<<<< * self.max_pages = max_pages * self.max_pages_per_second = max_pages_per_second */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_unit, __pyx_v_page_unit) < (0)) __PYX_ERR(0, 298, __pyx_L1_error) /* "cassandra/cluster.py":299 * def __init__(self, page_unit=PagingUnit.ROWS, max_pages=0, max_pages_per_second=0, max_queue_size=4): * self.page_unit = page_unit * self.max_pages = max_pages # <<<<<<<<<<<<<< * self.max_pages_per_second = max_pages_per_second * if max_queue_size < 2: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_pages, __pyx_v_max_pages) < (0)) __PYX_ERR(0, 299, __pyx_L1_error) /* "cassandra/cluster.py":300 * self.page_unit = page_unit * self.max_pages = max_pages * self.max_pages_per_second = max_pages_per_second # <<<<<<<<<<<<<< * if max_queue_size < 2: * raise ValueError('ContinuousPagingOptions.max_queue_size must be 2 or greater') */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_pages_per_second, __pyx_v_max_pages_per_second) < (0)) __PYX_ERR(0, 300, __pyx_L1_error) /* "cassandra/cluster.py":301 * self.max_pages = max_pages * self.max_pages_per_second = max_pages_per_second * if max_queue_size < 2: # <<<<<<<<<<<<<< * raise ValueError('ContinuousPagingOptions.max_queue_size must be 2 or greater') * self.max_queue_size = max_queue_size */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_queue_size, __pyx_mstate_global->__pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":302 * self.max_pages_per_second = max_pages_per_second * if max_queue_size < 2: * raise ValueError('ContinuousPagingOptions.max_queue_size must be 2 or greater') # <<<<<<<<<<<<<< * self.max_queue_size = max_queue_size * */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ContinuousPagingOptions_max_queu}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __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(0, 302, __pyx_L1_error) /* "cassandra/cluster.py":301 * self.max_pages = max_pages * self.max_pages_per_second = max_pages_per_second * if max_queue_size < 2: # <<<<<<<<<<<<<< * raise ValueError('ContinuousPagingOptions.max_queue_size must be 2 or greater') * self.max_queue_size = max_queue_size */ } /* "cassandra/cluster.py":303 * if max_queue_size < 2: * raise ValueError('ContinuousPagingOptions.max_queue_size must be 2 or greater') * self.max_queue_size = max_queue_size # <<<<<<<<<<<<<< * * def page_unit_bytes(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_queue_size, __pyx_v_max_queue_size) < (0)) __PYX_ERR(0, 303, __pyx_L1_error) /* "cassandra/cluster.py":297 * """ * * def __init__(self, page_unit=PagingUnit.ROWS, max_pages=0, max_pages_per_second=0, max_queue_size=4): # <<<<<<<<<<<<<< * self.page_unit = page_unit * self.max_pages = max_pages */ /* 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_AddTraceback("cassandra.cluster.ContinuousPagingOptions.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":305 * self.max_queue_size = max_queue_size * * def page_unit_bytes(self): # <<<<<<<<<<<<<< * return self.page_unit == ContinuousPagingOptions.PagingUnit.BYTES * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_23ContinuousPagingOptions_3page_unit_bytes(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_23ContinuousPagingOptions_3page_unit_bytes = {"page_unit_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_23ContinuousPagingOptions_3page_unit_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_23ContinuousPagingOptions_3page_unit_bytes(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("page_unit_bytes (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 305, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 305, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "page_unit_bytes", 0) < (0)) __PYX_ERR(0, 305, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("page_unit_bytes", 1, 1, 1, i); __PYX_ERR(0, 305, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 305, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("page_unit_bytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 305, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ContinuousPagingOptions.page_unit_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_23ContinuousPagingOptions_2page_unit_bytes(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_23ContinuousPagingOptions_2page_unit_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("page_unit_bytes", 0); /* "cassandra/cluster.py":306 * * def page_unit_bytes(self): * return self.page_unit == ContinuousPagingOptions.PagingUnit.BYTES # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_unit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PagingUnit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __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_mstate_global->__pyx_n_u_BYTES); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":305 * self.max_queue_size = max_queue_size * * def page_unit_bytes(self): # <<<<<<<<<<<<<< * return self.page_unit == ContinuousPagingOptions.PagingUnit.BYTES * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ContinuousPagingOptions.page_unit_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":309 * * * def _addrinfo_or_none(contact_point, port): # <<<<<<<<<<<<<< * """ * A helper function that wraps socket.getaddrinfo and returns None */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_27_addrinfo_or_none(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_26_addrinfo_or_none, "\n A helper function that wraps socket.getaddrinfo and returns None\n when it fails to, e.g. resolve one of the hostnames. Used to address\n PYTHON-895.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_27_addrinfo_or_none = {"_addrinfo_or_none", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_27_addrinfo_or_none, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_26_addrinfo_or_none}; static PyObject *__pyx_pw_9cassandra_7cluster_27_addrinfo_or_none(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_contact_point = 0; PyObject *__pyx_v_port = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_addrinfo_or_none (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_contact_point,&__pyx_mstate_global->__pyx_n_u_port,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 309, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 309, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 309, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_addrinfo_or_none", 0) < (0)) __PYX_ERR(0, 309, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_addrinfo_or_none", 1, 2, 2, i); __PYX_ERR(0, 309, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 309, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 309, __pyx_L3_error) } __pyx_v_contact_point = values[0]; __pyx_v_port = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_addrinfo_or_none", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 309, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._addrinfo_or_none", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_26_addrinfo_or_none(__pyx_self, __pyx_v_contact_point, __pyx_v_port); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_26_addrinfo_or_none(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_contact_point, PyObject *__pyx_v_port) { 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; size_t __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_addrinfo_or_none", 0); /* "cassandra/cluster.py":315 * PYTHON-895. * """ * try: # <<<<<<<<<<<<<< * return socket.getaddrinfo(contact_point, port, * socket.AF_UNSPEC, socket.SOCK_STREAM) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":316 * """ * try: * return socket.getaddrinfo(contact_point, port, # <<<<<<<<<<<<<< * socket.AF_UNSPEC, socket.SOCK_STREAM) * except socket.gaierror: */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 316, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_getaddrinfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 316, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":317 * try: * return socket.getaddrinfo(contact_point, port, * socket.AF_UNSPEC, socket.SOCK_STREAM) # <<<<<<<<<<<<<< * except socket.gaierror: * log.debug('Could not resolve hostname "{}" ' */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_AF_UNSPEC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 317, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 317, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_SOCK_STREAM); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 317, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_10 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_contact_point, __pyx_v_port, __pyx_t_8, __pyx_t_9}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_10, (5-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 316, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":315 * PYTHON-895. * """ * try: # <<<<<<<<<<<<<< * return socket.getaddrinfo(contact_point, port, * socket.AF_UNSPEC, socket.SOCK_STREAM) */ } __pyx_L3_error:; __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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":318 * return socket.getaddrinfo(contact_point, port, * socket.AF_UNSPEC, socket.SOCK_STREAM) * except socket.gaierror: # <<<<<<<<<<<<<< * log.debug('Could not resolve hostname "{}" ' * 'with port {}'.format(contact_point, port)) */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 318, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_gaierror); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_ErrRestore(__pyx_t_4, __pyx_t_7, __pyx_t_9); __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_9 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("cassandra.cluster._addrinfo_or_none", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 318, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_4); /* "cassandra/cluster.py":319 * socket.AF_UNSPEC, socket.SOCK_STREAM) * except socket.gaierror: * log.debug('Could not resolve hostname "{}" ' # <<<<<<<<<<<<<< * 'with port {}'.format(contact_point, port)) * return None */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 319, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 319, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":320 * except socket.gaierror: * log.debug('Could not resolve hostname "{}" ' * 'with port {}'.format(contact_point, port)) # <<<<<<<<<<<<<< * return None * */ __pyx_t_13 = __pyx_mstate_global->__pyx_kp_u_Could_not_resolve_hostname_with; __Pyx_INCREF(__pyx_t_13); __pyx_t_10 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_v_contact_point, __pyx_v_port}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_10, (3-__pyx_t_10) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_10 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_10 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_10, (2-__pyx_t_10) | (__pyx_t_10*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":321 * log.debug('Could not resolve hostname "{}" ' * 'with port {}'.format(contact_point, port)) * return None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_except_return; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":315 * PYTHON-895. * """ * try: # <<<<<<<<<<<<<< * return socket.getaddrinfo(contact_point, port, * socket.AF_UNSPEC, socket.SOCK_STREAM) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; } /* "cassandra/cluster.py":309 * * * def _addrinfo_or_none(contact_point, port): # <<<<<<<<<<<<<< * """ * A helper function that wraps socket.getaddrinfo and returns None */ /* function exit code */ __pyx_L1_error:; __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_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("cassandra.cluster._addrinfo_or_none", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":324 * * * def _execution_profile_to_string(name): # <<<<<<<<<<<<<< * default_profiles = { * EXEC_PROFILE_DEFAULT: 'EXEC_PROFILE_DEFAULT', */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_29_execution_profile_to_string(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_29_execution_profile_to_string = {"_execution_profile_to_string", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_29_execution_profile_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_29_execution_profile_to_string(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_name = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_execution_profile_to_string (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 324, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 324, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_execution_profile_to_string", 0) < (0)) __PYX_ERR(0, 324, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_execution_profile_to_string", 1, 1, 1, i); __PYX_ERR(0, 324, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 324, __pyx_L3_error) } __pyx_v_name = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_execution_profile_to_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 324, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._execution_profile_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_28_execution_profile_to_string(__pyx_self, __pyx_v_name); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_28_execution_profile_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_default_profiles = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4[3]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_execution_profile_to_string", 0); /* "cassandra/cluster.py":326 * def _execution_profile_to_string(name): * default_profiles = { * EXEC_PROFILE_DEFAULT: 'EXEC_PROFILE_DEFAULT', # <<<<<<<<<<<<<< * EXEC_PROFILE_GRAPH_DEFAULT: 'EXEC_PROFILE_GRAPH_DEFAULT', * EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT: 'EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT', */ __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":327 * default_profiles = { * EXEC_PROFILE_DEFAULT: 'EXEC_PROFILE_DEFAULT', * EXEC_PROFILE_GRAPH_DEFAULT: 'EXEC_PROFILE_GRAPH_DEFAULT', # <<<<<<<<<<<<<< * EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT: 'EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT', * EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT: 'EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT', */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":328 * EXEC_PROFILE_DEFAULT: 'EXEC_PROFILE_DEFAULT', * EXEC_PROFILE_GRAPH_DEFAULT: 'EXEC_PROFILE_GRAPH_DEFAULT', * EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT: 'EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT', # <<<<<<<<<<<<<< * EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT: 'EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT', * } */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_SYSTEM_DEFAUL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_SYSTEM_DEFAUL) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":329 * EXEC_PROFILE_GRAPH_DEFAULT: 'EXEC_PROFILE_GRAPH_DEFAULT', * EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT: 'EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT', * EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT: 'EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT', # <<<<<<<<<<<<<< * } * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_ANALYTICS_DEF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_ANALYTICS_DEF) < (0)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_default_profiles = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":332 * } * * if name in default_profiles: # <<<<<<<<<<<<<< * return default_profiles[name] * */ __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_default_profiles, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 332, __pyx_L1_error) if (__pyx_t_3) { /* "cassandra/cluster.py":333 * * if name in default_profiles: * return default_profiles[name] # <<<<<<<<<<<<<< * * return '"%s"' % (name,) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_default_profiles, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":332 * } * * if name in default_profiles: # <<<<<<<<<<<<<< * return default_profiles[name] * */ } /* "cassandra/cluster.py":335 * return default_profiles[name] * * return '"%s"' % (name,) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_4[1] = __pyx_t_1; __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __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; /* "cassandra/cluster.py":324 * * * def _execution_profile_to_string(name): # <<<<<<<<<<<<<< * default_profiles = { * EXEC_PROFILE_DEFAULT: 'EXEC_PROFILE_DEFAULT', */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster._execution_profile_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_default_profiles); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ static PyObject *__pyx_pf_9cassandra_7cluster_40__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":412 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, * continuous_paging_options=None): # <<<<<<<<<<<<<< * * if load_balancing_policy is _NOT_SET: */ __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg1); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg1) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_float_10_0)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_float_10_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject*)__pyx_mstate_global->__pyx_float_10_0)) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg2); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg2) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, Py_None) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 409, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_16ExecutionProfile_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_16ExecutionProfile_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_16ExecutionProfile_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_16ExecutionProfile_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_load_balancing_policy = 0; PyObject *__pyx_v_retry_policy = 0; PyObject *__pyx_v_consistency_level = 0; PyObject *__pyx_v_serial_consistency_level = 0; PyObject *__pyx_v_request_timeout = 0; PyObject *__pyx_v_row_factory = 0; PyObject *__pyx_v_speculative_execution_policy = 0; PyObject *__pyx_v_continuous_paging_options = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_load_balancing_policy,&__pyx_mstate_global->__pyx_n_u_retry_policy,&__pyx_mstate_global->__pyx_n_u_consistency_level,&__pyx_mstate_global->__pyx_n_u_serial_consistency_level,&__pyx_mstate_global->__pyx_n_u_request_timeout,&__pyx_mstate_global->__pyx_n_u_row_factory,&__pyx_mstate_global->__pyx_n_u_speculative_execution_policy,&__pyx_mstate_global->__pyx_n_u_continuous_paging_options,0}; struct __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 409, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 409, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":410 * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, * continuous_paging_options=None): */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_10_0))); if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg2); /* "cassandra/cluster.py":411 * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, # <<<<<<<<<<<<<< * continuous_paging_options=None): * */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":412 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, * continuous_paging_options=None): # <<<<<<<<<<<<<< * * if load_balancing_policy is _NOT_SET: */ if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 9, i); __PYX_ERR(0, 409, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 409, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":410 * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, * continuous_paging_options=None): */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_10_0))); if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg2); /* "cassandra/cluster.py":411 * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, # <<<<<<<<<<<<<< * continuous_paging_options=None): * */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":412 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, * continuous_paging_options=None): # <<<<<<<<<<<<<< * * if load_balancing_policy is _NOT_SET: */ if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_load_balancing_policy = values[1]; __pyx_v_retry_policy = values[2]; __pyx_v_consistency_level = values[3]; __pyx_v_serial_consistency_level = values[4]; __pyx_v_request_timeout = values[5]; __pyx_v_row_factory = values[6]; __pyx_v_speculative_execution_policy = values[7]; __pyx_v_continuous_paging_options = values[8]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 9, __pyx_nargs); __PYX_ERR(0, 409, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ExecutionProfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_16ExecutionProfile___init__(__pyx_self, __pyx_v_self, __pyx_v_load_balancing_policy, __pyx_v_retry_policy, __pyx_v_consistency_level, __pyx_v_serial_consistency_level, __pyx_v_request_timeout, __pyx_v_row_factory, __pyx_v_speculative_execution_policy, __pyx_v_continuous_paging_options); /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_16ExecutionProfile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_serial_consistency_level, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_speculative_execution_policy, PyObject *__pyx_v_continuous_paging_options) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":414 * continuous_paging_options=None): * * if load_balancing_policy is _NOT_SET: # <<<<<<<<<<<<<< * self._load_balancing_policy_explicit = False * self.load_balancing_policy = default_lbp_factory() */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_load_balancing_policy == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":415 * * if load_balancing_policy is _NOT_SET: * self._load_balancing_policy_explicit = False # <<<<<<<<<<<<<< * self.load_balancing_policy = default_lbp_factory() * else: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_explicit, Py_False) < (0)) __PYX_ERR(0, 415, __pyx_L1_error) /* "cassandra/cluster.py":416 * if load_balancing_policy is _NOT_SET: * self._load_balancing_policy_explicit = False * self.load_balancing_policy = default_lbp_factory() # <<<<<<<<<<<<<< * else: * self._load_balancing_policy_explicit = True */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_default_lbp_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_t_1) < (0)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":414 * continuous_paging_options=None): * * if load_balancing_policy is _NOT_SET: # <<<<<<<<<<<<<< * self._load_balancing_policy_explicit = False * self.load_balancing_policy = default_lbp_factory() */ goto __pyx_L3; } /* "cassandra/cluster.py":418 * self.load_balancing_policy = default_lbp_factory() * else: * self._load_balancing_policy_explicit = True # <<<<<<<<<<<<<< * self.load_balancing_policy = load_balancing_policy * */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_explicit, Py_True) < (0)) __PYX_ERR(0, 418, __pyx_L1_error) /* "cassandra/cluster.py":419 * else: * self._load_balancing_policy_explicit = True * self.load_balancing_policy = load_balancing_policy # <<<<<<<<<<<<<< * * if consistency_level is _NOT_SET: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_v_load_balancing_policy) < (0)) __PYX_ERR(0, 419, __pyx_L1_error) } __pyx_L3:; /* "cassandra/cluster.py":421 * self.load_balancing_policy = load_balancing_policy * * if consistency_level is _NOT_SET: # <<<<<<<<<<<<<< * self._consistency_level_explicit = False * self.consistency_level = ConsistencyLevel.LOCAL_ONE */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_consistency_level == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":422 * * if consistency_level is _NOT_SET: * self._consistency_level_explicit = False # <<<<<<<<<<<<<< * self.consistency_level = ConsistencyLevel.LOCAL_ONE * else: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_consistency_level_explicit, Py_False) < (0)) __PYX_ERR(0, 422, __pyx_L1_error) /* "cassandra/cluster.py":423 * if consistency_level is _NOT_SET: * self._consistency_level_explicit = False * self.consistency_level = ConsistencyLevel.LOCAL_ONE # <<<<<<<<<<<<<< * else: * self._consistency_level_explicit = True */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LOCAL_ONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_4) < (0)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":421 * self.load_balancing_policy = load_balancing_policy * * if consistency_level is _NOT_SET: # <<<<<<<<<<<<<< * self._consistency_level_explicit = False * self.consistency_level = ConsistencyLevel.LOCAL_ONE */ goto __pyx_L4; } /* "cassandra/cluster.py":425 * self.consistency_level = ConsistencyLevel.LOCAL_ONE * else: * self._consistency_level_explicit = True # <<<<<<<<<<<<<< * self.consistency_level = consistency_level * */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_consistency_level_explicit, Py_True) < (0)) __PYX_ERR(0, 425, __pyx_L1_error) /* "cassandra/cluster.py":426 * else: * self._consistency_level_explicit = True * self.consistency_level = consistency_level # <<<<<<<<<<<<<< * * self.retry_policy = retry_policy or RetryPolicy() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_v_consistency_level) < (0)) __PYX_ERR(0, 426, __pyx_L1_error) } __pyx_L4:; /* "cassandra/cluster.py":428 * self.consistency_level = consistency_level * * self.retry_policy = retry_policy or RetryPolicy() # <<<<<<<<<<<<<< * * if (serial_consistency_level is not None and */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_retry_policy); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 428, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_retry_policy); __pyx_t_4 = __pyx_v_retry_policy; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_L5_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_retry_policy, __pyx_t_4) < (0)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":430 * self.retry_policy = retry_policy or RetryPolicy() * * if (serial_consistency_level is not None and # <<<<<<<<<<<<<< * not ConsistencyLevel.is_serial(serial_consistency_level)): * raise ValueError("serial_consistency_level must be either " */ __pyx_t_7 = (__pyx_v_serial_consistency_level != Py_None); if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L8_bool_binop_done; } /* "cassandra/cluster.py":431 * * if (serial_consistency_level is not None and * not ConsistencyLevel.is_serial(serial_consistency_level)): # <<<<<<<<<<<<<< * raise ValueError("serial_consistency_level must be either " * "ConsistencyLevel.SERIAL " */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_is_serial); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_serial_consistency_level}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = (!__pyx_t_7); __pyx_t_2 = __pyx_t_8; __pyx_L8_bool_binop_done:; /* "cassandra/cluster.py":430 * self.retry_policy = retry_policy or RetryPolicy() * * if (serial_consistency_level is not None and # <<<<<<<<<<<<<< * not ConsistencyLevel.is_serial(serial_consistency_level)): * raise ValueError("serial_consistency_level must be either " */ if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":432 * if (serial_consistency_level is not None and * not ConsistencyLevel.is_serial(serial_consistency_level)): * raise ValueError("serial_consistency_level must be either " # <<<<<<<<<<<<<< * "ConsistencyLevel.SERIAL " * "or ConsistencyLevel.LOCAL_SERIAL.") */ __pyx_t_3 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_serial_consistency_level_must_be}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 432, __pyx_L1_error) /* "cassandra/cluster.py":430 * self.retry_policy = retry_policy or RetryPolicy() * * if (serial_consistency_level is not None and # <<<<<<<<<<<<<< * not ConsistencyLevel.is_serial(serial_consistency_level)): * raise ValueError("serial_consistency_level must be either " */ } /* "cassandra/cluster.py":435 * "ConsistencyLevel.SERIAL " * "or ConsistencyLevel.LOCAL_SERIAL.") * self.serial_consistency_level = serial_consistency_level # <<<<<<<<<<<<<< * * self.request_timeout = request_timeout */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_serial_consistency_level, __pyx_v_serial_consistency_level) < (0)) __PYX_ERR(0, 435, __pyx_L1_error) /* "cassandra/cluster.py":437 * self.serial_consistency_level = serial_consistency_level * * self.request_timeout = request_timeout # <<<<<<<<<<<<<< * self.row_factory = row_factory * self.speculative_execution_policy = speculative_execution_policy or NoSpeculativeExecutionPolicy() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_request_timeout, __pyx_v_request_timeout) < (0)) __PYX_ERR(0, 437, __pyx_L1_error) /* "cassandra/cluster.py":438 * * self.request_timeout = request_timeout * self.row_factory = row_factory # <<<<<<<<<<<<<< * self.speculative_execution_policy = speculative_execution_policy or NoSpeculativeExecutionPolicy() * self.continuous_paging_options = continuous_paging_options */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_v_row_factory) < (0)) __PYX_ERR(0, 438, __pyx_L1_error) /* "cassandra/cluster.py":439 * self.request_timeout = request_timeout * self.row_factory = row_factory * self.speculative_execution_policy = speculative_execution_policy or NoSpeculativeExecutionPolicy() # <<<<<<<<<<<<<< * self.continuous_paging_options = continuous_paging_options * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_speculative_execution_policy); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 439, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_speculative_execution_policy); __pyx_t_4 = __pyx_v_speculative_execution_policy; goto __pyx_L10_bool_binop_done; } __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_NoSpeculativeExecutionPolicy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L10_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_speculative_execution_policy, __pyx_t_4) < (0)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":440 * self.row_factory = row_factory * self.speculative_execution_policy = speculative_execution_policy or NoSpeculativeExecutionPolicy() * self.continuous_paging_options = continuous_paging_options # <<<<<<<<<<<<<< * * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_continuous_paging_options, __pyx_v_continuous_paging_options) < (0)) __PYX_ERR(0, 440, __pyx_L1_error) /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.ExecutionProfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":455 * """ * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, */ static PyObject *__pyx_pf_9cassandra_7cluster_42__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":458 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): # <<<<<<<<<<<<<< * """ * Default execution profile for graph execution. */ __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg1); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg1) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_float_30_0)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_float_30_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject*)__pyx_mstate_global->__pyx_float_30_0)) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, Py_None) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg2); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self)->arg2) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); /* "cassandra/cluster.py":455 * """ * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 455, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_21GraphExecutionProfile_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_21GraphExecutionProfile___init__, "\n Default execution profile for graph execution.\n\n See :class:`.ExecutionProfile` for base attributes. Note that if not explicitly set,\n the row_factory and graph_options.graph_protocol are resolved during the query execution.\n These options will resolve to graph_graphson3_row_factory and GraphProtocol.GRAPHSON_3_0\n for the core graph engine (DSE 6.8+), otherwise graph_object_row_factory and GraphProtocol.GRAPHSON_1_0\n\n In addition to default parameters shown in the signature, this profile also defaults ``retry_policy`` to\n :class:`cassandra.policies.NeverRetryPolicy`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_21GraphExecutionProfile_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_21GraphExecutionProfile_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_21GraphExecutionProfile___init__}; static PyObject *__pyx_pw_9cassandra_7cluster_21GraphExecutionProfile_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_load_balancing_policy = 0; PyObject *__pyx_v_retry_policy = 0; PyObject *__pyx_v_consistency_level = 0; PyObject *__pyx_v_serial_consistency_level = 0; PyObject *__pyx_v_request_timeout = 0; PyObject *__pyx_v_row_factory = 0; PyObject *__pyx_v_graph_options = 0; PyObject *__pyx_v_continuous_paging_options = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_load_balancing_policy,&__pyx_mstate_global->__pyx_n_u_retry_policy,&__pyx_mstate_global->__pyx_n_u_consistency_level,&__pyx_mstate_global->__pyx_n_u_serial_consistency_level,&__pyx_mstate_global->__pyx_n_u_request_timeout,&__pyx_mstate_global->__pyx_n_u_row_factory,&__pyx_mstate_global->__pyx_n_u_graph_options,&__pyx_mstate_global->__pyx_n_u_continuous_paging_options,0}; struct __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 455, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 455, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":456 * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_30_0))); /* "cassandra/cluster.py":457 * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, # <<<<<<<<<<<<<< * graph_options=None, continuous_paging_options=_NOT_SET): * """ */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":458 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): # <<<<<<<<<<<<<< * """ * Default execution profile for graph execution. */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(__pyx_dynamic_args->arg2); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 9, i); __PYX_ERR(0, 455, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 455, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 455, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":455 * """ * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":456 * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_30_0))); /* "cassandra/cluster.py":457 * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, # <<<<<<<<<<<<<< * graph_options=None, continuous_paging_options=_NOT_SET): * """ */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":458 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): # <<<<<<<<<<<<<< * """ * Default execution profile for graph execution. */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(__pyx_dynamic_args->arg2); } __pyx_v_self = values[0]; __pyx_v_load_balancing_policy = values[1]; __pyx_v_retry_policy = values[2]; __pyx_v_consistency_level = values[3]; __pyx_v_serial_consistency_level = values[4]; __pyx_v_request_timeout = values[5]; __pyx_v_row_factory = values[6]; __pyx_v_graph_options = values[7]; __pyx_v_continuous_paging_options = values[8]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 9, __pyx_nargs); __PYX_ERR(0, 455, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.GraphExecutionProfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_21GraphExecutionProfile___init__(__pyx_self, __pyx_v_self, __pyx_v_load_balancing_policy, __pyx_v_retry_policy, __pyx_v_consistency_level, __pyx_v_serial_consistency_level, __pyx_v_request_timeout, __pyx_v_row_factory, __pyx_v_graph_options, __pyx_v_continuous_paging_options); /* "cassandra/cluster.py":455 * """ * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_21GraphExecutionProfile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_serial_consistency_level, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_graph_options, PyObject *__pyx_v_continuous_paging_options) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_retry_policy); /* "cassandra/cluster.py":470 * :class:`cassandra.policies.NeverRetryPolicy`. * """ * retry_policy = retry_policy or NeverRetryPolicy() # <<<<<<<<<<<<<< * super(GraphExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, * serial_consistency_level, request_timeout, row_factory, */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_retry_policy); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 470, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_retry_policy); __pyx_t_1 = __pyx_v_retry_policy; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NeverRetryPolicy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; __Pyx_DECREF_SET(__pyx_v_retry_policy, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":471 * """ * retry_policy = retry_policy or NeverRetryPolicy() * super(GraphExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, # <<<<<<<<<<<<<< * serial_consistency_level, request_timeout, row_factory, * continuous_paging_options=continuous_paging_options) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_7, __pyx_v_self}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); /* "cassandra/cluster.py":473 * super(GraphExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, * serial_consistency_level, request_timeout, row_factory, * continuous_paging_options=continuous_paging_options) # <<<<<<<<<<<<<< * self.graph_options = graph_options or GraphOptions(graph_source=b'g', * graph_language=b'gremlin-groovy') */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[7 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_load_balancing_policy, __pyx_v_retry_policy, __pyx_v_consistency_level, __pyx_v_serial_consistency_level, __pyx_v_request_timeout, __pyx_v_row_factory}; __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_continuous_paging_options, __pyx_v_continuous_paging_options, __pyx_t_7, __pyx_callargs+7, 0) < (0)) __PYX_ERR(0, 471, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":474 * serial_consistency_level, request_timeout, row_factory, * continuous_paging_options=continuous_paging_options) * self.graph_options = graph_options or GraphOptions(graph_source=b'g', # <<<<<<<<<<<<<< * graph_language=b'gremlin-groovy') * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_graph_options); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 474, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_graph_options); __pyx_t_1 = __pyx_v_graph_options; goto __pyx_L5_bool_binop_done; } __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GraphOptions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_7, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_graph_source, __pyx_mstate_global->__pyx_n_b_g, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_graph_language, __pyx_mstate_global->__pyx_kp_b_gremlin_groovy, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_L5_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_graph_options, __pyx_t_1) < (0)) __PYX_ERR(0, 474, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":455 * """ * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster.GraphExecutionProfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_retry_policy); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ static PyObject *__pyx_pf_9cassandra_7cluster_44__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":483 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, * graph_options=None): # <<<<<<<<<<<<<< * """ * Execution profile with timeout and load balancing appropriate for graph analytics queries. */ __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 480, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_30GraphAnalyticsExecutionProfile_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_30GraphAnalyticsExecutionProfile___init__, "\n Execution profile with timeout and load balancing appropriate for graph analytics queries.\n\n See also :class:`~.GraphExecutionPolicy`.\n\n In addition to default parameters shown in the signature, this profile also defaults ``retry_policy`` to\n :class:`cassandra.policies.NeverRetryPolicy`, and ``load_balancing_policy`` to one that targets the current Spark\n master.\n\n Note: The graph_options.graph_source is set automatically to b'a' (analytics)\n when using GraphAnalyticsExecutionProfile. This is mandatory to target analytics nodes.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_30GraphAnalyticsExecutionProfile_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_30GraphAnalyticsExecutionProfile_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_30GraphAnalyticsExecutionProfile___init__}; static PyObject *__pyx_pw_9cassandra_7cluster_30GraphAnalyticsExecutionProfile_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_load_balancing_policy = 0; PyObject *__pyx_v_retry_policy = 0; PyObject *__pyx_v_consistency_level = 0; PyObject *__pyx_v_serial_consistency_level = 0; PyObject *__pyx_v_request_timeout = 0; PyObject *__pyx_v_row_factory = 0; PyObject *__pyx_v_graph_options = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[8] = {0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_load_balancing_policy,&__pyx_mstate_global->__pyx_n_u_retry_policy,&__pyx_mstate_global->__pyx_n_u_consistency_level,&__pyx_mstate_global->__pyx_n_u_serial_consistency_level,&__pyx_mstate_global->__pyx_n_u_request_timeout,&__pyx_mstate_global->__pyx_n_u_row_factory,&__pyx_mstate_global->__pyx_n_u_graph_options,0}; struct __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 480, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 480, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":481 * * def __init__(self, load_balancing_policy=None, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=3600. * 24. * 7., row_factory=None, * graph_options=None): */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":482 * def __init__(self, load_balancing_policy=None, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, # <<<<<<<<<<<<<< * graph_options=None): * """ */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":483 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, * graph_options=None): # <<<<<<<<<<<<<< * """ * Execution profile with timeout and load balancing appropriate for graph analytics queries. */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 8, i); __PYX_ERR(0, 480, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 480, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 480, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":481 * * def __init__(self, load_balancing_policy=None, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=3600. * 24. * 7., row_factory=None, * graph_options=None): */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":482 * def __init__(self, load_balancing_policy=None, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, # <<<<<<<<<<<<<< * graph_options=None): * """ */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":483 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, * graph_options=None): # <<<<<<<<<<<<<< * """ * Execution profile with timeout and load balancing appropriate for graph analytics queries. */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_load_balancing_policy = values[1]; __pyx_v_retry_policy = values[2]; __pyx_v_consistency_level = values[3]; __pyx_v_serial_consistency_level = values[4]; __pyx_v_request_timeout = values[5]; __pyx_v_row_factory = values[6]; __pyx_v_graph_options = values[7]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 8, __pyx_nargs); __PYX_ERR(0, 480, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.GraphAnalyticsExecutionProfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_30GraphAnalyticsExecutionProfile___init__(__pyx_self, __pyx_v_self, __pyx_v_load_balancing_policy, __pyx_v_retry_policy, __pyx_v_consistency_level, __pyx_v_serial_consistency_level, __pyx_v_request_timeout, __pyx_v_row_factory, __pyx_v_graph_options); /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_30GraphAnalyticsExecutionProfile___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_serial_consistency_level, PyObject *__pyx_v_request_timeout, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_graph_options) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_load_balancing_policy); __Pyx_INCREF(__pyx_v_graph_options); /* "cassandra/cluster.py":496 * when using GraphAnalyticsExecutionProfile. This is mandatory to target analytics nodes. * """ * load_balancing_policy = load_balancing_policy or DefaultLoadBalancingPolicy(default_lbp_factory()) # <<<<<<<<<<<<<< * graph_options = graph_options or GraphOptions(graph_language=b'gremlin-groovy') * super(GraphAnalyticsExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_load_balancing_policy); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 496, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_load_balancing_policy); __pyx_t_1 = __pyx_v_load_balancing_policy; goto __pyx_L3_bool_binop_done; } __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DefaultLoadBalancingPolicy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_default_lbp_factory); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_9 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_9 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; __Pyx_DECREF_SET(__pyx_v_load_balancing_policy, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":497 * """ * load_balancing_policy = load_balancing_policy or DefaultLoadBalancingPolicy(default_lbp_factory()) * graph_options = graph_options or GraphOptions(graph_language=b'gremlin-groovy') # <<<<<<<<<<<<<< * super(GraphAnalyticsExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, * serial_consistency_level, request_timeout, row_factory, */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_graph_options); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 497, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_graph_options); __pyx_t_1 = __pyx_v_graph_options; goto __pyx_L5_bool_binop_done; } __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_GraphOptions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_9 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_graph_language, __pyx_mstate_global->__pyx_kp_b_gremlin_groovy, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 497, __pyx_L1_error) __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L5_bool_binop_done:; __Pyx_DECREF_SET(__pyx_v_graph_options, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":498 * load_balancing_policy = load_balancing_policy or DefaultLoadBalancingPolicy(default_lbp_factory()) * graph_options = graph_options or GraphOptions(graph_language=b'gremlin-groovy') * super(GraphAnalyticsExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, # <<<<<<<<<<<<<< * serial_consistency_level, request_timeout, row_factory, * graph_options) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_5, __pyx_v_self}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_super, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); /* "cassandra/cluster.py":500 * super(GraphAnalyticsExecutionProfile, self).__init__(load_balancing_policy, retry_policy, consistency_level, * serial_consistency_level, request_timeout, row_factory, * graph_options) # <<<<<<<<<<<<<< * # ensure the graph_source is analytics, since this is the purpose of the GraphAnalyticsExecutionProfile * self.graph_options.set_source_analytics() */ __pyx_t_9 = 0; { PyObject *__pyx_callargs[8] = {__pyx_t_3, __pyx_v_load_balancing_policy, __pyx_v_retry_policy, __pyx_v_consistency_level, __pyx_v_serial_consistency_level, __pyx_v_request_timeout, __pyx_v_row_factory, __pyx_v_graph_options}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_init, __pyx_callargs+__pyx_t_9, (8-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":502 * graph_options) * # ensure the graph_source is analytics, since this is the purpose of the GraphAnalyticsExecutionProfile * self.graph_options.set_source_analytics() # <<<<<<<<<<<<<< * * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_source_analytics, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ /* 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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.GraphAnalyticsExecutionProfile.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_load_balancing_policy); __Pyx_XDECREF(__pyx_v_graph_options); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":507 * class ProfileManager(object): * * def __init__(self): # <<<<<<<<<<<<<< * self.profiles = dict() * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 507, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 507, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 507, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, i); __PYX_ERR(0, 507, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 507, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 507, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager___init__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":508 * * def __init__(self): * self.profiles = dict() # <<<<<<<<<<<<<< * * def _profiles_without_explicit_lbps(self): */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles, __pyx_t_1) < (0)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":507 * class ProfileManager(object): * * def __init__(self): # <<<<<<<<<<<<<< * self.profiles = dict() * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":510 * self.profiles = dict() * * def _profiles_without_explicit_lbps(self): # <<<<<<<<<<<<<< * names = (profile_name for * profile_name, profile in self.profiles.items() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_3_profiles_without_explicit_lbps(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_3_profiles_without_explicit_lbps = {"_profiles_without_explicit_lbps", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_3_profiles_without_explicit_lbps, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_3_profiles_without_explicit_lbps(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_profiles_without_explicit_lbps (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 510, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 510, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_profiles_without_explicit_lbps", 0) < (0)) __PYX_ERR(0, 510, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_profiles_without_explicit_lbps", 1, 1, 1, i); __PYX_ERR(0, 510, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 510, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_profiles_without_explicit_lbps", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 510, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager._profiles_without_explicit_lbps", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_2_profiles_without_explicit_lbps(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":511 * * def _profiles_without_explicit_lbps(self): * names = (profile_name for # <<<<<<<<<<<<<< * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_1_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 511, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_2generator, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ProfileManager__profiles_without, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.ProfileManager._profiles_without_explicit_lbps.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 511, __pyx_L1_error) } __pyx_t_2 = 0; /* "cassandra/cluster.py":512 * def _profiles_without_explicit_lbps(self): * names = (profile_name for * profile_name, profile in self.profiles.items() # <<<<<<<<<<<<<< * if not profile._load_balancing_policy_explicit) * return tuple( */ if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 512, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 512, __pyx_L1_error) } /* "cassandra/cluster.py":511 * * def _profiles_without_explicit_lbps(self): * names = (profile_name for # <<<<<<<<<<<<<< * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) */ __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_genexpr_arg_0, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { /* "cassandra/cluster.py":512 * def _profiles_without_explicit_lbps(self): * names = (profile_name for * profile_name, profile in self.profiles.items() # <<<<<<<<<<<<<< * if not profile._load_balancing_policy_explicit) * return tuple( */ __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_profile_name); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_profile_name, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_profile); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_profile, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":513 * names = (profile_name for * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) # <<<<<<<<<<<<<< * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_profile, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_explicit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = (!__pyx_t_8); if (__pyx_t_9) { /* "cassandra/cluster.py":511 * * def _profiles_without_explicit_lbps(self): * names = (profile_name for # <<<<<<<<<<<<<< * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_profile_name); __pyx_r = __pyx_cur_scope->__pyx_v_profile_name; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __pyx_cur_scope->__pyx_t_3 = __pyx_t_4; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L7_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 511, __pyx_L1_error) /* "cassandra/cluster.py":513 * names = (profile_name for * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) # <<<<<<<<<<<<<< * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n */ } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "cassandra/cluster.py":511 * * def _profiles_without_explicit_lbps(self): * names = (profile_name for # <<<<<<<<<<<<<< * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":515 * if not profile._load_balancing_policy_explicit) * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n # <<<<<<<<<<<<<< * for n in names * ) */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_2_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 515, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_5generator1, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ProfileManager__profiles_without, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.ProfileManager._profiles_without_explicit_lbps.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 515, __pyx_L1_error) } /* "cassandra/cluster.py":516 * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n * for n in names # <<<<<<<<<<<<<< * ) * */ if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 516, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 516, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 516, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 516, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 516, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_n); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_n, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":515 * if not profile._load_balancing_policy_explicit) * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n # <<<<<<<<<<<<<< * for n in names * ) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = (__pyx_cur_scope->__pyx_v_n == __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); __pyx_t_4 = __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT; } else { __Pyx_INCREF(__pyx_cur_scope->__pyx_v_n); __pyx_t_4 = __pyx_cur_scope->__pyx_v_n; } __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 515, __pyx_L1_error) /* "cassandra/cluster.py":516 * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n * for n in names # <<<<<<<<<<<<<< * ) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "cassandra/cluster.py":515 * if not profile._load_balancing_policy_explicit) * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n # <<<<<<<<<<<<<< * for n in names * ) */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":510 * self.profiles = dict() * * def _profiles_without_explicit_lbps(self): # <<<<<<<<<<<<<< * names = (profile_name for * profile_name, profile in self.profiles.items() */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_2_profiles_without_explicit_lbps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_names = NULL; PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_2generator = 0; PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_5generator1 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_profiles_without_explicit_lbps", 0); /* "cassandra/cluster.py":512 * def _profiles_without_explicit_lbps(self): * names = (profile_name for * profile_name, profile in self.profiles.items() # <<<<<<<<<<<<<< * if not profile._load_balancing_policy_explicit) * return tuple( */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "cassandra/cluster.py":511 * * def _profiles_without_explicit_lbps(self): * names = (profile_name for # <<<<<<<<<<<<<< * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) */ __pyx_t_2 = __pyx_pf_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_genexpr(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_names = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":514 * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) * return tuple( # <<<<<<<<<<<<<< * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n * for n in names */ __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":515 * if not profile._load_balancing_policy_explicit) * return tuple( * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n # <<<<<<<<<<<<<< * for n in names * ) */ __pyx_t_2 = __pyx_pf_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_3genexpr(NULL, __pyx_v_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":514 * profile_name, profile in self.profiles.items() * if not profile._load_balancing_policy_explicit) * return tuple( # <<<<<<<<<<<<<< * 'EXEC_PROFILE_DEFAULT' if n is EXEC_PROFILE_DEFAULT else n * for n in names */ __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __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; /* "cassandra/cluster.py":510 * self.profiles = dict() * * def _profiles_without_explicit_lbps(self): # <<<<<<<<<<<<<< * names = (profile_name for * profile_name, profile in self.profiles.items() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.ProfileManager._profiles_without_explicit_lbps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_names); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_2generator); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_14ProfileManager_31_profiles_without_explicit_lbps_5generator1); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":519 * ) * * def distance(self, host): # <<<<<<<<<<<<<< * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_5distance(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_5distance = {"distance", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_5distance, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_5distance(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("distance (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 519, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 519, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 519, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "distance", 0) < (0)) __PYX_ERR(0, 519, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("distance", 1, 2, 2, i); __PYX_ERR(0, 519, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 519, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 519, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("distance", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 519, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_4distance(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_8distance_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":520 * * def distance(self, host): * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) # <<<<<<<<<<<<<< * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ * HostDistance.REMOTE if HostDistance.REMOTE in distances else \ */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_8distance_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_4_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 520, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_14ProfileManager_8distance_2generator2, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ProfileManager_distance_locals_g, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.ProfileManager.distance.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_8distance_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 520, __pyx_L1_error) __pyx_r = PySet_New(NULL); if (unlikely(!__pyx_r)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); __pyx_t_2 = 0; if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 520, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 520, __pyx_L1_error) } __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_genexpr_arg_0, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_6 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_5, NULL, __pyx_t_4); if (unlikely(__pyx_t_6 == 0)) break; if (unlikely(__pyx_t_6 == -1)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 520, __pyx_L1_error) } __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } if (unlikely(PySet_Add(__pyx_r, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":519 * ) * * def distance(self, host): # <<<<<<<<<<<<<< * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ */ static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_4distance(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *__pyx_cur_scope; PyObject *__pyx_v_distances = NULL; PyObject *__pyx_gb_9cassandra_7cluster_14ProfileManager_8distance_2generator2 = 0; 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("distance", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_3_distance(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 519, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_host = __pyx_v_host; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); /* "cassandra/cluster.py":520 * * def distance(self, host): * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) # <<<<<<<<<<<<<< * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ * HostDistance.REMOTE if HostDistance.REMOTE in distances else \ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_pf_9cassandra_7cluster_14ProfileManager_8distance_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_distances = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":521 * def distance(self, host): * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ # <<<<<<<<<<<<<< * HostDistance.REMOTE if HostDistance.REMOTE in distances else \ * HostDistance.IGNORED */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOCAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_distances == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 521, __pyx_L1_error) } __pyx_t_4 = (__Pyx_PySet_ContainsTF(__pyx_t_3, __pyx_v_distances, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LOCAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } else { /* "cassandra/cluster.py":522 * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ * HostDistance.REMOTE if HostDistance.REMOTE in distances else \ # <<<<<<<<<<<<<< * HostDistance.IGNORED * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_REMOTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v_distances == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 522, __pyx_L1_error) } __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_t_5, __pyx_v_distances, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_REMOTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { /* "cassandra/cluster.py":523 * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ * HostDistance.REMOTE if HostDistance.REMOTE in distances else \ * HostDistance.IGNORED # <<<<<<<<<<<<<< * * def populate(self, cluster, hosts): */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_5; __pyx_t_5 = 0; } __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":519 * ) * * def distance(self, host): # <<<<<<<<<<<<<< * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.distance", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_distances); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_14ProfileManager_8distance_2generator2); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":525 * HostDistance.IGNORED * * def populate(self, cluster, hosts): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.populate(cluster, hosts) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_7populate(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_7populate = {"populate", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_7populate, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_7populate(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_cluster = 0; PyObject *__pyx_v_hosts = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("populate (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_cluster,&__pyx_mstate_global->__pyx_n_u_hosts,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 525, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 525, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 525, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 525, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "populate", 0) < (0)) __PYX_ERR(0, 525, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("populate", 1, 3, 3, i); __PYX_ERR(0, 525, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 525, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 525, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 525, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_cluster = values[1]; __pyx_v_hosts = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("populate", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 525, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.populate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_6populate(__pyx_self, __pyx_v_self, __pyx_v_cluster, __pyx_v_hosts); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_6populate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_hosts) { PyObject *__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("populate", 0); /* "cassandra/cluster.py":526 * * def populate(self, cluster, hosts): * for p in self.profiles.values(): # <<<<<<<<<<<<<< * p.load_balancing_policy.populate(cluster, hosts) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 526, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":527 * def populate(self, cluster, hosts): * for p in self.profiles.values(): * p.load_balancing_policy.populate(cluster, hosts) # <<<<<<<<<<<<<< * * def check_supported(self): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_cluster, __pyx_v_hosts}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_populate, __pyx_callargs+__pyx_t_9, (3-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":525 * HostDistance.IGNORED * * def populate(self, cluster, hosts): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.populate(cluster, hosts) */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.populate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":529 * p.load_balancing_policy.populate(cluster, hosts) * * def check_supported(self): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.check_supported() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_9check_supported(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_9check_supported = {"check_supported", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_9check_supported, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_9check_supported(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("check_supported (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 529, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 529, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "check_supported", 0) < (0)) __PYX_ERR(0, 529, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("check_supported", 1, 1, 1, i); __PYX_ERR(0, 529, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 529, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("check_supported", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 529, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.check_supported", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_8check_supported(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_8check_supported(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("check_supported", 0); /* "cassandra/cluster.py":530 * * def check_supported(self): * for p in self.profiles.values(): # <<<<<<<<<<<<<< * p.load_balancing_policy.check_supported() * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 530, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":531 * def check_supported(self): * for p in self.profiles.values(): * p.load_balancing_policy.check_supported() # <<<<<<<<<<<<<< * * def on_up(self, host): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_check_supported, __pyx_callargs+__pyx_t_9, (1-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":529 * p.load_balancing_policy.populate(cluster, hosts) * * def check_supported(self): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.check_supported() */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.check_supported", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":533 * p.load_balancing_policy.check_supported() * * def on_up(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_up(host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_11on_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_11on_up = {"on_up", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_11on_up, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_11on_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_up (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 533, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 533, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 533, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_up", 0) < (0)) __PYX_ERR(0, 533, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_up", 1, 2, 2, i); __PYX_ERR(0, 533, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 533, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 533, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_up", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 533, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_10on_up(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_10on_up(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_up", 0); /* "cassandra/cluster.py":534 * * def on_up(self, host): * for p in self.profiles.values(): # <<<<<<<<<<<<<< * p.load_balancing_policy.on_up(host) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 534, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":535 * def on_up(self, host): * for p in self.profiles.values(): * p.load_balancing_policy.on_up(host) # <<<<<<<<<<<<<< * * def on_down(self, host): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_up, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":533 * p.load_balancing_policy.check_supported() * * def on_up(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_up(host) */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":537 * p.load_balancing_policy.on_up(host) * * def on_down(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_down(host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_13on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_13on_down = {"on_down", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_13on_down, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_13on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_down (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 537, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 537, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 537, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_down", 0) < (0)) __PYX_ERR(0, 537, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_down", 1, 2, 2, i); __PYX_ERR(0, 537, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 537, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 537, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_down", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 537, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_12on_down(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_12on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_down", 0); /* "cassandra/cluster.py":538 * * def on_down(self, host): * for p in self.profiles.values(): # <<<<<<<<<<<<<< * p.load_balancing_policy.on_down(host) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 538, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":539 * def on_down(self, host): * for p in self.profiles.values(): * p.load_balancing_policy.on_down(host) # <<<<<<<<<<<<<< * * def on_add(self, host): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":537 * p.load_balancing_policy.on_up(host) * * def on_down(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_down(host) */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":541 * p.load_balancing_policy.on_down(host) * * def on_add(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_add(host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_15on_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_15on_add = {"on_add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_15on_add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_15on_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_add (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 541, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 541, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_add", 0) < (0)) __PYX_ERR(0, 541, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_add", 1, 2, 2, i); __PYX_ERR(0, 541, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 541, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 541, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_add", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 541, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_14on_add(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_14on_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_add", 0); /* "cassandra/cluster.py":542 * * def on_add(self, host): * for p in self.profiles.values(): # <<<<<<<<<<<<<< * p.load_balancing_policy.on_add(host) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 542, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":543 * def on_add(self, host): * for p in self.profiles.values(): * p.load_balancing_policy.on_add(host) # <<<<<<<<<<<<<< * * def on_remove(self, host): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_add, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":541 * p.load_balancing_policy.on_down(host) * * def on_add(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_add(host) */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":545 * p.load_balancing_policy.on_add(host) * * def on_remove(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_remove(host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_17on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_17on_remove = {"on_remove", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_17on_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_17on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_remove (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 545, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 545, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 545, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_remove", 0) < (0)) __PYX_ERR(0, 545, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, i); __PYX_ERR(0, 545, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 545, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 545, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 545, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_16on_remove(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_16on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_p = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_remove", 0); /* "cassandra/cluster.py":546 * * def on_remove(self, host): * for p in self.profiles.values(): # <<<<<<<<<<<<<< * p.load_balancing_policy.on_remove(host) * */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 546, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":547 * def on_remove(self, host): * for p in self.profiles.values(): * p.load_balancing_policy.on_remove(host) # <<<<<<<<<<<<<< * * @property */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_p, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_9 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_remove, __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":545 * p.load_balancing_policy.on_add(host) * * def on_remove(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_remove(host) */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_p); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":549 * p.load_balancing_policy.on_remove(host) * * @property # <<<<<<<<<<<<<< * def default(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_19default(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ProfileManager_18default, "\n internal-only; no checks are done because this entry is populated on cluster init\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ProfileManager_19default = {"default", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ProfileManager_19default, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ProfileManager_18default}; static PyObject *__pyx_pw_9cassandra_7cluster_14ProfileManager_19default(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 549, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 549, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default", 0) < (0)) __PYX_ERR(0, 549, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default", 1, 1, 1, i); __PYX_ERR(0, 549, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 549, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 549, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ProfileManager.default", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ProfileManager_18default(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ProfileManager_18default(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default", 0); /* "cassandra/cluster.py":554 * internal-only; no checks are done because this entry is populated on cluster init * """ * return self.profiles[EXEC_PROFILE_DEFAULT] # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __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_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":549 * p.load_balancing_policy.on_remove(host) * * @property # <<<<<<<<<<<<<< * def default(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ProfileManager.default", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":688 * _auth_provider_callable = None * * @property # <<<<<<<<<<<<<< * def auth_provider(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_1auth_provider(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_auth_provider, "\n When :attr:`~.Cluster.protocol_version` is 2 or higher, this should\n be an instance of a subclass of :class:`~cassandra.auth.AuthProvider`,\n such as :class:`~.PlainTextAuthProvider`.\n\n When :attr:`~.Cluster.protocol_version` is 1, this should be\n a function that accepts one argument, the IP address of a node,\n and returns a dict of credentials for that node.\n\n When not using authentication, this should be left as :const:`None`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_1auth_provider = {"auth_provider", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_1auth_provider, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_auth_provider}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_1auth_provider(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("auth_provider (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 688, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 688, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "auth_provider", 0) < (0)) __PYX_ERR(0, 688, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("auth_provider", 1, 1, 1, i); __PYX_ERR(0, 688, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 688, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("auth_provider", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 688, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.auth_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_auth_provider(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_auth_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("auth_provider", 0); /* "cassandra/cluster.py":701 * When not using authentication, this should be left as :const:`None`. * """ * return self._auth_provider # <<<<<<<<<<<<<< * * @auth_provider.setter # noqa */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":688 * _auth_provider_callable = None * * @property # <<<<<<<<<<<<<< * def auth_provider(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Cluster.auth_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":703 * return self._auth_provider * * @auth_provider.setter # noqa # <<<<<<<<<<<<<< * def auth_provider(self, value): * if not value: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_3auth_provider(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_3auth_provider = {"auth_provider", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_3auth_provider, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_3auth_provider(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_value = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("auth_provider (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_value,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 703, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 703, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 703, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "auth_provider", 0) < (0)) __PYX_ERR(0, 703, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("auth_provider", 1, 2, 2, i); __PYX_ERR(0, 703, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 703, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 703, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_value = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("auth_provider", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 703, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.auth_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_2auth_provider(__pyx_self, __pyx_v_self, __pyx_v_value); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_2auth_provider(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) { 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; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; size_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("auth_provider", 0); /* "cassandra/cluster.py":705 * @auth_provider.setter # noqa * def auth_provider(self, value): * if not value: # <<<<<<<<<<<<<< * self._auth_provider = value * return */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 705, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "cassandra/cluster.py":706 * def auth_provider(self, value): * if not value: * self._auth_provider = value # <<<<<<<<<<<<<< * return * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider, __pyx_v_value) < (0)) __PYX_ERR(0, 706, __pyx_L1_error) /* "cassandra/cluster.py":707 * if not value: * self._auth_provider = value * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":705 * @auth_provider.setter # noqa * def auth_provider(self, value): * if not value: # <<<<<<<<<<<<<< * self._auth_provider = value * return */ } /* "cassandra/cluster.py":709 * return * * try: # <<<<<<<<<<<<<< * self._auth_provider_callable = value.new_authenticator * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "cassandra/cluster.py":710 * * try: * self._auth_provider_callable = value.new_authenticator # <<<<<<<<<<<<<< * except AttributeError: * if self.protocol_version > 1: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_mstate_global->__pyx_n_u_new_authenticator); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 710, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider_callable, __pyx_t_6) < (0)) __PYX_ERR(0, 710, __pyx_L4_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":709 * return * * try: # <<<<<<<<<<<<<< * self._auth_provider_callable = value.new_authenticator * except AttributeError: */ } __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; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":711 * try: * self._auth_provider_callable = value.new_authenticator * except AttributeError: # <<<<<<<<<<<<<< * if self.protocol_version > 1: * raise TypeError("auth_provider must implement the cassandra.auth.AuthProvider " */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError)))); if (__pyx_t_7) { __Pyx_AddTraceback("cassandra.cluster.Cluster.auth_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 711, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":712 * self._auth_provider_callable = value.new_authenticator * except AttributeError: * if self.protocol_version > 1: # <<<<<<<<<<<<<< * raise TypeError("auth_provider must implement the cassandra.auth.AuthProvider " * "interface when protocol_version >= 2") */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 712, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = PyObject_RichCompare(__pyx_t_10, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 712, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 712, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":713 * except AttributeError: * if self.protocol_version > 1: * raise TypeError("auth_provider must implement the cassandra.auth.AuthProvider " # <<<<<<<<<<<<<< * "interface when protocol_version >= 2") * elif not callable(value): */ __pyx_t_10 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_auth_provider_must_implement_the}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 713, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(0, 713, __pyx_L6_except_error) /* "cassandra/cluster.py":712 * self._auth_provider_callable = value.new_authenticator * except AttributeError: * if self.protocol_version > 1: # <<<<<<<<<<<<<< * raise TypeError("auth_provider must implement the cassandra.auth.AuthProvider " * "interface when protocol_version >= 2") */ } /* "cassandra/cluster.py":715 * raise TypeError("auth_provider must implement the cassandra.auth.AuthProvider " * "interface when protocol_version >= 2") * elif not callable(value): # <<<<<<<<<<<<<< * raise TypeError("auth_provider must be callable when protocol_version == 1") * self._auth_provider_callable = value */ __pyx_t_2 = __Pyx_PyCallable_Check(__pyx_v_value); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 715, __pyx_L6_except_error) __pyx_t_1 = (!__pyx_t_2); if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":716 * "interface when protocol_version >= 2") * elif not callable(value): * raise TypeError("auth_provider must be callable when protocol_version == 1") # <<<<<<<<<<<<<< * self._auth_provider_callable = value * */ __pyx_t_10 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_auth_provider_must_be_callable_w}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 716, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(0, 716, __pyx_L6_except_error) /* "cassandra/cluster.py":715 * raise TypeError("auth_provider must implement the cassandra.auth.AuthProvider " * "interface when protocol_version >= 2") * elif not callable(value): # <<<<<<<<<<<<<< * raise TypeError("auth_provider must be callable when protocol_version == 1") * self._auth_provider_callable = value */ } /* "cassandra/cluster.py":717 * elif not callable(value): * raise TypeError("auth_provider must be callable when protocol_version == 1") * self._auth_provider_callable = value # <<<<<<<<<<<<<< * * self._auth_provider = value */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider_callable, __pyx_v_value) < (0)) __PYX_ERR(0, 717, __pyx_L6_except_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; /* "cassandra/cluster.py":709 * return * * try: # <<<<<<<<<<<<<< * self._auth_provider_callable = value.new_authenticator * except AttributeError: */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L9_try_end:; } /* "cassandra/cluster.py":719 * self._auth_provider_callable = value * * self._auth_provider = value # <<<<<<<<<<<<<< * * _load_balancing_policy = None */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider, __pyx_v_value) < (0)) __PYX_ERR(0, 719, __pyx_L1_error) /* "cassandra/cluster.py":703 * return self._auth_provider * * @auth_provider.setter # noqa # <<<<<<<<<<<<<< * def auth_provider(self, value): * if not value: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("cassandra.cluster.Cluster.auth_provider", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":722 * * _load_balancing_policy = None * @property # <<<<<<<<<<<<<< * def load_balancing_policy(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_5load_balancing_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_4load_balancing_policy, "\n An instance of :class:`.policies.LoadBalancingPolicy` or\n one of its subclasses.\n\n .. versionchanged:: 2.6.0\n\n Defaults to :class:`~.TokenAwarePolicy` (:class:`~.DCAwareRoundRobinPolicy`).\n when using CPython (where the murmur3 extension is available). :class:`~.DCAwareRoundRobinPolicy`\n otherwise. Default local DC will be chosen from contact points.\n\n **Please see** :class:`~.DCAwareRoundRobinPolicy` **for a discussion on default behavior with respect to\n DC locality and remote nodes.**\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_5load_balancing_policy = {"load_balancing_policy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_5load_balancing_policy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_4load_balancing_policy}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_5load_balancing_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("load_balancing_policy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 722, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 722, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "load_balancing_policy", 0) < (0)) __PYX_ERR(0, 722, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("load_balancing_policy", 1, 1, 1, i); __PYX_ERR(0, 722, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 722, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("load_balancing_policy", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 722, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.load_balancing_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_4load_balancing_policy(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_4load_balancing_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("load_balancing_policy", 0); /* "cassandra/cluster.py":737 * DC locality and remote nodes.** * """ * return self._load_balancing_policy # <<<<<<<<<<<<<< * * @load_balancing_policy.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":722 * * _load_balancing_policy = None * @property # <<<<<<<<<<<<<< * def load_balancing_policy(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Cluster.load_balancing_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":739 * return self._load_balancing_policy * * @load_balancing_policy.setter # <<<<<<<<<<<<<< * def load_balancing_policy(self, lbp): * if self._config_mode == _ConfigMode.PROFILES: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_7load_balancing_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_7load_balancing_policy = {"load_balancing_policy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_7load_balancing_policy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_7load_balancing_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_lbp = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("load_balancing_policy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_lbp,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 739, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 739, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 739, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "load_balancing_policy", 0) < (0)) __PYX_ERR(0, 739, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("load_balancing_policy", 1, 2, 2, i); __PYX_ERR(0, 739, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 739, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 739, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_lbp = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("load_balancing_policy", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 739, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.load_balancing_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_6load_balancing_policy(__pyx_self, __pyx_v_self, __pyx_v_lbp); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_6load_balancing_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_lbp) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("load_balancing_policy", 0); /* "cassandra/cluster.py":741 * @load_balancing_policy.setter * def load_balancing_policy(self, lbp): * if self._config_mode == _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * raise ValueError("Cannot set Cluster.load_balancing_policy while using Configuration Profiles. Set this in a profile instead.") * self._load_balancing_policy = lbp */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PROFILES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_4)) { /* "cassandra/cluster.py":742 * def load_balancing_policy(self, lbp): * if self._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Cluster.load_balancing_policy while using Configuration Profiles. Set this in a profile instead.") # <<<<<<<<<<<<<< * self._load_balancing_policy = lbp * self._config_mode = _ConfigMode.LEGACY */ __pyx_t_3 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_set_Cluster_load_balancin}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 742, __pyx_L1_error) /* "cassandra/cluster.py":741 * @load_balancing_policy.setter * def load_balancing_policy(self, lbp): * if self._config_mode == _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * raise ValueError("Cannot set Cluster.load_balancing_policy while using Configuration Profiles. Set this in a profile instead.") * self._load_balancing_policy = lbp */ } /* "cassandra/cluster.py":743 * if self._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Cluster.load_balancing_policy while using Configuration Profiles. Set this in a profile instead.") * self._load_balancing_policy = lbp # <<<<<<<<<<<<<< * self._config_mode = _ConfigMode.LEGACY * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_2, __pyx_v_lbp) < (0)) __PYX_ERR(0, 743, __pyx_L1_error) /* "cassandra/cluster.py":744 * raise ValueError("Cannot set Cluster.load_balancing_policy while using Configuration Profiles. Set this in a profile instead.") * self._load_balancing_policy = lbp * self._config_mode = _ConfigMode.LEGACY # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode, __pyx_t_3) < (0)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":739 * return self._load_balancing_policy * * @load_balancing_policy.setter # <<<<<<<<<<<<<< * def load_balancing_policy(self, lbp): * if self._config_mode == _ConfigMode.PROFILES: */ /* 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("cassandra.cluster.Cluster.load_balancing_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":746 * self._config_mode = _ConfigMode.LEGACY * * @property # <<<<<<<<<<<<<< * def _default_load_balancing_policy(self): * return self.profile_manager.default.load_balancing_policy */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_9_default_load_balancing_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_9_default_load_balancing_policy = {"_default_load_balancing_policy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_9_default_load_balancing_policy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_9_default_load_balancing_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_default_load_balancing_policy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 746, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 746, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_default_load_balancing_policy", 0) < (0)) __PYX_ERR(0, 746, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_default_load_balancing_policy", 1, 1, 1, i); __PYX_ERR(0, 746, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 746, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_default_load_balancing_policy", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 746, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._default_load_balancing_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_8_default_load_balancing_policy(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_8_default_load_balancing_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_default_load_balancing_policy", 0); /* "cassandra/cluster.py":748 * @property * def _default_load_balancing_policy(self): * return self.profile_manager.default.load_balancing_policy # <<<<<<<<<<<<<< * * reconnection_policy = ExponentialReconnectionPolicy(1.0, 600.0) */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __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_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __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; /* "cassandra/cluster.py":746 * self._config_mode = _ConfigMode.LEGACY * * @property # <<<<<<<<<<<<<< * def _default_load_balancing_policy(self): * return self.profile_manager.default.load_balancing_policy */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster._default_load_balancing_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":758 * * _default_retry_policy = RetryPolicy() * @property # <<<<<<<<<<<<<< * def default_retry_policy(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_11default_retry_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_10default_retry_policy, "\n A default :class:`.policies.RetryPolicy` instance to use for all\n :class:`.Statement` objects which do not have a :attr:`~.Statement.retry_policy`\n explicitly set.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_11default_retry_policy = {"default_retry_policy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_11default_retry_policy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_10default_retry_policy}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_11default_retry_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_retry_policy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 758, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 758, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_retry_policy", 0) < (0)) __PYX_ERR(0, 758, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_retry_policy", 1, 1, 1, i); __PYX_ERR(0, 758, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 758, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_retry_policy", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 758, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.default_retry_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_10default_retry_policy(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_10default_retry_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_retry_policy", 0); /* "cassandra/cluster.py":765 * explicitly set. * """ * return self._default_retry_policy # <<<<<<<<<<<<<< * * @default_retry_policy.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_retry_policy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":758 * * _default_retry_policy = RetryPolicy() * @property # <<<<<<<<<<<<<< * def default_retry_policy(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Cluster.default_retry_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":767 * return self._default_retry_policy * * @default_retry_policy.setter # <<<<<<<<<<<<<< * def default_retry_policy(self, policy): * if self._config_mode == _ConfigMode.PROFILES: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_13default_retry_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_13default_retry_policy = {"default_retry_policy", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_13default_retry_policy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_13default_retry_policy(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_policy = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_retry_policy (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_policy,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 767, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 767, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 767, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_retry_policy", 0) < (0)) __PYX_ERR(0, 767, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_retry_policy", 1, 2, 2, i); __PYX_ERR(0, 767, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 767, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 767, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_policy = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_retry_policy", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 767, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.default_retry_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_12default_retry_policy(__pyx_self, __pyx_v_self, __pyx_v_policy); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_12default_retry_policy(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_policy) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_retry_policy", 0); /* "cassandra/cluster.py":769 * @default_retry_policy.setter * def default_retry_policy(self, policy): * if self._config_mode == _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * raise ValueError("Cannot set Cluster.default_retry_policy while using Configuration Profiles. Set this in a profile instead.") * self._default_retry_policy = policy */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PROFILES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_4)) { /* "cassandra/cluster.py":770 * def default_retry_policy(self, policy): * if self._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Cluster.default_retry_policy while using Configuration Profiles. Set this in a profile instead.") # <<<<<<<<<<<<<< * self._default_retry_policy = policy * self._config_mode = _ConfigMode.LEGACY */ __pyx_t_3 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_set_Cluster_default_retry}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 770, __pyx_L1_error) /* "cassandra/cluster.py":769 * @default_retry_policy.setter * def default_retry_policy(self, policy): * if self._config_mode == _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * raise ValueError("Cannot set Cluster.default_retry_policy while using Configuration Profiles. Set this in a profile instead.") * self._default_retry_policy = policy */ } /* "cassandra/cluster.py":771 * if self._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Cluster.default_retry_policy while using Configuration Profiles. Set this in a profile instead.") * self._default_retry_policy = policy # <<<<<<<<<<<<<< * self._config_mode = _ConfigMode.LEGACY * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_retry_policy, __pyx_v_policy) < (0)) __PYX_ERR(0, 771, __pyx_L1_error) /* "cassandra/cluster.py":772 * raise ValueError("Cannot set Cluster.default_retry_policy while using Configuration Profiles. Set this in a profile instead.") * self._default_retry_policy = policy * self._config_mode = _ConfigMode.LEGACY # <<<<<<<<<<<<<< * * conviction_policy_factory = SimpleConvictionPolicy */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode, __pyx_t_3) < (0)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":767 * return self._default_retry_policy * * @default_retry_policy.setter # <<<<<<<<<<<<<< * def default_retry_policy(self, policy): * if self._config_mode == _ConfigMode.PROFILES: */ /* 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("cassandra.cluster.Cluster.default_retry_policy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1053 * """ * * @property # <<<<<<<<<<<<<< * def schema_metadata_enabled(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_15schema_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_14schema_metadata_enabled, "\n Flag indicating whether internal schema metadata is updated.\n\n When disabled, the driver does not populate Cluster.metadata.keyspaces on connect, or on schema change events. This\n can be used to speed initial connection, and reduce load on client and server during operation. Turning this off\n gives away token aware request routing, and programmatic inspection of the metadata model.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_15schema_metadata_enabled = {"schema_metadata_enabled", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_15schema_metadata_enabled, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_14schema_metadata_enabled}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_15schema_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("schema_metadata_enabled (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1053, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1053, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "schema_metadata_enabled", 0) < (0)) __PYX_ERR(0, 1053, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("schema_metadata_enabled", 1, 1, 1, i); __PYX_ERR(0, 1053, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1053, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("schema_metadata_enabled", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1053, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.schema_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_14schema_metadata_enabled(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_14schema_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("schema_metadata_enabled", 0); /* "cassandra/cluster.py":1062 * gives away token aware request routing, and programmatic inspection of the metadata model. * """ * return self.control_connection._schema_meta_enabled # <<<<<<<<<<<<<< * * @schema_metadata_enabled.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_schema_meta_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __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; /* "cassandra/cluster.py":1053 * """ * * @property # <<<<<<<<<<<<<< * def schema_metadata_enabled(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.schema_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1064 * return self.control_connection._schema_meta_enabled * * @schema_metadata_enabled.setter # <<<<<<<<<<<<<< * def schema_metadata_enabled(self, enabled): * self.control_connection._schema_meta_enabled = bool(enabled) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_17schema_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_17schema_metadata_enabled = {"schema_metadata_enabled", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_17schema_metadata_enabled, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_17schema_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_enabled = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("schema_metadata_enabled (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_enabled,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1064, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1064, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1064, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "schema_metadata_enabled", 0) < (0)) __PYX_ERR(0, 1064, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("schema_metadata_enabled", 1, 2, 2, i); __PYX_ERR(0, 1064, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1064, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1064, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_enabled = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("schema_metadata_enabled", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1064, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.schema_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_16schema_metadata_enabled(__pyx_self, __pyx_v_self, __pyx_v_enabled); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_16schema_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("schema_metadata_enabled", 0); /* "cassandra/cluster.py":1066 * @schema_metadata_enabled.setter * def schema_metadata_enabled(self, enabled): * self.control_connection._schema_meta_enabled = bool(enabled) # <<<<<<<<<<<<<< * * @property */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1066, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_schema_meta_enabled, __pyx_t_2) < (0)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1064 * return self.control_connection._schema_meta_enabled * * @schema_metadata_enabled.setter # <<<<<<<<<<<<<< * def schema_metadata_enabled(self, enabled): * self.control_connection._schema_meta_enabled = bool(enabled) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Cluster.schema_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1068 * self.control_connection._schema_meta_enabled = bool(enabled) * * @property # <<<<<<<<<<<<<< * def token_metadata_enabled(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_19token_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_18token_metadata_enabled, "\n Flag indicating whether internal token metadata is updated.\n\n When disabled, the driver does not query node token information on connect, or on topology change events. This\n can be used to speed initial connection, and reduce load on client and server during operation. It is most useful\n in large clusters using vnodes, where the token map can be expensive to compute. Turning this off\n gives away token aware request routing, and programmatic inspection of the token ring.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_19token_metadata_enabled = {"token_metadata_enabled", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_19token_metadata_enabled, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_18token_metadata_enabled}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_19token_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("token_metadata_enabled (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1068, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1068, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "token_metadata_enabled", 0) < (0)) __PYX_ERR(0, 1068, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("token_metadata_enabled", 1, 1, 1, i); __PYX_ERR(0, 1068, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1068, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("token_metadata_enabled", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1068, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.token_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_18token_metadata_enabled(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_18token_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("token_metadata_enabled", 0); /* "cassandra/cluster.py":1078 * gives away token aware request routing, and programmatic inspection of the token ring. * """ * return self.control_connection._token_meta_enabled # <<<<<<<<<<<<<< * * @token_metadata_enabled.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __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; /* "cassandra/cluster.py":1068 * self.control_connection._schema_meta_enabled = bool(enabled) * * @property # <<<<<<<<<<<<<< * def token_metadata_enabled(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.token_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1080 * return self.control_connection._token_meta_enabled * * @token_metadata_enabled.setter # <<<<<<<<<<<<<< * def token_metadata_enabled(self, enabled): * self.control_connection._token_meta_enabled = bool(enabled) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_21token_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_21token_metadata_enabled = {"token_metadata_enabled", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_21token_metadata_enabled, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_21token_metadata_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_enabled = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("token_metadata_enabled (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_enabled,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1080, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1080, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1080, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "token_metadata_enabled", 0) < (0)) __PYX_ERR(0, 1080, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("token_metadata_enabled", 1, 2, 2, i); __PYX_ERR(0, 1080, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1080, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1080, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_enabled = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("token_metadata_enabled", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1080, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.token_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_20token_metadata_enabled(__pyx_self, __pyx_v_self, __pyx_v_enabled); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_20token_metadata_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("token_metadata_enabled", 0); /* "cassandra/cluster.py":1082 * @token_metadata_enabled.setter * def token_metadata_enabled(self, enabled): * self.control_connection._token_meta_enabled = bool(enabled) # <<<<<<<<<<<<<< * * endpoint_factory = None */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1082, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_token_meta_enabled, __pyx_t_2) < (0)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1080 * return self.control_connection._token_meta_enabled * * @token_metadata_enabled.setter # <<<<<<<<<<<<<< * def token_metadata_enabled(self, enabled): * self.control_connection._token_meta_enabled = bool(enabled) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Cluster.token_metadata_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1114 * _listener_lock = None * * def __init__(self, # <<<<<<<<<<<<<< * contact_points=_NOT_SET, * port=9042, */ static PyObject *__pyx_pf_9cassandra_7cluster_46__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":1155 * client_id=None, * cloud=None, * column_encryption_policy=None): # <<<<<<<<<<<<<< * """ * ``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as */ __pyx_t_1 = PyTuple_New(41); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_9042)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_9042)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_mstate_global->__pyx_int_9042)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 8, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 9, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 10, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 11, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 12, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 13, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_2)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_2)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 14, ((PyObject*)__pyx_mstate_global->__pyx_int_2)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_10)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_10)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 15, ((PyObject*)__pyx_mstate_global->__pyx_int_10)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_float_2_0)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_float_2_0)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 16, ((PyObject*)__pyx_mstate_global->__pyx_float_2_0)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_30)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_30)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 17, ((PyObject*)__pyx_mstate_global->__pyx_int_30)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_2)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_2)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 18, ((PyObject*)__pyx_mstate_global->__pyx_int_2)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_10)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_10)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 19, ((PyObject*)__pyx_mstate_global->__pyx_int_10)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_5)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_5)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 20, ((PyObject*)__pyx_mstate_global->__pyx_int_5)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 21, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 22, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 23, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_2)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_2)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 24, ((PyObject*)__pyx_mstate_global->__pyx_int_2)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 25, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 26, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 27, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 28, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 29, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_30)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_30)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 30, ((PyObject*)__pyx_mstate_global->__pyx_int_30)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 31, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 32, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 33, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 34, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 35, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 36, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_30)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_30)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 37, ((PyObject*)__pyx_mstate_global->__pyx_int_30)) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 38, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 39, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 40, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); /* "cassandra/cluster.py":1114 * _listener_lock = None * * def __init__(self, # <<<<<<<<<<<<<< * contact_points=_NOT_SET, * port=9042, */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 1114, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_23__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_22__init__, "\n ``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as\n establishing connection pools or refreshing metadata.\n\n Any of the mutable Cluster attributes may be set as keyword arguments to the constructor.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_23__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_23__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_22__init__}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_23__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_contact_points = 0; PyObject *__pyx_v_port = 0; PyObject *__pyx_v_compression = 0; PyObject *__pyx_v_auth_provider = 0; PyObject *__pyx_v_load_balancing_policy = 0; PyObject *__pyx_v_reconnection_policy = 0; PyObject *__pyx_v_default_retry_policy = 0; PyObject *__pyx_v_conviction_policy_factory = 0; PyObject *__pyx_v_metrics_enabled = 0; PyObject *__pyx_v_connection_class = 0; PyObject *__pyx_v_ssl_options = 0; PyObject *__pyx_v_sockopts = 0; PyObject *__pyx_v_cql_version = 0; PyObject *__pyx_v_protocol_version = 0; PyObject *__pyx_v_executor_threads = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; PyObject *__pyx_v_control_connection_timeout = 0; PyObject *__pyx_v_idle_heartbeat_interval = 0; PyObject *__pyx_v_schema_event_refresh_window = 0; PyObject *__pyx_v_topology_event_refresh_window = 0; PyObject *__pyx_v_connect_timeout = 0; PyObject *__pyx_v_schema_metadata_enabled = 0; PyObject *__pyx_v_token_metadata_enabled = 0; PyObject *__pyx_v_address_translator = 0; PyObject *__pyx_v_status_event_refresh_window = 0; PyObject *__pyx_v_prepare_on_all_hosts = 0; PyObject *__pyx_v_reprepare_on_up = 0; PyObject *__pyx_v_execution_profiles = 0; PyObject *__pyx_v_allow_beta_protocol_version = 0; PyObject *__pyx_v_timestamp_generator = 0; PyObject *__pyx_v_idle_heartbeat_timeout = 0; PyObject *__pyx_v_no_compact = 0; PyObject *__pyx_v_ssl_context = 0; PyObject *__pyx_v_endpoint_factory = 0; PyObject *__pyx_v_application_name = 0; PyObject *__pyx_v_application_version = 0; PyObject *__pyx_v_monitor_reporting_enabled = 0; PyObject *__pyx_v_monitor_reporting_interval = 0; PyObject *__pyx_v_client_id = 0; PyObject *__pyx_v_cloud = 0; PyObject *__pyx_v_column_encryption_policy = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[42] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_contact_points,&__pyx_mstate_global->__pyx_n_u_port,&__pyx_mstate_global->__pyx_n_u_compression,&__pyx_mstate_global->__pyx_n_u_auth_provider_2,&__pyx_mstate_global->__pyx_n_u_load_balancing_policy,&__pyx_mstate_global->__pyx_n_u_reconnection_policy,&__pyx_mstate_global->__pyx_n_u_default_retry_policy_2,&__pyx_mstate_global->__pyx_n_u_conviction_policy_factory,&__pyx_mstate_global->__pyx_n_u_metrics_enabled,&__pyx_mstate_global->__pyx_n_u_connection_class,&__pyx_mstate_global->__pyx_n_u_ssl_options,&__pyx_mstate_global->__pyx_n_u_sockopts,&__pyx_mstate_global->__pyx_n_u_cql_version,&__pyx_mstate_global->__pyx_n_u_protocol_version,&__pyx_mstate_global->__pyx_n_u_executor_threads,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,&__pyx_mstate_global->__pyx_n_u_control_connection_timeout,&__pyx_mstate_global->__pyx_n_u_idle_heartbeat_interval,&__pyx_mstate_global->__pyx_n_u_schema_event_refresh_window,&__pyx_mstate_global->__pyx_n_u_topology_event_refresh_window,&__pyx_mstate_global->__pyx_n_u_connect_timeout,&__pyx_mstate_global->__pyx_n_u_schema_metadata_enabled,&__pyx_mstate_global->__pyx_n_u_token_metadata_enabled,&__pyx_mstate_global->__pyx_n_u_address_translator,&__pyx_mstate_global->__pyx_n_u_status_event_refresh_window,&__pyx_mstate_global->__pyx_n_u_prepare_on_all_hosts,&__pyx_mstate_global->__pyx_n_u_reprepare_on_up,&__pyx_mstate_global->__pyx_n_u_execution_profiles,&__pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version,&__pyx_mstate_global->__pyx_n_u_timestamp_generator,&__pyx_mstate_global->__pyx_n_u_idle_heartbeat_timeout,&__pyx_mstate_global->__pyx_n_u_no_compact,&__pyx_mstate_global->__pyx_n_u_ssl_context,&__pyx_mstate_global->__pyx_n_u_endpoint_factory,&__pyx_mstate_global->__pyx_n_u_application_name,&__pyx_mstate_global->__pyx_n_u_application_version,&__pyx_mstate_global->__pyx_n_u_monitor_reporting_enabled,&__pyx_mstate_global->__pyx_n_u_monitor_reporting_interval,&__pyx_mstate_global->__pyx_n_u_client_id,&__pyx_mstate_global->__pyx_n_u_cloud,&__pyx_mstate_global->__pyx_n_u_column_encryption_policy,0}; struct __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1114, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 42: values[41] = __Pyx_ArgRef_FASTCALL(__pyx_args, 41); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[41])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 41: values[40] = __Pyx_ArgRef_FASTCALL(__pyx_args, 40); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[40])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 40: values[39] = __Pyx_ArgRef_FASTCALL(__pyx_args, 39); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[39])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 39: values[38] = __Pyx_ArgRef_FASTCALL(__pyx_args, 38); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[38])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 38: values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 37: values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 36: values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 35: values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 34: values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 33: values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 32: values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 31: values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 30: values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 29: values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 28: values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 27: values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 26: values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 25: values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 24: values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 23: values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 22: values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 21: values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 20: values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 19: values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 18: values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 17: values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 16: values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 15: values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 14: values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 13: values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 12: values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 11: values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 1114, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_9042))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":1118 * port=9042, * compression=True, * auth_provider=None, # <<<<<<<<<<<<<< * load_balancing_policy=None, * reconnection_policy=None, */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1119 * compression=True, * auth_provider=None, * load_balancing_policy=None, # <<<<<<<<<<<<<< * reconnection_policy=None, * default_retry_policy=None, */ if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1120 * auth_provider=None, * load_balancing_policy=None, * reconnection_policy=None, # <<<<<<<<<<<<<< * default_retry_policy=None, * conviction_policy_factory=None, */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1121 * load_balancing_policy=None, * reconnection_policy=None, * default_retry_policy=None, # <<<<<<<<<<<<<< * conviction_policy_factory=None, * metrics_enabled=False, */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1122 * reconnection_policy=None, * default_retry_policy=None, * conviction_policy_factory=None, # <<<<<<<<<<<<<< * metrics_enabled=False, * connection_class=None, */ if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":1124 * conviction_policy_factory=None, * metrics_enabled=False, * connection_class=None, # <<<<<<<<<<<<<< * ssl_options=None, * sockopts=None, */ if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1125 * metrics_enabled=False, * connection_class=None, * ssl_options=None, # <<<<<<<<<<<<<< * sockopts=None, * cql_version=None, */ if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1126 * connection_class=None, * ssl_options=None, * sockopts=None, # <<<<<<<<<<<<<< * cql_version=None, * protocol_version=_NOT_SET, */ if (!values[12]) values[12] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1127 * ssl_options=None, * sockopts=None, * cql_version=None, # <<<<<<<<<<<<<< * protocol_version=_NOT_SET, * executor_threads=2, */ if (!values[13]) values[13] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[14]) values[14] = __Pyx_NewRef(__pyx_dynamic_args->arg1); if (!values[15]) values[15] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2))); if (!values[16]) values[16] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_10))); if (!values[17]) values[17] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_2_0))); if (!values[18]) values[18] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_30))); if (!values[19]) values[19] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2))); if (!values[20]) values[20] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_10))); if (!values[21]) values[21] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5))); if (!values[22]) values[22] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[23]) values[23] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":1138 * schema_metadata_enabled=True, * token_metadata_enabled=True, * address_translator=None, # <<<<<<<<<<<<<< * status_event_refresh_window=2, * prepare_on_all_hosts=True, */ if (!values[24]) values[24] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[25]) values[25] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2))); if (!values[26]) values[26] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[27]) values[27] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":1142 * prepare_on_all_hosts=True, * reprepare_on_up=True, * execution_profiles=None, # <<<<<<<<<<<<<< * allow_beta_protocol_version=False, * timestamp_generator=None, */ if (!values[28]) values[28] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[29]) values[29] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":1144 * execution_profiles=None, * allow_beta_protocol_version=False, * timestamp_generator=None, # <<<<<<<<<<<<<< * idle_heartbeat_timeout=30, * no_compact=False, */ if (!values[30]) values[30] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[31]) values[31] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_30))); if (!values[32]) values[32] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":1147 * idle_heartbeat_timeout=30, * no_compact=False, * ssl_context=None, # <<<<<<<<<<<<<< * endpoint_factory=None, * application_name=None, */ if (!values[33]) values[33] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1148 * no_compact=False, * ssl_context=None, * endpoint_factory=None, # <<<<<<<<<<<<<< * application_name=None, * application_version=None, */ if (!values[34]) values[34] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1149 * ssl_context=None, * endpoint_factory=None, * application_name=None, # <<<<<<<<<<<<<< * application_version=None, * monitor_reporting_enabled=True, */ if (!values[35]) values[35] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1150 * endpoint_factory=None, * application_name=None, * application_version=None, # <<<<<<<<<<<<<< * monitor_reporting_enabled=True, * monitor_reporting_interval=30, */ if (!values[36]) values[36] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[37]) values[37] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[38]) values[38] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_30))); /* "cassandra/cluster.py":1153 * monitor_reporting_enabled=True, * monitor_reporting_interval=30, * client_id=None, # <<<<<<<<<<<<<< * cloud=None, * column_encryption_policy=None): */ if (!values[39]) values[39] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1154 * monitor_reporting_interval=30, * client_id=None, * cloud=None, # <<<<<<<<<<<<<< * column_encryption_policy=None): * """ */ if (!values[40]) values[40] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1155 * client_id=None, * cloud=None, * column_encryption_policy=None): # <<<<<<<<<<<<<< * """ * ``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as */ if (!values[41]) values[41] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 42, i); __PYX_ERR(0, 1114, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 42: values[41] = __Pyx_ArgRef_FASTCALL(__pyx_args, 41); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[41])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 41: values[40] = __Pyx_ArgRef_FASTCALL(__pyx_args, 40); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[40])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 40: values[39] = __Pyx_ArgRef_FASTCALL(__pyx_args, 39); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[39])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 39: values[38] = __Pyx_ArgRef_FASTCALL(__pyx_args, 38); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[38])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 38: values[37] = __Pyx_ArgRef_FASTCALL(__pyx_args, 37); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[37])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 37: values[36] = __Pyx_ArgRef_FASTCALL(__pyx_args, 36); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[36])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 36: values[35] = __Pyx_ArgRef_FASTCALL(__pyx_args, 35); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[35])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 35: values[34] = __Pyx_ArgRef_FASTCALL(__pyx_args, 34); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[34])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 34: values[33] = __Pyx_ArgRef_FASTCALL(__pyx_args, 33); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[33])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 33: values[32] = __Pyx_ArgRef_FASTCALL(__pyx_args, 32); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[32])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 32: values[31] = __Pyx_ArgRef_FASTCALL(__pyx_args, 31); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[31])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 31: values[30] = __Pyx_ArgRef_FASTCALL(__pyx_args, 30); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[30])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 30: values[29] = __Pyx_ArgRef_FASTCALL(__pyx_args, 29); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[29])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 29: values[28] = __Pyx_ArgRef_FASTCALL(__pyx_args, 28); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[28])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 28: values[27] = __Pyx_ArgRef_FASTCALL(__pyx_args, 27); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[27])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 27: values[26] = __Pyx_ArgRef_FASTCALL(__pyx_args, 26); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[26])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 26: values[25] = __Pyx_ArgRef_FASTCALL(__pyx_args, 25); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[25])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 25: values[24] = __Pyx_ArgRef_FASTCALL(__pyx_args, 24); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[24])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 24: values[23] = __Pyx_ArgRef_FASTCALL(__pyx_args, 23); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[23])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 23: values[22] = __Pyx_ArgRef_FASTCALL(__pyx_args, 22); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[22])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 22: values[21] = __Pyx_ArgRef_FASTCALL(__pyx_args, 21); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[21])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 21: values[20] = __Pyx_ArgRef_FASTCALL(__pyx_args, 20); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[20])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 20: values[19] = __Pyx_ArgRef_FASTCALL(__pyx_args, 19); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[19])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 19: values[18] = __Pyx_ArgRef_FASTCALL(__pyx_args, 18); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[18])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 18: values[17] = __Pyx_ArgRef_FASTCALL(__pyx_args, 17); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[17])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 17: values[16] = __Pyx_ArgRef_FASTCALL(__pyx_args, 16); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[16])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 16: values[15] = __Pyx_ArgRef_FASTCALL(__pyx_args, 15); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[15])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 15: values[14] = __Pyx_ArgRef_FASTCALL(__pyx_args, 14); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[14])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 14: values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 13: values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 12: values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 11: values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1114, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1114, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_9042))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":1118 * port=9042, * compression=True, * auth_provider=None, # <<<<<<<<<<<<<< * load_balancing_policy=None, * reconnection_policy=None, */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1119 * compression=True, * auth_provider=None, * load_balancing_policy=None, # <<<<<<<<<<<<<< * reconnection_policy=None, * default_retry_policy=None, */ if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1120 * auth_provider=None, * load_balancing_policy=None, * reconnection_policy=None, # <<<<<<<<<<<<<< * default_retry_policy=None, * conviction_policy_factory=None, */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1121 * load_balancing_policy=None, * reconnection_policy=None, * default_retry_policy=None, # <<<<<<<<<<<<<< * conviction_policy_factory=None, * metrics_enabled=False, */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1122 * reconnection_policy=None, * default_retry_policy=None, * conviction_policy_factory=None, # <<<<<<<<<<<<<< * metrics_enabled=False, * connection_class=None, */ if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":1124 * conviction_policy_factory=None, * metrics_enabled=False, * connection_class=None, # <<<<<<<<<<<<<< * ssl_options=None, * sockopts=None, */ if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1125 * metrics_enabled=False, * connection_class=None, * ssl_options=None, # <<<<<<<<<<<<<< * sockopts=None, * cql_version=None, */ if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1126 * connection_class=None, * ssl_options=None, * sockopts=None, # <<<<<<<<<<<<<< * cql_version=None, * protocol_version=_NOT_SET, */ if (!values[12]) values[12] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1127 * ssl_options=None, * sockopts=None, * cql_version=None, # <<<<<<<<<<<<<< * protocol_version=_NOT_SET, * executor_threads=2, */ if (!values[13]) values[13] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[14]) values[14] = __Pyx_NewRef(__pyx_dynamic_args->arg1); if (!values[15]) values[15] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2))); if (!values[16]) values[16] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_10))); if (!values[17]) values[17] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_float_2_0))); if (!values[18]) values[18] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_30))); if (!values[19]) values[19] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2))); if (!values[20]) values[20] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_10))); if (!values[21]) values[21] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5))); if (!values[22]) values[22] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[23]) values[23] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":1138 * schema_metadata_enabled=True, * token_metadata_enabled=True, * address_translator=None, # <<<<<<<<<<<<<< * status_event_refresh_window=2, * prepare_on_all_hosts=True, */ if (!values[24]) values[24] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[25]) values[25] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_2))); if (!values[26]) values[26] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[27]) values[27] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":1142 * prepare_on_all_hosts=True, * reprepare_on_up=True, * execution_profiles=None, # <<<<<<<<<<<<<< * allow_beta_protocol_version=False, * timestamp_generator=None, */ if (!values[28]) values[28] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[29]) values[29] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":1144 * execution_profiles=None, * allow_beta_protocol_version=False, * timestamp_generator=None, # <<<<<<<<<<<<<< * idle_heartbeat_timeout=30, * no_compact=False, */ if (!values[30]) values[30] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[31]) values[31] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_30))); if (!values[32]) values[32] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":1147 * idle_heartbeat_timeout=30, * no_compact=False, * ssl_context=None, # <<<<<<<<<<<<<< * endpoint_factory=None, * application_name=None, */ if (!values[33]) values[33] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1148 * no_compact=False, * ssl_context=None, * endpoint_factory=None, # <<<<<<<<<<<<<< * application_name=None, * application_version=None, */ if (!values[34]) values[34] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1149 * ssl_context=None, * endpoint_factory=None, * application_name=None, # <<<<<<<<<<<<<< * application_version=None, * monitor_reporting_enabled=True, */ if (!values[35]) values[35] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1150 * endpoint_factory=None, * application_name=None, * application_version=None, # <<<<<<<<<<<<<< * monitor_reporting_enabled=True, * monitor_reporting_interval=30, */ if (!values[36]) values[36] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[37]) values[37] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[38]) values[38] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_30))); /* "cassandra/cluster.py":1153 * monitor_reporting_enabled=True, * monitor_reporting_interval=30, * client_id=None, # <<<<<<<<<<<<<< * cloud=None, * column_encryption_policy=None): */ if (!values[39]) values[39] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1154 * monitor_reporting_interval=30, * client_id=None, * cloud=None, # <<<<<<<<<<<<<< * column_encryption_policy=None): * """ */ if (!values[40]) values[40] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":1155 * client_id=None, * cloud=None, * column_encryption_policy=None): # <<<<<<<<<<<<<< * """ * ``executor_threads`` defines the number of threads in a pool for handling asynchronous tasks such as */ if (!values[41]) values[41] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_contact_points = values[1]; __pyx_v_port = values[2]; __pyx_v_compression = values[3]; __pyx_v_auth_provider = values[4]; __pyx_v_load_balancing_policy = values[5]; __pyx_v_reconnection_policy = values[6]; __pyx_v_default_retry_policy = values[7]; __pyx_v_conviction_policy_factory = values[8]; __pyx_v_metrics_enabled = values[9]; __pyx_v_connection_class = values[10]; __pyx_v_ssl_options = values[11]; __pyx_v_sockopts = values[12]; __pyx_v_cql_version = values[13]; __pyx_v_protocol_version = values[14]; __pyx_v_executor_threads = values[15]; __pyx_v_max_schema_agreement_wait = values[16]; __pyx_v_control_connection_timeout = values[17]; __pyx_v_idle_heartbeat_interval = values[18]; __pyx_v_schema_event_refresh_window = values[19]; __pyx_v_topology_event_refresh_window = values[20]; __pyx_v_connect_timeout = values[21]; __pyx_v_schema_metadata_enabled = values[22]; __pyx_v_token_metadata_enabled = values[23]; __pyx_v_address_translator = values[24]; __pyx_v_status_event_refresh_window = values[25]; __pyx_v_prepare_on_all_hosts = values[26]; __pyx_v_reprepare_on_up = values[27]; __pyx_v_execution_profiles = values[28]; __pyx_v_allow_beta_protocol_version = values[29]; __pyx_v_timestamp_generator = values[30]; __pyx_v_idle_heartbeat_timeout = values[31]; __pyx_v_no_compact = values[32]; __pyx_v_ssl_context = values[33]; __pyx_v_endpoint_factory = values[34]; __pyx_v_application_name = values[35]; __pyx_v_application_version = values[36]; __pyx_v_monitor_reporting_enabled = values[37]; __pyx_v_monitor_reporting_interval = values[38]; __pyx_v_client_id = values[39]; __pyx_v_cloud = values[40]; __pyx_v_column_encryption_policy = values[41]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 42, __pyx_nargs); __PYX_ERR(0, 1114, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_22__init__(__pyx_self, __pyx_v_self, __pyx_v_contact_points, __pyx_v_port, __pyx_v_compression, __pyx_v_auth_provider, __pyx_v_load_balancing_policy, __pyx_v_reconnection_policy, __pyx_v_default_retry_policy, __pyx_v_conviction_policy_factory, __pyx_v_metrics_enabled, __pyx_v_connection_class, __pyx_v_ssl_options, __pyx_v_sockopts, __pyx_v_cql_version, __pyx_v_protocol_version, __pyx_v_executor_threads, __pyx_v_max_schema_agreement_wait, __pyx_v_control_connection_timeout, __pyx_v_idle_heartbeat_interval, __pyx_v_schema_event_refresh_window, __pyx_v_topology_event_refresh_window, __pyx_v_connect_timeout, __pyx_v_schema_metadata_enabled, __pyx_v_token_metadata_enabled, __pyx_v_address_translator, __pyx_v_status_event_refresh_window, __pyx_v_prepare_on_all_hosts, __pyx_v_reprepare_on_up, __pyx_v_execution_profiles, __pyx_v_allow_beta_protocol_version, __pyx_v_timestamp_generator, __pyx_v_idle_heartbeat_timeout, __pyx_v_no_compact, __pyx_v_ssl_context, __pyx_v_endpoint_factory, __pyx_v_application_name, __pyx_v_application_version, __pyx_v_monitor_reporting_enabled, __pyx_v_monitor_reporting_interval, __pyx_v_client_id, __pyx_v_cloud, __pyx_v_column_encryption_policy); /* "cassandra/cluster.py":1114 * _listener_lock = None * * def __init__(self, # <<<<<<<<<<<<<< * contact_points=_NOT_SET, * port=9042, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_22__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_contact_points, PyObject *__pyx_v_port, PyObject *__pyx_v_compression, PyObject *__pyx_v_auth_provider, PyObject *__pyx_v_load_balancing_policy, PyObject *__pyx_v_reconnection_policy, PyObject *__pyx_v_default_retry_policy, PyObject *__pyx_v_conviction_policy_factory, PyObject *__pyx_v_metrics_enabled, PyObject *__pyx_v_connection_class, PyObject *__pyx_v_ssl_options, PyObject *__pyx_v_sockopts, PyObject *__pyx_v_cql_version, PyObject *__pyx_v_protocol_version, PyObject *__pyx_v_executor_threads, PyObject *__pyx_v_max_schema_agreement_wait, PyObject *__pyx_v_control_connection_timeout, PyObject *__pyx_v_idle_heartbeat_interval, PyObject *__pyx_v_schema_event_refresh_window, PyObject *__pyx_v_topology_event_refresh_window, PyObject *__pyx_v_connect_timeout, PyObject *__pyx_v_schema_metadata_enabled, PyObject *__pyx_v_token_metadata_enabled, PyObject *__pyx_v_address_translator, PyObject *__pyx_v_status_event_refresh_window, PyObject *__pyx_v_prepare_on_all_hosts, PyObject *__pyx_v_reprepare_on_up, PyObject *__pyx_v_execution_profiles, PyObject *__pyx_v_allow_beta_protocol_version, PyObject *__pyx_v_timestamp_generator, PyObject *__pyx_v_idle_heartbeat_timeout, PyObject *__pyx_v_no_compact, PyObject *__pyx_v_ssl_context, PyObject *__pyx_v_endpoint_factory, PyObject *__pyx_v_application_name, PyObject *__pyx_v_application_version, PyObject *__pyx_v_monitor_reporting_enabled, PyObject *__pyx_v_monitor_reporting_interval, PyObject *__pyx_v_client_id, PyObject *__pyx_v_cloud, PyObject *__pyx_v_column_encryption_policy) { PyObject *__pyx_v_uses_twisted = NULL; PyObject *__pyx_v_uses_eventlet = NULL; PyObject *__pyx_v_cloud_config = NULL; PyObject *__pyx_v_raw_contact_points = NULL; PyObject *__pyx_v_cp = NULL; PyObject *__pyx_v_strs_resolved_map = NULL; PyObject *__pyx_v_profiles = NULL; PyObject *__pyx_v_lbp = NULL; PyObject *__pyx_v_default_lbp_profiles = NULL; PyObject *__pyx_v_Metrics = NULL; PyObject *__pyx_8genexpr3__pyx_v_host_id = NULL; PyObject *__pyx_8genexpr4__pyx_v_cp = NULL; PyObject *__pyx_8genexpr5__pyx_v_cp = NULL; PyObject *__pyx_8genexpr6__pyx_v_ep = NULL; PyObject *__pyx_8genexpr7__pyx_v_xs = NULL; PyObject *__pyx_8genexpr8__pyx_v_ip = NULL; PyObject *__pyx_8genexpr8__pyx_v_port = NULL; PyObject *__pyx_8genexpr9__pyx_v_key = NULL; PyObject *__pyx_8genexpr9__pyx_v_value = NULL; PyObject *__pyx_9genexpr10__pyx_v_ip = NULL; PyObject *__pyx_9genexpr10__pyx_v_port = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; int __pyx_t_16; int __pyx_t_17; Py_ssize_t __pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *(*__pyx_t_23)(PyObject *); int __pyx_t_24; PyObject *__pyx_t_25 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_contact_points); __Pyx_INCREF(__pyx_v_auth_provider); __Pyx_INCREF(__pyx_v_ssl_options); __Pyx_INCREF(__pyx_v_ssl_context); __Pyx_INCREF(__pyx_v_endpoint_factory); /* "cassandra/cluster.py":1162 * Any of the mutable Cluster attributes may be set as keyword arguments to the constructor. * """ * if connection_class is not None: # <<<<<<<<<<<<<< * self.connection_class = connection_class * */ __pyx_t_1 = (__pyx_v_connection_class != Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":1163 * """ * if connection_class is not None: * self.connection_class = connection_class # <<<<<<<<<<<<<< * * if cloud is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class, __pyx_v_connection_class) < (0)) __PYX_ERR(0, 1163, __pyx_L1_error) /* "cassandra/cluster.py":1162 * Any of the mutable Cluster attributes may be set as keyword arguments to the constructor. * """ * if connection_class is not None: # <<<<<<<<<<<<<< * self.connection_class = connection_class * */ } /* "cassandra/cluster.py":1165 * self.connection_class = connection_class * * if cloud is not None: # <<<<<<<<<<<<<< * self.cloud = cloud * if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options: */ __pyx_t_1 = (__pyx_v_cloud != Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":1166 * * if cloud is not None: * self.cloud = cloud # <<<<<<<<<<<<<< * if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options: * raise ValueError("contact_points, endpoint_factory, ssl_context, and ssl_options " */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cloud, __pyx_v_cloud) < (0)) __PYX_ERR(0, 1166, __pyx_L1_error) /* "cassandra/cluster.py":1167 * if cloud is not None: * self.cloud = cloud * if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options: # <<<<<<<<<<<<<< * raise ValueError("contact_points, endpoint_factory, ssl_context, and ssl_options " * "cannot be specified with a cloud configuration") */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_v_contact_points != __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_endpoint_factory); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1167, __pyx_L1_error) if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ssl_context); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1167, __pyx_L1_error) if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ssl_options); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1167, __pyx_L1_error) __pyx_t_1 = __pyx_t_3; __pyx_L6_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":1168 * self.cloud = cloud * if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options: * raise ValueError("contact_points, endpoint_factory, ssl_context, and ssl_options " # <<<<<<<<<<<<<< * "cannot be specified with a cloud configuration") * */ __pyx_t_4 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_contact_points_endpoint_factory}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1168, __pyx_L1_error) /* "cassandra/cluster.py":1167 * if cloud is not None: * self.cloud = cloud * if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options: # <<<<<<<<<<<<<< * raise ValueError("contact_points, endpoint_factory, ssl_context, and ssl_options " * "cannot be specified with a cloud configuration") */ } /* "cassandra/cluster.py":1171 * "cannot be specified with a cloud configuration") * * uses_twisted = TwistedConnection and issubclass(self.connection_class, TwistedConnection) # <<<<<<<<<<<<<< * uses_eventlet = EventletConnection and issubclass(self.connection_class, EventletConnection) * cloud_config = dscloud.get_cloud_config(cloud, create_pyopenssl_context=uses_twisted or uses_eventlet) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TwistedConnection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1171, __pyx_L1_error) if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TwistedConnection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_IsSubclass(__pyx_t_4, __pyx_t_6); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; __pyx_L10_bool_binop_done:; __pyx_v_uses_twisted = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":1172 * * uses_twisted = TwistedConnection and issubclass(self.connection_class, TwistedConnection) * uses_eventlet = EventletConnection and issubclass(self.connection_class, EventletConnection) # <<<<<<<<<<<<<< * cloud_config = dscloud.get_cloud_config(cloud, create_pyopenssl_context=uses_twisted or uses_eventlet) * */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_EventletConnection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error) if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L12_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_EventletConnection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_IsSubclass(__pyx_t_6, __pyx_t_4); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L12_bool_binop_done:; __pyx_v_uses_eventlet = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":1173 * uses_twisted = TwistedConnection and issubclass(self.connection_class, TwistedConnection) * uses_eventlet = EventletConnection and issubclass(self.connection_class, EventletConnection) * cloud_config = dscloud.get_cloud_config(cloud, create_pyopenssl_context=uses_twisted or uses_eventlet) # <<<<<<<<<<<<<< * * ssl_context = cloud_config.ssl_context */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_dscloud); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_get_cloud_config); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_uses_twisted); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1173, __pyx_L1_error) if (!__pyx_t_1) { } else { __Pyx_INCREF(__pyx_v_uses_twisted); __pyx_t_6 = __pyx_v_uses_twisted; goto __pyx_L14_bool_binop_done; } __Pyx_INCREF(__pyx_v_uses_eventlet); __pyx_t_6 = __pyx_v_uses_eventlet; __pyx_L14_bool_binop_done:; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_cloud}; __pyx_t_8 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_create_pyopenssl_context, __pyx_t_6, __pyx_t_8, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1173, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_8); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_cloud_config = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":1175 * cloud_config = dscloud.get_cloud_config(cloud, create_pyopenssl_context=uses_twisted or uses_eventlet) * * ssl_context = cloud_config.ssl_context # <<<<<<<<<<<<<< * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_ssl_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_ssl_context, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1176 * * ssl_context = cloud_config.ssl_context * ssl_options = {'check_hostname': True} # <<<<<<<<<<<<<< * if (auth_provider is None and cloud_config.username * and cloud_config.password): */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_check_hostname, Py_True) < (0)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_ssl_options, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1177 * ssl_context = cloud_config.ssl_context * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username # <<<<<<<<<<<<<< * and cloud_config.password): * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) */ __pyx_t_3 = (__pyx_v_auth_provider == Py_None); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L17_bool_binop_done; } /* "cassandra/cluster.py":1178 * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username * and cloud_config.password): # <<<<<<<<<<<<<< * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_username); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":1177 * ssl_context = cloud_config.ssl_context * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username # <<<<<<<<<<<<<< * and cloud_config.password): * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L17_bool_binop_done; } /* "cassandra/cluster.py":1178 * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username * and cloud_config.password): # <<<<<<<<<<<<<< * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_password); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L17_bool_binop_done:; /* "cassandra/cluster.py":1177 * ssl_context = cloud_config.ssl_context * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username # <<<<<<<<<<<<<< * and cloud_config.password): * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) */ if (__pyx_t_1) { /* "cassandra/cluster.py":1179 * if (auth_provider is None and cloud_config.username * and cloud_config.password): * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) # <<<<<<<<<<<<<< * * endpoint_factory = SniEndPointFactory(cloud_config.sni_host, cloud_config.sni_port) */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_PlainTextAuthProvider); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_username); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_password); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_auth_provider, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1177 * ssl_context = cloud_config.ssl_context * ssl_options = {'check_hostname': True} * if (auth_provider is None and cloud_config.username # <<<<<<<<<<<<<< * and cloud_config.password): * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) */ } /* "cassandra/cluster.py":1181 * auth_provider = PlainTextAuthProvider(cloud_config.username, cloud_config.password) * * endpoint_factory = SniEndPointFactory(cloud_config.sni_host, cloud_config.sni_port) # <<<<<<<<<<<<<< * contact_points = [ * endpoint_factory.create_from_sni(host_id) */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SniEndPointFactory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_sni_host); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_sni_port); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_endpoint_factory, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1182 * * endpoint_factory = SniEndPointFactory(cloud_config.sni_host, cloud_config.sni_port) * contact_points = [ # <<<<<<<<<<<<<< * endpoint_factory.create_from_sni(host_id) * for host_id in cloud_config.host_ids */ { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":1184 * contact_points = [ * endpoint_factory.create_from_sni(host_id) * for host_id in cloud_config.host_ids # <<<<<<<<<<<<<< * ] * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cloud_config, __pyx_mstate_global->__pyx_n_u_host_ids); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_7 = __pyx_t_4; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1184, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1184, __pyx_L22_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_7))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1184, __pyx_L22_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1184, __pyx_L22_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9); #endif ++__pyx_t_9; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L22_error) } else { __pyx_t_4 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1184, __pyx_L22_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_host_id, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1183 * endpoint_factory = SniEndPointFactory(cloud_config.sni_host, cloud_config.sni_port) * contact_points = [ * endpoint_factory.create_from_sni(host_id) # <<<<<<<<<<<<<< * for host_id in cloud_config.host_ids * ] */ __pyx_t_6 = __pyx_v_endpoint_factory; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_8genexpr3__pyx_v_host_id}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_from_sni, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); } if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1182, __pyx_L22_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1184 * contact_points = [ * endpoint_factory.create_from_sni(host_id) * for host_id in cloud_config.host_ids # <<<<<<<<<<<<<< * ] * */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_host_id); __pyx_8genexpr3__pyx_v_host_id = 0; goto __pyx_L26_exit_scope; __pyx_L22_error:; __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_host_id); __pyx_8genexpr3__pyx_v_host_id = 0; goto __pyx_L1_error; __pyx_L26_exit_scope:; } /* exit inner scope */ __Pyx_DECREF_SET(__pyx_v_contact_points, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1165 * self.connection_class = connection_class * * if cloud is not None: # <<<<<<<<<<<<<< * self.cloud = cloud * if contact_points is not _NOT_SET or endpoint_factory or ssl_context or ssl_options: */ } /* "cassandra/cluster.py":1187 * ] * * if contact_points is not None: # <<<<<<<<<<<<<< * if contact_points is _NOT_SET: * self._contact_points_explicit = False */ __pyx_t_1 = (__pyx_v_contact_points != Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":1188 * * if contact_points is not None: * if contact_points is _NOT_SET: # <<<<<<<<<<<<<< * self._contact_points_explicit = False * contact_points = ['127.0.0.1'] */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__pyx_v_contact_points == __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":1189 * if contact_points is not None: * if contact_points is _NOT_SET: * self._contact_points_explicit = False # <<<<<<<<<<<<<< * contact_points = ['127.0.0.1'] * else: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points_explicit, Py_False) < (0)) __PYX_ERR(0, 1189, __pyx_L1_error) /* "cassandra/cluster.py":1190 * if contact_points is _NOT_SET: * self._contact_points_explicit = False * contact_points = ['127.0.0.1'] # <<<<<<<<<<<<<< * else: * self._contact_points_explicit = True */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_127_0_0_1); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_u_127_0_0_1); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_mstate_global->__pyx_kp_u_127_0_0_1) != (0)) __PYX_ERR(0, 1190, __pyx_L1_error); __Pyx_DECREF_SET(__pyx_v_contact_points, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1188 * * if contact_points is not None: * if contact_points is _NOT_SET: # <<<<<<<<<<<<<< * self._contact_points_explicit = False * contact_points = ['127.0.0.1'] */ goto __pyx_L28; } /* "cassandra/cluster.py":1192 * contact_points = ['127.0.0.1'] * else: * self._contact_points_explicit = True # <<<<<<<<<<<<<< * * if isinstance(contact_points, str): */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points_explicit, Py_True) < (0)) __PYX_ERR(0, 1192, __pyx_L1_error) } __pyx_L28:; /* "cassandra/cluster.py":1194 * self._contact_points_explicit = True * * if isinstance(contact_points, str): # <<<<<<<<<<<<<< * raise TypeError("contact_points should not be a string, it should be a sequence (e.g. list) of strings") * */ __pyx_t_1 = PyUnicode_Check(__pyx_v_contact_points); if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":1195 * * if isinstance(contact_points, str): * raise TypeError("contact_points should not be a string, it should be a sequence (e.g. list) of strings") # <<<<<<<<<<<<<< * * if None in contact_points: */ __pyx_t_7 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_contact_points_should_not_be_a_s}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1195, __pyx_L1_error) /* "cassandra/cluster.py":1194 * self._contact_points_explicit = True * * if isinstance(contact_points, str): # <<<<<<<<<<<<<< * raise TypeError("contact_points should not be a string, it should be a sequence (e.g. list) of strings") * */ } /* "cassandra/cluster.py":1197 * raise TypeError("contact_points should not be a string, it should be a sequence (e.g. list) of strings") * * if None in contact_points: # <<<<<<<<<<<<<< * raise ValueError("contact_points should not contain None (it can resolve to localhost)") * self.contact_points = contact_points */ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(Py_None, __pyx_v_contact_points, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1197, __pyx_L1_error) if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":1198 * * if None in contact_points: * raise ValueError("contact_points should not contain None (it can resolve to localhost)") # <<<<<<<<<<<<<< * self.contact_points = contact_points * */ __pyx_t_7 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_contact_points_should_not_contai}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1198, __pyx_L1_error) /* "cassandra/cluster.py":1197 * raise TypeError("contact_points should not be a string, it should be a sequence (e.g. list) of strings") * * if None in contact_points: # <<<<<<<<<<<<<< * raise ValueError("contact_points should not contain None (it can resolve to localhost)") * self.contact_points = contact_points */ } /* "cassandra/cluster.py":1199 * if None in contact_points: * raise ValueError("contact_points should not contain None (it can resolve to localhost)") * self.contact_points = contact_points # <<<<<<<<<<<<<< * * self.port = port */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points, __pyx_v_contact_points) < (0)) __PYX_ERR(0, 1199, __pyx_L1_error) /* "cassandra/cluster.py":1187 * ] * * if contact_points is not None: # <<<<<<<<<<<<<< * if contact_points is _NOT_SET: * self._contact_points_explicit = False */ } /* "cassandra/cluster.py":1201 * self.contact_points = contact_points * * self.port = port # <<<<<<<<<<<<<< * * if column_encryption_policy is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_port, __pyx_v_port) < (0)) __PYX_ERR(0, 1201, __pyx_L1_error) /* "cassandra/cluster.py":1203 * self.port = port * * if column_encryption_policy is not None: # <<<<<<<<<<<<<< * self.column_encryption_policy = column_encryption_policy * */ __pyx_t_1 = (__pyx_v_column_encryption_policy != Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":1204 * * if column_encryption_policy is not None: * self.column_encryption_policy = column_encryption_policy # <<<<<<<<<<<<<< * * self.endpoint_factory = endpoint_factory or DefaultEndPointFactory(port=self.port) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_column_encryption_policy, __pyx_v_column_encryption_policy) < (0)) __PYX_ERR(0, 1204, __pyx_L1_error) /* "cassandra/cluster.py":1203 * self.port = port * * if column_encryption_policy is not None: # <<<<<<<<<<<<<< * self.column_encryption_policy = column_encryption_policy * */ } /* "cassandra/cluster.py":1206 * self.column_encryption_policy = column_encryption_policy * * self.endpoint_factory = endpoint_factory or DefaultEndPointFactory(port=self.port) # <<<<<<<<<<<<<< * self.endpoint_factory.configure(self) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_endpoint_factory); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1206, __pyx_L1_error) if (!__pyx_t_1) { } else { __Pyx_INCREF(__pyx_v_endpoint_factory); __pyx_t_2 = __pyx_v_endpoint_factory; goto __pyx_L32_bool_binop_done; } __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_DefaultEndPointFactory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_port); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, NULL}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_port, __pyx_t_8, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error) __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_INCREF(__pyx_t_7); __pyx_t_2 = __pyx_t_7; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_L32_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoint_factory, __pyx_t_2) < (0)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1207 * * self.endpoint_factory = endpoint_factory or DefaultEndPointFactory(port=self.port) * self.endpoint_factory.configure(self) # <<<<<<<<<<<<<< * * raw_contact_points = [] */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoint_factory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_self}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_configure, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1209 * self.endpoint_factory.configure(self) * * raw_contact_points = [] # <<<<<<<<<<<<<< * for cp in [cp for cp in self.contact_points if not isinstance(cp, EndPoint)]: * raw_contact_points.append(cp if isinstance(cp, tuple) else (cp, port)) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_raw_contact_points = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1210 * * raw_contact_points = [] * for cp in [cp for cp in self.contact_points if not isinstance(cp, EndPoint)]: # <<<<<<<<<<<<<< * raw_contact_points.append(cp if isinstance(cp, tuple) else (cp, port)) * */ { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1210, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1210, __pyx_L38_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_7))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1210, __pyx_L38_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1210, __pyx_L38_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_9)); #else __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_9); #endif ++__pyx_t_9; } if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L38_error) } else { __pyx_t_6 = __pyx_t_10(__pyx_t_7); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1210, __pyx_L38_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_cp, __pyx_t_6); __pyx_t_6 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_EndPoint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L38_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = PyObject_IsInstance(__pyx_8genexpr4__pyx_v_cp, __pyx_t_6); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1210, __pyx_L38_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = (!__pyx_t_1); if (__pyx_t_3) { if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_8genexpr4__pyx_v_cp))) __PYX_ERR(0, 1210, __pyx_L38_error) } } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_cp); __pyx_8genexpr4__pyx_v_cp = 0; goto __pyx_L43_exit_scope; __pyx_L38_error:; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_cp); __pyx_8genexpr4__pyx_v_cp = 0; goto __pyx_L1_error; __pyx_L43_exit_scope:; } /* exit inner scope */ __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1210, __pyx_L1_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_7, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_cp, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1211 * raw_contact_points = [] * for cp in [cp for cp in self.contact_points if not isinstance(cp, EndPoint)]: * raw_contact_points.append(cp if isinstance(cp, tuple) else (cp, port)) # <<<<<<<<<<<<<< * * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] */ __pyx_t_3 = PyTuple_Check(__pyx_v_cp); if (__pyx_t_3) { __Pyx_INCREF(__pyx_v_cp); __pyx_t_2 = __pyx_v_cp; } else { __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_cp); __Pyx_GIVEREF(__pyx_v_cp); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_cp) != (0)) __PYX_ERR(0, 1211, __pyx_L1_error); __Pyx_INCREF(__pyx_v_port); __Pyx_GIVEREF(__pyx_v_port); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_port) != (0)) __PYX_ERR(0, 1211, __pyx_L1_error); __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_raw_contact_points, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1210 * * raw_contact_points = [] * for cp in [cp for cp in self.contact_points if not isinstance(cp, EndPoint)]: # <<<<<<<<<<<<<< * raw_contact_points.append(cp if isinstance(cp, tuple) else (cp, port)) * */ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1213 * raw_contact_points.append(cp if isinstance(cp, tuple) else (cp, port)) * * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] # <<<<<<<<<<<<<< * self._endpoint_map_for_insights = {repr(ep): '{ip}:{port}'.format(ip=ep.address, port=ep.port) * for ep in self.endpoints_resolved} */ { /* enter inner scope */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1213, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1213, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1213, __pyx_L47_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_6))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1213, __pyx_L47_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1213, __pyx_L47_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); #endif ++__pyx_t_9; } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L47_error) } else { __pyx_t_2 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1213, __pyx_L47_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_cp, __pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EndPoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_8genexpr5__pyx_v_cp, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1213, __pyx_L47_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_8genexpr5__pyx_v_cp))) __PYX_ERR(0, 1213, __pyx_L47_error) } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_cp); __pyx_8genexpr5__pyx_v_cp = 0; goto __pyx_L52_exit_scope; __pyx_L47_error:; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_cp); __pyx_8genexpr5__pyx_v_cp = 0; goto __pyx_L1_error; __pyx_L52_exit_scope:; } /* exit inner scope */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoints_resolved, __pyx_t_7) < (0)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1214 * * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] * self._endpoint_map_for_insights = {repr(ep): '{ip}:{port}'.format(ip=ep.address, port=ep.port) # <<<<<<<<<<<<<< * for ep in self.endpoints_resolved} * */ { /* enter inner scope */ __pyx_t_7 = PyDict_New(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_7); /* "cassandra/cluster.py":1215 * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] * self._endpoint_map_for_insights = {repr(ep): '{ip}:{port}'.format(ip=ep.address, port=ep.port) * for ep in self.endpoints_resolved} # <<<<<<<<<<<<<< * * strs_resolved_map = _resolve_contact_points_to_string_map(raw_contact_points) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoints_resolved); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1215, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1215, __pyx_L55_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1215, __pyx_L55_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } __pyx_t_6 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_9, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_9; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1215, __pyx_L55_error) #endif if (__pyx_t_9 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9)); #else __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); #endif ++__pyx_t_9; } if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L55_error) } else { __pyx_t_6 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1215, __pyx_L55_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_ep, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1214 * * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] * self._endpoint_map_for_insights = {repr(ep): '{ip}:{port}'.format(ip=ep.address, port=ep.port) # <<<<<<<<<<<<<< * for ep in self.endpoints_resolved} * */ __pyx_t_6 = PyObject_Repr(__pyx_8genexpr6__pyx_v_ep); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_ip_port; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_ep, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr6__pyx_v_ep, __pyx_mstate_global->__pyx_n_u_port); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_8, NULL}; __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ip, __pyx_t_4, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1214, __pyx_L55_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_port, __pyx_t_13, __pyx_t_14, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1214, __pyx_L55_error) __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_GOTREF(__pyx_t_11); } if (unlikely(PyDict_SetItem(__pyx_t_7, (PyObject*)__pyx_t_6, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1214, __pyx_L55_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1215 * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] * self._endpoint_map_for_insights = {repr(ep): '{ip}:{port}'.format(ip=ep.address, port=ep.port) * for ep in self.endpoints_resolved} # <<<<<<<<<<<<<< * * strs_resolved_map = _resolve_contact_points_to_string_map(raw_contact_points) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_ep); __pyx_8genexpr6__pyx_v_ep = 0; goto __pyx_L59_exit_scope; __pyx_L55_error:; __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_ep); __pyx_8genexpr6__pyx_v_ep = 0; goto __pyx_L1_error; __pyx_L59_exit_scope:; } /* exit inner scope */ /* "cassandra/cluster.py":1214 * * self.endpoints_resolved = [cp for cp in self.contact_points if isinstance(cp, EndPoint)] * self._endpoint_map_for_insights = {repr(ep): '{ip}:{port}'.format(ip=ep.address, port=ep.port) # <<<<<<<<<<<<<< * for ep in self.endpoints_resolved} * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoint_map_for_insights, __pyx_t_7) < (0)) __PYX_ERR(0, 1214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1217 * for ep in self.endpoints_resolved} * * strs_resolved_map = _resolve_contact_points_to_string_map(raw_contact_points) # <<<<<<<<<<<<<< * self.endpoints_resolved.extend(list(chain( * *[ */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_resolve_contact_points_to_strin); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_raw_contact_points}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_strs_resolved_map = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":1218 * * strs_resolved_map = _resolve_contact_points_to_string_map(raw_contact_points) * self.endpoints_resolved.extend(list(chain( # <<<<<<<<<<<<<< * *[ * [DefaultEndPoint(ip, port) for ip, port in xs if ip is not None] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoints_resolved); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __pyx_t_2; __Pyx_INCREF(__pyx_t_11); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_chain); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); { /* enter inner scope */ /* "cassandra/cluster.py":1219 * strs_resolved_map = _resolve_contact_points_to_string_map(raw_contact_points) * self.endpoints_resolved.extend(list(chain( * *[ # <<<<<<<<<<<<<< * [DefaultEndPoint(ip, port) for ip, port in xs if ip is not None] * for xs in strs_resolved_map.values() if xs is not None */ __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1219, __pyx_L62_error) __Pyx_GOTREF(__pyx_t_14); /* "cassandra/cluster.py":1221 * *[ * [DefaultEndPoint(ip, port) for ip, port in xs if ip is not None] * for xs in strs_resolved_map.values() if xs is not None # <<<<<<<<<<<<<< * ] * ))) */ __pyx_t_9 = 0; if (unlikely(__pyx_v_strs_resolved_map == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 1221, __pyx_L62_error) } __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_strs_resolved_map, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_15), (&__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L62_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = __pyx_t_4; __pyx_t_4 = 0; while (1) { __pyx_t_17 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_15, &__pyx_t_9, NULL, &__pyx_t_4, NULL, __pyx_t_16); if (unlikely(__pyx_t_17 == 0)) break; if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 1221, __pyx_L62_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_xs, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_8genexpr7__pyx_v_xs != Py_None); if (__pyx_t_3) { { /* enter inner scope */ /* "cassandra/cluster.py":1220 * self.endpoints_resolved.extend(list(chain( * *[ * [DefaultEndPoint(ip, port) for ip, port in xs if ip is not None] # <<<<<<<<<<<<<< * for xs in strs_resolved_map.values() if xs is not None * ] */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_8genexpr7__pyx_v_xs)) || PyTuple_CheckExact(__pyx_8genexpr7__pyx_v_xs)) { __pyx_t_8 = __pyx_8genexpr7__pyx_v_xs; __Pyx_INCREF(__pyx_t_8); __pyx_t_18 = 0; __pyx_t_10 = NULL; } else { __pyx_t_18 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_8genexpr7__pyx_v_xs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1220, __pyx_L68_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_8))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1220, __pyx_L68_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_19 = __Pyx_PyList_GetItemRefFast(__pyx_t_8, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_18; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1220, __pyx_L68_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_19 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_18)); #else __pyx_t_19 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_18); #endif ++__pyx_t_18; } if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1220, __pyx_L68_error) } else { __pyx_t_19 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_19)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1220, __pyx_L68_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_19); if ((likely(PyTuple_CheckExact(__pyx_t_19))) || (PyList_CheckExact(__pyx_t_19))) { PyObject* sequence = __pyx_t_19; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 1220, __pyx_L68_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_20 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_20); __pyx_t_21 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_21); } else { __pyx_t_20 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_XGOTREF(__pyx_t_20); __pyx_t_21 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_XGOTREF(__pyx_t_21); } #else __pyx_t_20 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_21); #endif __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } else { Py_ssize_t index = -1; __pyx_t_22 = PyObject_GetIter(__pyx_t_19); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_23 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_22); index = 0; __pyx_t_20 = __pyx_t_23(__pyx_t_22); if (unlikely(!__pyx_t_20)) goto __pyx_L71_unpacking_failed; __Pyx_GOTREF(__pyx_t_20); index = 1; __pyx_t_21 = __pyx_t_23(__pyx_t_22); if (unlikely(!__pyx_t_21)) goto __pyx_L71_unpacking_failed; __Pyx_GOTREF(__pyx_t_21); if (__Pyx_IternextUnpackEndCheck(__pyx_t_23(__pyx_t_22), 2) < (0)) __PYX_ERR(0, 1220, __pyx_L68_error) __pyx_t_23 = NULL; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; goto __pyx_L72_unpacking_done; __pyx_L71_unpacking_failed:; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_23 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1220, __pyx_L68_error) __pyx_L72_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_ip, __pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_port, __pyx_t_21); __pyx_t_21 = 0; __pyx_t_3 = (__pyx_8genexpr8__pyx_v_ip != Py_None); if (__pyx_t_3) { __pyx_t_21 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_DefaultEndPoint); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_20))) { __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_20); assert(__pyx_t_21); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20); __Pyx_INCREF(__pyx_t_21); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_20, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_21, __pyx_8genexpr8__pyx_v_ip, __pyx_8genexpr8__pyx_v_port}; __pyx_t_19 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_19); } if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_19))) __PYX_ERR(0, 1220, __pyx_L68_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_ip); __pyx_8genexpr8__pyx_v_ip = 0; __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_port); __pyx_8genexpr8__pyx_v_port = 0; goto __pyx_L75_exit_scope; __pyx_L68_error:; __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_ip); __pyx_8genexpr8__pyx_v_ip = 0; __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_port); __pyx_8genexpr8__pyx_v_port = 0; goto __pyx_L62_error; __pyx_L75_exit_scope:; } /* exit inner scope */ if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1219, __pyx_L62_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1221 * *[ * [DefaultEndPoint(ip, port) for ip, port in xs if ip is not None] * for xs in strs_resolved_map.values() if xs is not None # <<<<<<<<<<<<<< * ] * ))) */ } } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_xs); __pyx_8genexpr7__pyx_v_xs = 0; goto __pyx_L76_exit_scope; __pyx_L62_error:; __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_xs); __pyx_8genexpr7__pyx_v_xs = 0; goto __pyx_L1_error; __pyx_L76_exit_scope:; } /* exit inner scope */ /* "cassandra/cluster.py":1218 * * strs_resolved_map = _resolve_contact_points_to_string_map(raw_contact_points) * self.endpoints_resolved.extend(list(chain( # <<<<<<<<<<<<<< * *[ * [DefaultEndPoint(ip, port) for ip, port in xs if ip is not None] */ __pyx_t_13 = PySequence_Tuple(__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_PySequence_ListKeepNew(__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_13}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_extend, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1225 * ))) * * self._endpoint_map_for_insights.update( # <<<<<<<<<<<<<< * {key: ['{ip}:{port}'.format(ip=ip, port=port) for ip, port in value] * for key, value in strs_resolved_map.items() if value is not None} */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoint_map_for_insights); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = __pyx_t_13; __Pyx_INCREF(__pyx_t_2); { /* enter inner scope */ /* "cassandra/cluster.py":1226 * * self._endpoint_map_for_insights.update( * {key: ['{ip}:{port}'.format(ip=ip, port=port) for ip, port in value] # <<<<<<<<<<<<<< * for key, value in strs_resolved_map.items() if value is not None} * ) */ __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1226, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":1227 * self._endpoint_map_for_insights.update( * {key: ['{ip}:{port}'.format(ip=ip, port=port) for ip, port in value] * for key, value in strs_resolved_map.items() if value is not None} # <<<<<<<<<<<<<< * ) * */ __pyx_t_15 = 0; if (unlikely(__pyx_v_strs_resolved_map == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 1227, __pyx_L79_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_strs_resolved_map, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_9), (&__pyx_t_16)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1227, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_17 = __Pyx_dict_iter_next(__pyx_t_14, __pyx_t_9, &__pyx_t_15, &__pyx_t_6, &__pyx_t_4, NULL, __pyx_t_16); if (unlikely(__pyx_t_17 == 0)) break; if (unlikely(__pyx_t_17 == -1)) __PYX_ERR(0, 1227, __pyx_L79_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_key, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_8genexpr9__pyx_v_value != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1226 * * self._endpoint_map_for_insights.update( * {key: ['{ip}:{port}'.format(ip=ip, port=port) for ip, port in value] # <<<<<<<<<<<<<< * for key, value in strs_resolved_map.items() if value is not None} * ) */ { /* enter inner scope */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_8genexpr9__pyx_v_value)) || PyTuple_CheckExact(__pyx_8genexpr9__pyx_v_value)) { __pyx_t_6 = __pyx_8genexpr9__pyx_v_value; __Pyx_INCREF(__pyx_t_6); __pyx_t_18 = 0; __pyx_t_10 = NULL; } else { __pyx_t_18 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_8genexpr9__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1226, __pyx_L85_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_6))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1226, __pyx_L85_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_18, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_18; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1226, __pyx_L85_error) #endif if (__pyx_t_18 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_18)); #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_18); #endif ++__pyx_t_18; } if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1226, __pyx_L85_error) } else { __pyx_t_8 = __pyx_t_10(__pyx_t_6); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1226, __pyx_L85_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_8); if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { PyObject* sequence = __pyx_t_8; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 1226, __pyx_L85_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_19 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_19); __pyx_t_20 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_20); } else { __pyx_t_19 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_XGOTREF(__pyx_t_19); __pyx_t_20 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_XGOTREF(__pyx_t_20); } #else __pyx_t_19 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_20 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_20); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; __pyx_t_21 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_23 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_21); index = 0; __pyx_t_19 = __pyx_t_23(__pyx_t_21); if (unlikely(!__pyx_t_19)) goto __pyx_L88_unpacking_failed; __Pyx_GOTREF(__pyx_t_19); index = 1; __pyx_t_20 = __pyx_t_23(__pyx_t_21); if (unlikely(!__pyx_t_20)) goto __pyx_L88_unpacking_failed; __Pyx_GOTREF(__pyx_t_20); if (__Pyx_IternextUnpackEndCheck(__pyx_t_23(__pyx_t_21), 2) < (0)) __PYX_ERR(0, 1226, __pyx_L85_error) __pyx_t_23 = NULL; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; goto __pyx_L89_unpacking_done; __pyx_L88_unpacking_failed:; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_23 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1226, __pyx_L85_error) __pyx_L89_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_ip, __pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_port, __pyx_t_20); __pyx_t_20 = 0; __pyx_t_20 = __pyx_mstate_global->__pyx_kp_u_ip_port; __Pyx_INCREF(__pyx_t_20); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_20, NULL}; __pyx_t_19 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_19); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ip, __pyx_9genexpr10__pyx_v_ip, __pyx_t_19, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1226, __pyx_L85_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_port, __pyx_9genexpr10__pyx_v_port, __pyx_t_19, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1226, __pyx_L85_error) __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_GOTREF(__pyx_t_8); } if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1226, __pyx_L85_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_ip); __pyx_9genexpr10__pyx_v_ip = 0; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_port); __pyx_9genexpr10__pyx_v_port = 0; goto __pyx_L91_exit_scope; __pyx_L85_error:; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_ip); __pyx_9genexpr10__pyx_v_ip = 0; __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_port); __pyx_9genexpr10__pyx_v_port = 0; goto __pyx_L79_error; __pyx_L91_exit_scope:; } /* exit inner scope */ if (unlikely(PyDict_SetItem(__pyx_t_11, (PyObject*)__pyx_8genexpr9__pyx_v_key, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1226, __pyx_L79_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1227 * self._endpoint_map_for_insights.update( * {key: ['{ip}:{port}'.format(ip=ip, port=port) for ip, port in value] * for key, value in strs_resolved_map.items() if value is not None} # <<<<<<<<<<<<<< * ) * */ } } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __pyx_8genexpr9__pyx_v_key = 0; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_value); __pyx_8genexpr9__pyx_v_value = 0; goto __pyx_L92_exit_scope; __pyx_L79_error:; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __pyx_8genexpr9__pyx_v_key = 0; __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_value); __pyx_8genexpr9__pyx_v_value = 0; goto __pyx_L1_error; __pyx_L92_exit_scope:; } /* exit inner scope */ __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1230 * ) * * if contact_points and (not self.endpoints_resolved): # <<<<<<<<<<<<<< * # only want to raise here if the user specified CPs but resolution failed * raise UnresolvableContactPoints(self._endpoint_map_for_insights) */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_contact_points); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1230, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; goto __pyx_L94_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoints_resolved); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_24 = (!__pyx_t_1); __pyx_t_3 = __pyx_t_24; __pyx_L94_bool_binop_done:; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1232 * if contact_points and (not self.endpoints_resolved): * # only want to raise here if the user specified CPs but resolution failed * raise UnresolvableContactPoints(self._endpoint_map_for_insights) # <<<<<<<<<<<<<< * * self.compression = compression */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_UnresolvableContactPoints); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoint_map_for_insights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_13); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_2}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1232, __pyx_L1_error) /* "cassandra/cluster.py":1230 * ) * * if contact_points and (not self.endpoints_resolved): # <<<<<<<<<<<<<< * # only want to raise here if the user specified CPs but resolution failed * raise UnresolvableContactPoints(self._endpoint_map_for_insights) */ } /* "cassandra/cluster.py":1234 * raise UnresolvableContactPoints(self._endpoint_map_for_insights) * * self.compression = compression # <<<<<<<<<<<<<< * * if protocol_version is not _NOT_SET: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_compression, __pyx_v_compression) < (0)) __PYX_ERR(0, 1234, __pyx_L1_error) /* "cassandra/cluster.py":1236 * self.compression = compression * * if protocol_version is not _NOT_SET: # <<<<<<<<<<<<<< * self.protocol_version = protocol_version * self._protocol_version_explicit = True */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = (__pyx_v_protocol_version != __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":1237 * * if protocol_version is not _NOT_SET: * self.protocol_version = protocol_version # <<<<<<<<<<<<<< * self._protocol_version_explicit = True * self.allow_beta_protocol_version = allow_beta_protocol_version */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version, __pyx_v_protocol_version) < (0)) __PYX_ERR(0, 1237, __pyx_L1_error) /* "cassandra/cluster.py":1238 * if protocol_version is not _NOT_SET: * self.protocol_version = protocol_version * self._protocol_version_explicit = True # <<<<<<<<<<<<<< * self.allow_beta_protocol_version = allow_beta_protocol_version * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_explicit, Py_True) < (0)) __PYX_ERR(0, 1238, __pyx_L1_error) /* "cassandra/cluster.py":1236 * self.compression = compression * * if protocol_version is not _NOT_SET: # <<<<<<<<<<<<<< * self.protocol_version = protocol_version * self._protocol_version_explicit = True */ } /* "cassandra/cluster.py":1239 * self.protocol_version = protocol_version * self._protocol_version_explicit = True * self.allow_beta_protocol_version = allow_beta_protocol_version # <<<<<<<<<<<<<< * * self.no_compact = no_compact */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version, __pyx_v_allow_beta_protocol_version) < (0)) __PYX_ERR(0, 1239, __pyx_L1_error) /* "cassandra/cluster.py":1241 * self.allow_beta_protocol_version = allow_beta_protocol_version * * self.no_compact = no_compact # <<<<<<<<<<<<<< * * self.auth_provider = auth_provider */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_no_compact, __pyx_v_no_compact) < (0)) __PYX_ERR(0, 1241, __pyx_L1_error) /* "cassandra/cluster.py":1243 * self.no_compact = no_compact * * self.auth_provider = auth_provider # <<<<<<<<<<<<<< * * if load_balancing_policy is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider_2, __pyx_v_auth_provider) < (0)) __PYX_ERR(0, 1243, __pyx_L1_error) /* "cassandra/cluster.py":1245 * self.auth_provider = auth_provider * * if load_balancing_policy is not None: # <<<<<<<<<<<<<< * if isinstance(load_balancing_policy, type): * raise TypeError("load_balancing_policy should not be a class, it should be an instance of that class") */ __pyx_t_3 = (__pyx_v_load_balancing_policy != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1246 * * if load_balancing_policy is not None: * if isinstance(load_balancing_policy, type): # <<<<<<<<<<<<<< * raise TypeError("load_balancing_policy should not be a class, it should be an instance of that class") * self.load_balancing_policy = load_balancing_policy */ __pyx_t_3 = PyType_Check(__pyx_v_load_balancing_policy); if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1247 * if load_balancing_policy is not None: * if isinstance(load_balancing_policy, type): * raise TypeError("load_balancing_policy should not be a class, it should be an instance of that class") # <<<<<<<<<<<<<< * self.load_balancing_policy = load_balancing_policy * else: */ __pyx_t_11 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_load_balancing_policy_should_not}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1247, __pyx_L1_error) /* "cassandra/cluster.py":1246 * * if load_balancing_policy is not None: * if isinstance(load_balancing_policy, type): # <<<<<<<<<<<<<< * raise TypeError("load_balancing_policy should not be a class, it should be an instance of that class") * self.load_balancing_policy = load_balancing_policy */ } /* "cassandra/cluster.py":1248 * if isinstance(load_balancing_policy, type): * raise TypeError("load_balancing_policy should not be a class, it should be an instance of that class") * self.load_balancing_policy = load_balancing_policy # <<<<<<<<<<<<<< * else: * self._load_balancing_policy = default_lbp_factory() # set internal attribute to avoid committing to legacy config mode */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_v_load_balancing_policy) < (0)) __PYX_ERR(0, 1248, __pyx_L1_error) /* "cassandra/cluster.py":1245 * self.auth_provider = auth_provider * * if load_balancing_policy is not None: # <<<<<<<<<<<<<< * if isinstance(load_balancing_policy, type): * raise TypeError("load_balancing_policy should not be a class, it should be an instance of that class") */ goto __pyx_L97; } /* "cassandra/cluster.py":1250 * self.load_balancing_policy = load_balancing_policy * else: * self._load_balancing_policy = default_lbp_factory() # set internal attribute to avoid committing to legacy config mode # <<<<<<<<<<<<<< * * if reconnection_policy is not None: */ /*else*/ { __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_default_lbp_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_2, __pyx_t_7) < (0)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L97:; /* "cassandra/cluster.py":1252 * self._load_balancing_policy = default_lbp_factory() # set internal attribute to avoid committing to legacy config mode * * if reconnection_policy is not None: # <<<<<<<<<<<<<< * if isinstance(reconnection_policy, type): * raise TypeError("reconnection_policy should not be a class, it should be an instance of that class") */ __pyx_t_3 = (__pyx_v_reconnection_policy != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1253 * * if reconnection_policy is not None: * if isinstance(reconnection_policy, type): # <<<<<<<<<<<<<< * raise TypeError("reconnection_policy should not be a class, it should be an instance of that class") * self.reconnection_policy = reconnection_policy */ __pyx_t_3 = PyType_Check(__pyx_v_reconnection_policy); if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1254 * if reconnection_policy is not None: * if isinstance(reconnection_policy, type): * raise TypeError("reconnection_policy should not be a class, it should be an instance of that class") # <<<<<<<<<<<<<< * self.reconnection_policy = reconnection_policy * */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_reconnection_policy_should_not_b}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1254, __pyx_L1_error) /* "cassandra/cluster.py":1253 * * if reconnection_policy is not None: * if isinstance(reconnection_policy, type): # <<<<<<<<<<<<<< * raise TypeError("reconnection_policy should not be a class, it should be an instance of that class") * self.reconnection_policy = reconnection_policy */ } /* "cassandra/cluster.py":1255 * if isinstance(reconnection_policy, type): * raise TypeError("reconnection_policy should not be a class, it should be an instance of that class") * self.reconnection_policy = reconnection_policy # <<<<<<<<<<<<<< * * if default_retry_policy is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_policy, __pyx_v_reconnection_policy) < (0)) __PYX_ERR(0, 1255, __pyx_L1_error) /* "cassandra/cluster.py":1252 * self._load_balancing_policy = default_lbp_factory() # set internal attribute to avoid committing to legacy config mode * * if reconnection_policy is not None: # <<<<<<<<<<<<<< * if isinstance(reconnection_policy, type): * raise TypeError("reconnection_policy should not be a class, it should be an instance of that class") */ } /* "cassandra/cluster.py":1257 * self.reconnection_policy = reconnection_policy * * if default_retry_policy is not None: # <<<<<<<<<<<<<< * if isinstance(default_retry_policy, type): * raise TypeError("default_retry_policy should not be a class, it should be an instance of that class") */ __pyx_t_3 = (__pyx_v_default_retry_policy != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1258 * * if default_retry_policy is not None: * if isinstance(default_retry_policy, type): # <<<<<<<<<<<<<< * raise TypeError("default_retry_policy should not be a class, it should be an instance of that class") * self.default_retry_policy = default_retry_policy */ __pyx_t_3 = PyType_Check(__pyx_v_default_retry_policy); if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1259 * if default_retry_policy is not None: * if isinstance(default_retry_policy, type): * raise TypeError("default_retry_policy should not be a class, it should be an instance of that class") # <<<<<<<<<<<<<< * self.default_retry_policy = default_retry_policy * */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_default_retry_policy_should_not}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1259, __pyx_L1_error) /* "cassandra/cluster.py":1258 * * if default_retry_policy is not None: * if isinstance(default_retry_policy, type): # <<<<<<<<<<<<<< * raise TypeError("default_retry_policy should not be a class, it should be an instance of that class") * self.default_retry_policy = default_retry_policy */ } /* "cassandra/cluster.py":1260 * if isinstance(default_retry_policy, type): * raise TypeError("default_retry_policy should not be a class, it should be an instance of that class") * self.default_retry_policy = default_retry_policy # <<<<<<<<<<<<<< * * if conviction_policy_factory is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2, __pyx_v_default_retry_policy) < (0)) __PYX_ERR(0, 1260, __pyx_L1_error) /* "cassandra/cluster.py":1257 * self.reconnection_policy = reconnection_policy * * if default_retry_policy is not None: # <<<<<<<<<<<<<< * if isinstance(default_retry_policy, type): * raise TypeError("default_retry_policy should not be a class, it should be an instance of that class") */ } /* "cassandra/cluster.py":1262 * self.default_retry_policy = default_retry_policy * * if conviction_policy_factory is not None: # <<<<<<<<<<<<<< * if not callable(conviction_policy_factory): * raise ValueError("conviction_policy_factory must be callable") */ __pyx_t_3 = (__pyx_v_conviction_policy_factory != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1263 * * if conviction_policy_factory is not None: * if not callable(conviction_policy_factory): # <<<<<<<<<<<<<< * raise ValueError("conviction_policy_factory must be callable") * self.conviction_policy_factory = conviction_policy_factory */ __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_conviction_policy_factory); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1263, __pyx_L1_error) __pyx_t_24 = (!__pyx_t_3); if (unlikely(__pyx_t_24)) { /* "cassandra/cluster.py":1264 * if conviction_policy_factory is not None: * if not callable(conviction_policy_factory): * raise ValueError("conviction_policy_factory must be callable") # <<<<<<<<<<<<<< * self.conviction_policy_factory = conviction_policy_factory * */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_conviction_policy_factory_must_b}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1264, __pyx_L1_error) /* "cassandra/cluster.py":1263 * * if conviction_policy_factory is not None: * if not callable(conviction_policy_factory): # <<<<<<<<<<<<<< * raise ValueError("conviction_policy_factory must be callable") * self.conviction_policy_factory = conviction_policy_factory */ } /* "cassandra/cluster.py":1265 * if not callable(conviction_policy_factory): * raise ValueError("conviction_policy_factory must be callable") * self.conviction_policy_factory = conviction_policy_factory # <<<<<<<<<<<<<< * * if address_translator is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_conviction_policy_factory, __pyx_v_conviction_policy_factory) < (0)) __PYX_ERR(0, 1265, __pyx_L1_error) /* "cassandra/cluster.py":1262 * self.default_retry_policy = default_retry_policy * * if conviction_policy_factory is not None: # <<<<<<<<<<<<<< * if not callable(conviction_policy_factory): * raise ValueError("conviction_policy_factory must be callable") */ } /* "cassandra/cluster.py":1267 * self.conviction_policy_factory = conviction_policy_factory * * if address_translator is not None: # <<<<<<<<<<<<<< * if isinstance(address_translator, type): * raise TypeError("address_translator should not be a class, it should be an instance of that class") */ __pyx_t_24 = (__pyx_v_address_translator != Py_None); if (__pyx_t_24) { /* "cassandra/cluster.py":1268 * * if address_translator is not None: * if isinstance(address_translator, type): # <<<<<<<<<<<<<< * raise TypeError("address_translator should not be a class, it should be an instance of that class") * self.address_translator = address_translator */ __pyx_t_24 = PyType_Check(__pyx_v_address_translator); if (unlikely(__pyx_t_24)) { /* "cassandra/cluster.py":1269 * if address_translator is not None: * if isinstance(address_translator, type): * raise TypeError("address_translator should not be a class, it should be an instance of that class") # <<<<<<<<<<<<<< * self.address_translator = address_translator * */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_address_translator_should_not_be}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1269, __pyx_L1_error) /* "cassandra/cluster.py":1268 * * if address_translator is not None: * if isinstance(address_translator, type): # <<<<<<<<<<<<<< * raise TypeError("address_translator should not be a class, it should be an instance of that class") * self.address_translator = address_translator */ } /* "cassandra/cluster.py":1270 * if isinstance(address_translator, type): * raise TypeError("address_translator should not be a class, it should be an instance of that class") * self.address_translator = address_translator # <<<<<<<<<<<<<< * * if timestamp_generator is not None: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_address_translator, __pyx_v_address_translator) < (0)) __PYX_ERR(0, 1270, __pyx_L1_error) /* "cassandra/cluster.py":1267 * self.conviction_policy_factory = conviction_policy_factory * * if address_translator is not None: # <<<<<<<<<<<<<< * if isinstance(address_translator, type): * raise TypeError("address_translator should not be a class, it should be an instance of that class") */ } /* "cassandra/cluster.py":1272 * self.address_translator = address_translator * * if timestamp_generator is not None: # <<<<<<<<<<<<<< * if not callable(timestamp_generator): * raise ValueError("timestamp_generator must be callable") */ __pyx_t_24 = (__pyx_v_timestamp_generator != Py_None); if (__pyx_t_24) { /* "cassandra/cluster.py":1273 * * if timestamp_generator is not None: * if not callable(timestamp_generator): # <<<<<<<<<<<<<< * raise ValueError("timestamp_generator must be callable") * self.timestamp_generator = timestamp_generator */ __pyx_t_24 = __Pyx_PyCallable_Check(__pyx_v_timestamp_generator); if (unlikely(__pyx_t_24 == ((int)-1))) __PYX_ERR(0, 1273, __pyx_L1_error) __pyx_t_3 = (!__pyx_t_24); if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1274 * if timestamp_generator is not None: * if not callable(timestamp_generator): * raise ValueError("timestamp_generator must be callable") # <<<<<<<<<<<<<< * self.timestamp_generator = timestamp_generator * else: */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_timestamp_generator_must_be_call}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1274, __pyx_L1_error) /* "cassandra/cluster.py":1273 * * if timestamp_generator is not None: * if not callable(timestamp_generator): # <<<<<<<<<<<<<< * raise ValueError("timestamp_generator must be callable") * self.timestamp_generator = timestamp_generator */ } /* "cassandra/cluster.py":1275 * if not callable(timestamp_generator): * raise ValueError("timestamp_generator must be callable") * self.timestamp_generator = timestamp_generator # <<<<<<<<<<<<<< * else: * self.timestamp_generator = MonotonicTimestampGenerator() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_generator, __pyx_v_timestamp_generator) < (0)) __PYX_ERR(0, 1275, __pyx_L1_error) /* "cassandra/cluster.py":1272 * self.address_translator = address_translator * * if timestamp_generator is not None: # <<<<<<<<<<<<<< * if not callable(timestamp_generator): * raise ValueError("timestamp_generator must be callable") */ goto __pyx_L107; } /* "cassandra/cluster.py":1277 * self.timestamp_generator = timestamp_generator * else: * self.timestamp_generator = MonotonicTimestampGenerator() # <<<<<<<<<<<<<< * * self.profile_manager = ProfileManager() */ /*else*/ { __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_MonotonicTimestampGenerator); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timestamp_generator, __pyx_t_7) < (0)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L107:; /* "cassandra/cluster.py":1279 * self.timestamp_generator = MonotonicTimestampGenerator() * * self.profile_manager = ProfileManager() # <<<<<<<<<<<<<< * self.profile_manager.profiles[EXEC_PROFILE_DEFAULT] = ExecutionProfile( * self.load_balancing_policy, */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ProfileManager); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager, __pyx_t_7) < (0)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1280 * * self.profile_manager = ProfileManager() * self.profile_manager.profiles[EXEC_PROFILE_DEFAULT] = ExecutionProfile( # <<<<<<<<<<<<<< * self.load_balancing_policy, * self.default_retry_policy, */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ExecutionProfile); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":1281 * self.profile_manager = ProfileManager() * self.profile_manager.profiles[EXEC_PROFILE_DEFAULT] = ExecutionProfile( * self.load_balancing_policy, # <<<<<<<<<<<<<< * self.default_retry_policy, * request_timeout=Session._default_timeout, */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); /* "cassandra/cluster.py":1282 * self.profile_manager.profiles[EXEC_PROFILE_DEFAULT] = ExecutionProfile( * self.load_balancing_policy, * self.default_retry_policy, # <<<<<<<<<<<<<< * request_timeout=Session._default_timeout, * row_factory=Session._row_factory */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); /* "cassandra/cluster.py":1283 * self.load_balancing_policy, * self.default_retry_policy, * request_timeout=Session._default_timeout, # <<<<<<<<<<<<<< * row_factory=Session._row_factory * ) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_default_timeout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1284 * self.default_retry_policy, * request_timeout=Session._default_timeout, * row_factory=Session._row_factory # <<<<<<<<<<<<<< * ) * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_row_factory_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, __pyx_t_13, __pyx_t_14}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_request_timeout, __pyx_t_6, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 1280, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_8, __pyx_t_4, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 1280, __pyx_L1_error) __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } /* "cassandra/cluster.py":1280 * * self.profile_manager = ProfileManager() * self.profile_manager.profiles[EXEC_PROFILE_DEFAULT] = ExecutionProfile( # <<<<<<<<<<<<<< * self.load_balancing_policy, * self.default_retry_policy, */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_t_11, __pyx_t_7) < 0))) __PYX_ERR(0, 1280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1288 * * # legacy mode if either of these is not default * if load_balancing_policy or default_retry_policy: # <<<<<<<<<<<<<< * if execution_profiles: * raise ValueError("Clusters constructed with execution_profiles should not specify legacy parameters " */ __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_v_load_balancing_policy); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) if (!__pyx_t_24) { } else { __pyx_t_3 = __pyx_t_24; goto __pyx_L110_bool_binop_done; } __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_v_default_retry_policy); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 1288, __pyx_L1_error) __pyx_t_3 = __pyx_t_24; __pyx_L110_bool_binop_done:; if (__pyx_t_3) { /* "cassandra/cluster.py":1289 * # legacy mode if either of these is not default * if load_balancing_policy or default_retry_policy: * if execution_profiles: # <<<<<<<<<<<<<< * raise ValueError("Clusters constructed with execution_profiles should not specify legacy parameters " * "load_balancing_policy or default_retry_policy. Configure this in a profile instead.") */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_execution_profiles); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1289, __pyx_L1_error) if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1290 * if load_balancing_policy or default_retry_policy: * if execution_profiles: * raise ValueError("Clusters constructed with execution_profiles should not specify legacy parameters " # <<<<<<<<<<<<<< * "load_balancing_policy or default_retry_policy. Configure this in a profile instead.") * */ __pyx_t_11 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Clusters_constructed_with_execut}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 1290, __pyx_L1_error) /* "cassandra/cluster.py":1289 * # legacy mode if either of these is not default * if load_balancing_policy or default_retry_policy: * if execution_profiles: # <<<<<<<<<<<<<< * raise ValueError("Clusters constructed with execution_profiles should not specify legacy parameters " * "load_balancing_policy or default_retry_policy. Configure this in a profile instead.") */ } /* "cassandra/cluster.py":1293 * "load_balancing_policy or default_retry_policy. Configure this in a profile instead.") * * self._config_mode = _ConfigMode.LEGACY # <<<<<<<<<<<<<< * warn("Legacy execution parameters will be removed in 4.0. Consider using " * "execution profiles.", DeprecationWarning) */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode, __pyx_t_11) < (0)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1294 * * self._config_mode = _ConfigMode.LEGACY * warn("Legacy execution parameters will be removed in 4.0. Consider using " # <<<<<<<<<<<<<< * "execution profiles.", DeprecationWarning) * */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":1295 * self._config_mode = _ConfigMode.LEGACY * warn("Legacy execution parameters will be removed in 4.0. Consider using " * "execution profiles.", DeprecationWarning) # <<<<<<<<<<<<<< * * else: */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Legacy_execution_parameters_will, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1288 * * # legacy mode if either of these is not default * if load_balancing_policy or default_retry_policy: # <<<<<<<<<<<<<< * if execution_profiles: * raise ValueError("Clusters constructed with execution_profiles should not specify legacy parameters " */ goto __pyx_L109; } /* "cassandra/cluster.py":1298 * * else: * profiles = self.profile_manager.profiles # <<<<<<<<<<<<<< * if execution_profiles: * profiles.update(execution_profiles) */ /*else*/ { __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_profiles = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":1299 * else: * profiles = self.profile_manager.profiles * if execution_profiles: # <<<<<<<<<<<<<< * profiles.update(execution_profiles) * self._config_mode = _ConfigMode.PROFILES */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_execution_profiles); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1299, __pyx_L1_error) if (__pyx_t_3) { /* "cassandra/cluster.py":1300 * profiles = self.profile_manager.profiles * if execution_profiles: * profiles.update(execution_profiles) # <<<<<<<<<<<<<< * self._config_mode = _ConfigMode.PROFILES * */ __pyx_t_11 = __pyx_v_profiles; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_execution_profiles}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1301 * if execution_profiles: * profiles.update(execution_profiles) * self._config_mode = _ConfigMode.PROFILES # <<<<<<<<<<<<<< * * lbp = DefaultLoadBalancingPolicy(self.profile_manager.default.load_balancing_policy) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PROFILES); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode, __pyx_t_11) < (0)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1299 * else: * profiles = self.profile_manager.profiles * if execution_profiles: # <<<<<<<<<<<<<< * profiles.update(execution_profiles) * self._config_mode = _ConfigMode.PROFILES */ } /* "cassandra/cluster.py":1303 * self._config_mode = _ConfigMode.PROFILES * * lbp = DefaultLoadBalancingPolicy(self.profile_manager.default.load_balancing_policy) # <<<<<<<<<<<<<< * profiles.setdefault(EXEC_PROFILE_GRAPH_DEFAULT, GraphExecutionProfile(load_balancing_policy=lbp)) * profiles.setdefault(EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT, */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DefaultLoadBalancingPolicy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_default); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_8}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_v_lbp = __pyx_t_11; __pyx_t_11 = 0; /* "cassandra/cluster.py":1304 * * lbp = DefaultLoadBalancingPolicy(self.profile_manager.default.load_balancing_policy) * profiles.setdefault(EXEC_PROFILE_GRAPH_DEFAULT, GraphExecutionProfile(load_balancing_policy=lbp)) # <<<<<<<<<<<<<< * profiles.setdefault(EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT, * GraphExecutionProfile(load_balancing_policy=lbp, request_timeout=60. * 3.)) */ __pyx_t_7 = __pyx_v_profiles; __Pyx_INCREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_14); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL}; __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_v_lbp, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1304, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_4}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1305 * lbp = DefaultLoadBalancingPolicy(self.profile_manager.default.load_balancing_policy) * profiles.setdefault(EXEC_PROFILE_GRAPH_DEFAULT, GraphExecutionProfile(load_balancing_policy=lbp)) * profiles.setdefault(EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT, # <<<<<<<<<<<<<< * GraphExecutionProfile(load_balancing_policy=lbp, request_timeout=60. * 3.)) * profiles.setdefault(EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT, */ __pyx_t_4 = __pyx_v_profiles; __Pyx_INCREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_SYSTEM_DEFAUL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "cassandra/cluster.py":1306 * profiles.setdefault(EXEC_PROFILE_GRAPH_DEFAULT, GraphExecutionProfile(load_balancing_policy=lbp)) * profiles.setdefault(EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT, * GraphExecutionProfile(load_balancing_policy=lbp, request_timeout=60. * 3.)) # <<<<<<<<<<<<<< * profiles.setdefault(EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT, * GraphAnalyticsExecutionProfile(load_balancing_policy=lbp)) */ __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = PyFloat_FromDouble((60. * 3.)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_14); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_14, NULL}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_v_lbp, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_request_timeout, __pyx_t_6, __pyx_t_2, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1306, __pyx_L1_error) __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_7}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1307 * profiles.setdefault(EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT, * GraphExecutionProfile(load_balancing_policy=lbp, request_timeout=60. * 3.)) * profiles.setdefault(EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT, # <<<<<<<<<<<<<< * GraphAnalyticsExecutionProfile(load_balancing_policy=lbp)) * */ __pyx_t_7 = __pyx_v_profiles; __Pyx_INCREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_ANALYTICS_DEF); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "cassandra/cluster.py":1308 * GraphExecutionProfile(load_balancing_policy=lbp, request_timeout=60. * 3.)) * profiles.setdefault(EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT, * GraphAnalyticsExecutionProfile(load_balancing_policy=lbp)) # <<<<<<<<<<<<<< * * if self._contact_points_explicit and not self.cloud: # avoid this warning for cloud users. */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_13); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_13, NULL}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_v_lbp, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1308, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_8, __pyx_t_4}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __pyx_L109:; /* "cassandra/cluster.py":1310 * GraphAnalyticsExecutionProfile(load_balancing_policy=lbp)) * * if self._contact_points_explicit and not self.cloud: # avoid this warning for cloud users. # <<<<<<<<<<<<<< * if self._config_mode is _ConfigMode.PROFILES: * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points_explicit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_24) { } else { __pyx_t_3 = __pyx_t_24; goto __pyx_L115_bool_binop_done; } __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cloud); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = (!__pyx_t_24); __pyx_t_3 = __pyx_t_1; __pyx_L115_bool_binop_done:; if (__pyx_t_3) { /* "cassandra/cluster.py":1311 * * if self._contact_points_explicit and not self.cloud: # avoid this warning for cloud users. * if self._config_mode is _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() * if default_lbp_profiles: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PROFILES); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_t_11 == __pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":1312 * if self._contact_points_explicit and not self.cloud: # avoid this warning for cloud users. * if self._config_mode is _ConfigMode.PROFILES: * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() # <<<<<<<<<<<<<< * if default_lbp_profiles: * log.warning( */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_profiles_without_explicit_lbps, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_v_default_lbp_profiles = __pyx_t_8; __pyx_t_8 = 0; /* "cassandra/cluster.py":1313 * if self._config_mode is _ConfigMode.PROFILES: * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() * if default_lbp_profiles: # <<<<<<<<<<<<<< * log.warning( * 'Cluster.__init__ called with contact_points ' */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_default_lbp_profiles); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1313, __pyx_L1_error) if (__pyx_t_3) { /* "cassandra/cluster.py":1314 * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() * if default_lbp_profiles: * log.warning( # <<<<<<<<<<<<<< * 'Cluster.__init__ called with contact_points ' * 'specified, but load-balancing policies are not ' */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1322 * '(contact_points = {cp}, ' * 'EPs without explicit LBPs = {eps})' * ''.format(cp=contact_points, eps=default_lbp_profiles)) # <<<<<<<<<<<<<< * else: * if load_balancing_policy is None: */ __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_Cluster___init___called_with_con; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cp, __pyx_v_contact_points, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1322, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_eps, __pyx_v_default_lbp_profiles, __pyx_t_6, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1322, __pyx_L1_error) __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_11}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1313 * if self._config_mode is _ConfigMode.PROFILES: * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() * if default_lbp_profiles: # <<<<<<<<<<<<<< * log.warning( * 'Cluster.__init__ called with contact_points ' */ } /* "cassandra/cluster.py":1311 * * if self._contact_points_explicit and not self.cloud: # avoid this warning for cloud users. * if self._config_mode is _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() * if default_lbp_profiles: */ goto __pyx_L117; } /* "cassandra/cluster.py":1324 * ''.format(cp=contact_points, eps=default_lbp_profiles)) * else: * if load_balancing_policy is None: # <<<<<<<<<<<<<< * log.warning( * 'Cluster.__init__ called with contact_points ' */ /*else*/ { __pyx_t_3 = (__pyx_v_load_balancing_policy == Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1325 * else: * if load_balancing_policy is None: * log.warning( # <<<<<<<<<<<<<< * 'Cluster.__init__ called with contact_points ' * 'specified, but no load_balancing_policy. In the next ' */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1331 * 'specify a load-balancing policy. ' * '(contact_points = {cp}, lbp = {lbp})' * ''.format(cp=contact_points, lbp=load_balancing_policy)) # <<<<<<<<<<<<<< * * self.metrics_enabled = metrics_enabled */ __pyx_t_6 = __pyx_mstate_global->__pyx_kp_u_Cluster___init___called_with_con_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cp, __pyx_v_contact_points, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1331, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_lbp, __pyx_v_load_balancing_policy, __pyx_t_2, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1331, __pyx_L1_error) __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_11}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1324 * ''.format(cp=contact_points, eps=default_lbp_profiles)) * else: * if load_balancing_policy is None: # <<<<<<<<<<<<<< * log.warning( * 'Cluster.__init__ called with contact_points ' */ } } __pyx_L117:; /* "cassandra/cluster.py":1310 * GraphAnalyticsExecutionProfile(load_balancing_policy=lbp)) * * if self._contact_points_explicit and not self.cloud: # avoid this warning for cloud users. # <<<<<<<<<<<<<< * if self._config_mode is _ConfigMode.PROFILES: * default_lbp_profiles = self.profile_manager._profiles_without_explicit_lbps() */ } /* "cassandra/cluster.py":1333 * ''.format(cp=contact_points, lbp=load_balancing_policy)) * * self.metrics_enabled = metrics_enabled # <<<<<<<<<<<<<< * * if ssl_options and not ssl_context: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_enabled, __pyx_v_metrics_enabled) < (0)) __PYX_ERR(0, 1333, __pyx_L1_error) /* "cassandra/cluster.py":1335 * self.metrics_enabled = metrics_enabled * * if ssl_options and not ssl_context: # <<<<<<<<<<<<<< * warn('Using ssl_options without ssl_context is ' * 'deprecated and will result in an error in ' */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ssl_options); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1335, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_3 = __pyx_t_1; goto __pyx_L121_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ssl_context); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1335, __pyx_L1_error) __pyx_t_24 = (!__pyx_t_1); __pyx_t_3 = __pyx_t_24; __pyx_L121_bool_binop_done:; if (__pyx_t_3) { /* "cassandra/cluster.py":1336 * * if ssl_options and not ssl_context: * warn('Using ssl_options without ssl_context is ' # <<<<<<<<<<<<<< * 'deprecated and will result in an error in ' * 'the next major release. Please use ssl_context ' */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":1340 * 'the next major release. Please use ssl_context ' * 'to prepare for that release.', * DeprecationWarning) # <<<<<<<<<<<<<< * * self.ssl_options = ssl_options */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Using_ssl_options_without_ssl_co, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1335 * self.metrics_enabled = metrics_enabled * * if ssl_options and not ssl_context: # <<<<<<<<<<<<<< * warn('Using ssl_options without ssl_context is ' * 'deprecated and will result in an error in ' */ } /* "cassandra/cluster.py":1342 * DeprecationWarning) * * self.ssl_options = ssl_options # <<<<<<<<<<<<<< * self.ssl_context = ssl_context * self.sockopts = sockopts */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ssl_options, __pyx_v_ssl_options) < (0)) __PYX_ERR(0, 1342, __pyx_L1_error) /* "cassandra/cluster.py":1343 * * self.ssl_options = ssl_options * self.ssl_context = ssl_context # <<<<<<<<<<<<<< * self.sockopts = sockopts * self.cql_version = cql_version */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ssl_context, __pyx_v_ssl_context) < (0)) __PYX_ERR(0, 1343, __pyx_L1_error) /* "cassandra/cluster.py":1344 * self.ssl_options = ssl_options * self.ssl_context = ssl_context * self.sockopts = sockopts # <<<<<<<<<<<<<< * self.cql_version = cql_version * self.max_schema_agreement_wait = max_schema_agreement_wait */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sockopts, __pyx_v_sockopts) < (0)) __PYX_ERR(0, 1344, __pyx_L1_error) /* "cassandra/cluster.py":1345 * self.ssl_context = ssl_context * self.sockopts = sockopts * self.cql_version = cql_version # <<<<<<<<<<<<<< * self.max_schema_agreement_wait = max_schema_agreement_wait * self.control_connection_timeout = control_connection_timeout */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cql_version, __pyx_v_cql_version) < (0)) __PYX_ERR(0, 1345, __pyx_L1_error) /* "cassandra/cluster.py":1346 * self.sockopts = sockopts * self.cql_version = cql_version * self.max_schema_agreement_wait = max_schema_agreement_wait # <<<<<<<<<<<<<< * self.control_connection_timeout = control_connection_timeout * self.idle_heartbeat_interval = idle_heartbeat_interval */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait, __pyx_v_max_schema_agreement_wait) < (0)) __PYX_ERR(0, 1346, __pyx_L1_error) /* "cassandra/cluster.py":1347 * self.cql_version = cql_version * self.max_schema_agreement_wait = max_schema_agreement_wait * self.control_connection_timeout = control_connection_timeout # <<<<<<<<<<<<<< * self.idle_heartbeat_interval = idle_heartbeat_interval * self.idle_heartbeat_timeout = idle_heartbeat_timeout */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection_timeout, __pyx_v_control_connection_timeout) < (0)) __PYX_ERR(0, 1347, __pyx_L1_error) /* "cassandra/cluster.py":1348 * self.max_schema_agreement_wait = max_schema_agreement_wait * self.control_connection_timeout = control_connection_timeout * self.idle_heartbeat_interval = idle_heartbeat_interval # <<<<<<<<<<<<<< * self.idle_heartbeat_timeout = idle_heartbeat_timeout * self.schema_event_refresh_window = schema_event_refresh_window */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_interval, __pyx_v_idle_heartbeat_interval) < (0)) __PYX_ERR(0, 1348, __pyx_L1_error) /* "cassandra/cluster.py":1349 * self.control_connection_timeout = control_connection_timeout * self.idle_heartbeat_interval = idle_heartbeat_interval * self.idle_heartbeat_timeout = idle_heartbeat_timeout # <<<<<<<<<<<<<< * self.schema_event_refresh_window = schema_event_refresh_window * self.topology_event_refresh_window = topology_event_refresh_window */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_timeout, __pyx_v_idle_heartbeat_timeout) < (0)) __PYX_ERR(0, 1349, __pyx_L1_error) /* "cassandra/cluster.py":1350 * self.idle_heartbeat_interval = idle_heartbeat_interval * self.idle_heartbeat_timeout = idle_heartbeat_timeout * self.schema_event_refresh_window = schema_event_refresh_window # <<<<<<<<<<<<<< * self.topology_event_refresh_window = topology_event_refresh_window * self.status_event_refresh_window = status_event_refresh_window */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window, __pyx_v_schema_event_refresh_window) < (0)) __PYX_ERR(0, 1350, __pyx_L1_error) /* "cassandra/cluster.py":1351 * self.idle_heartbeat_timeout = idle_heartbeat_timeout * self.schema_event_refresh_window = schema_event_refresh_window * self.topology_event_refresh_window = topology_event_refresh_window # <<<<<<<<<<<<<< * self.status_event_refresh_window = status_event_refresh_window * self.connect_timeout = connect_timeout */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window, __pyx_v_topology_event_refresh_window) < (0)) __PYX_ERR(0, 1351, __pyx_L1_error) /* "cassandra/cluster.py":1352 * self.schema_event_refresh_window = schema_event_refresh_window * self.topology_event_refresh_window = topology_event_refresh_window * self.status_event_refresh_window = status_event_refresh_window # <<<<<<<<<<<<<< * self.connect_timeout = connect_timeout * self.prepare_on_all_hosts = prepare_on_all_hosts */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status_event_refresh_window, __pyx_v_status_event_refresh_window) < (0)) __PYX_ERR(0, 1352, __pyx_L1_error) /* "cassandra/cluster.py":1353 * self.topology_event_refresh_window = topology_event_refresh_window * self.status_event_refresh_window = status_event_refresh_window * self.connect_timeout = connect_timeout # <<<<<<<<<<<<<< * self.prepare_on_all_hosts = prepare_on_all_hosts * self.reprepare_on_up = reprepare_on_up */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connect_timeout, __pyx_v_connect_timeout) < (0)) __PYX_ERR(0, 1353, __pyx_L1_error) /* "cassandra/cluster.py":1354 * self.status_event_refresh_window = status_event_refresh_window * self.connect_timeout = connect_timeout * self.prepare_on_all_hosts = prepare_on_all_hosts # <<<<<<<<<<<<<< * self.reprepare_on_up = reprepare_on_up * self.monitor_reporting_enabled = monitor_reporting_enabled */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepare_on_all_hosts, __pyx_v_prepare_on_all_hosts) < (0)) __PYX_ERR(0, 1354, __pyx_L1_error) /* "cassandra/cluster.py":1355 * self.connect_timeout = connect_timeout * self.prepare_on_all_hosts = prepare_on_all_hosts * self.reprepare_on_up = reprepare_on_up # <<<<<<<<<<<<<< * self.monitor_reporting_enabled = monitor_reporting_enabled * self.monitor_reporting_interval = monitor_reporting_interval */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reprepare_on_up, __pyx_v_reprepare_on_up) < (0)) __PYX_ERR(0, 1355, __pyx_L1_error) /* "cassandra/cluster.py":1356 * self.prepare_on_all_hosts = prepare_on_all_hosts * self.reprepare_on_up = reprepare_on_up * self.monitor_reporting_enabled = monitor_reporting_enabled # <<<<<<<<<<<<<< * self.monitor_reporting_interval = monitor_reporting_interval * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_monitor_reporting_enabled, __pyx_v_monitor_reporting_enabled) < (0)) __PYX_ERR(0, 1356, __pyx_L1_error) /* "cassandra/cluster.py":1357 * self.reprepare_on_up = reprepare_on_up * self.monitor_reporting_enabled = monitor_reporting_enabled * self.monitor_reporting_interval = monitor_reporting_interval # <<<<<<<<<<<<<< * * self._listeners = set() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_monitor_reporting_interval, __pyx_v_monitor_reporting_interval) < (0)) __PYX_ERR(0, 1357, __pyx_L1_error) /* "cassandra/cluster.py":1359 * self.monitor_reporting_interval = monitor_reporting_interval * * self._listeners = set() # <<<<<<<<<<<<<< * self._listener_lock = Lock() * */ __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners, __pyx_t_8) < (0)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1360 * * self._listeners = set() * self._listener_lock = Lock() # <<<<<<<<<<<<<< * * # let Session objects be GC'ed (and shutdown) when the user no longer */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listener_lock, __pyx_t_8) < (0)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1364 * # let Session objects be GC'ed (and shutdown) when the user no longer * # holds a reference. * self.sessions = WeakSet() # <<<<<<<<<<<<<< * self.metadata = Metadata() * self.control_connection = None */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_WeakSet); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions, __pyx_t_8) < (0)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1365 * # holds a reference. * self.sessions = WeakSet() * self.metadata = Metadata() # <<<<<<<<<<<<<< * self.control_connection = None * self._prepared_statements = WeakValueDictionary() */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata, __pyx_t_8) < (0)) __PYX_ERR(0, 1365, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1366 * self.sessions = WeakSet() * self.metadata = Metadata() * self.control_connection = None # <<<<<<<<<<<<<< * self._prepared_statements = WeakValueDictionary() * self._prepared_statement_lock = Lock() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection, Py_None) < (0)) __PYX_ERR(0, 1366, __pyx_L1_error) /* "cassandra/cluster.py":1367 * self.metadata = Metadata() * self.control_connection = None * self._prepared_statements = WeakValueDictionary() # <<<<<<<<<<<<<< * self._prepared_statement_lock = Lock() * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_WeakValueDictionary); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statements, __pyx_t_8) < (0)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1368 * self.control_connection = None * self._prepared_statements = WeakValueDictionary() * self._prepared_statement_lock = Lock() # <<<<<<<<<<<<<< * * self._user_types = defaultdict(dict) */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement_lock, __pyx_t_8) < (0)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1370 * self._prepared_statement_lock = Lock() * * self._user_types = defaultdict(dict) # <<<<<<<<<<<<<< * * self._min_requests_per_connection = { */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)(&PyDict_Type))}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_user_types, __pyx_t_8) < (0)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1373 * * self._min_requests_per_connection = { * HostDistance.LOCAL: DEFAULT_MIN_REQUESTS, # <<<<<<<<<<<<<< * HostDistance.REMOTE: DEFAULT_MIN_REQUESTS * } */ __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_REQUESTS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1374 * self._min_requests_per_connection = { * HostDistance.LOCAL: DEFAULT_MIN_REQUESTS, * HostDistance.REMOTE: DEFAULT_MIN_REQUESTS # <<<<<<<<<<<<<< * } * */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_REMOTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_REQUESTS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1372 * self._user_types = defaultdict(dict) * * self._min_requests_per_connection = { # <<<<<<<<<<<<<< * HostDistance.LOCAL: DEFAULT_MIN_REQUESTS, * HostDistance.REMOTE: DEFAULT_MIN_REQUESTS */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_requests_per_connection, __pyx_t_8) < (0)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1378 * * self._max_requests_per_connection = { * HostDistance.LOCAL: DEFAULT_MAX_REQUESTS, # <<<<<<<<<<<<<< * HostDistance.REMOTE: DEFAULT_MAX_REQUESTS * } */ __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_REQUESTS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1379 * self._max_requests_per_connection = { * HostDistance.LOCAL: DEFAULT_MAX_REQUESTS, * HostDistance.REMOTE: DEFAULT_MAX_REQUESTS # <<<<<<<<<<<<<< * } * */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_REMOTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_REQUESTS); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1377 * } * * self._max_requests_per_connection = { # <<<<<<<<<<<<<< * HostDistance.LOCAL: DEFAULT_MAX_REQUESTS, * HostDistance.REMOTE: DEFAULT_MAX_REQUESTS */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_requests_per_connection, __pyx_t_8) < (0)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1383 * * self._core_connections_per_host = { * HostDistance.LOCAL: DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST, # <<<<<<<<<<<<<< * HostDistance.REMOTE: DEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOST * } */ __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_CONNECTIONS_PER_LOCA); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1384 * self._core_connections_per_host = { * HostDistance.LOCAL: DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST, * HostDistance.REMOTE: DEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOST # <<<<<<<<<<<<<< * } * */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_REMOTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_CONNECTIONS_PER_REMO); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1382 * } * * self._core_connections_per_host = { # <<<<<<<<<<<<<< * HostDistance.LOCAL: DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST, * HostDistance.REMOTE: DEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOST */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_core_connections_per_host, __pyx_t_8) < (0)) __PYX_ERR(0, 1382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1388 * * self._max_connections_per_host = { * HostDistance.LOCAL: DEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOST, # <<<<<<<<<<<<<< * HostDistance.REMOTE: DEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOST * } */ __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_LOCAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_CONNECTIONS_PER_LOCA); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1389 * self._max_connections_per_host = { * HostDistance.LOCAL: DEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOST, * HostDistance.REMOTE: DEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOST # <<<<<<<<<<<<<< * } * */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_REMOTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_CONNECTIONS_PER_REMO); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_8, __pyx_t_4, __pyx_t_11) < (0)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":1387 * } * * self._max_connections_per_host = { # <<<<<<<<<<<<<< * HostDistance.LOCAL: DEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOST, * HostDistance.REMOTE: DEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOST */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_connections_per_host, __pyx_t_8) < (0)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1392 * } * * self.executor = self._create_thread_pool_executor(max_workers=executor_threads) # <<<<<<<<<<<<<< * self.scheduler = _Scheduler(self.executor) * */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_max_workers, __pyx_v_executor_threads, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1392, __pyx_L1_error) __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_create_thread_pool_executor, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_executor, __pyx_t_8) < (0)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1393 * * self.executor = self._create_thread_pool_executor(max_workers=executor_threads) * self.scheduler = _Scheduler(self.executor) # <<<<<<<<<<<<<< * * self._lock = RLock() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_Scheduler); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_executor); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduler, __pyx_t_8) < (0)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1395 * self.scheduler = _Scheduler(self.executor) * * self._lock = RLock() # <<<<<<<<<<<<<< * * if self.metrics_enabled: */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_RLock); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock, __pyx_t_8) < (0)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1397 * self._lock = RLock() * * if self.metrics_enabled: # <<<<<<<<<<<<<< * from cassandra.metrics import Metrics * self.metrics = Metrics(weakref.proxy(self)) */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_enabled); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":1398 * * if self.metrics_enabled: * from cassandra.metrics import Metrics # <<<<<<<<<<<<<< * self.metrics = Metrics(weakref.proxy(self)) * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Metrics}; __pyx_t_25 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_metrics, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1398, __pyx_L1_error) } __pyx_t_8 = __pyx_t_25; __Pyx_GOTREF(__pyx_t_8); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Metrics}; __pyx_t_9 = 0; { __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_8, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); switch (__pyx_t_9) { case 0: __Pyx_INCREF(__pyx_t_7); __pyx_v_Metrics = __pyx_t_7; break; default:; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1399 * if self.metrics_enabled: * from cassandra.metrics import Metrics * self.metrics = Metrics(weakref.proxy(self)) # <<<<<<<<<<<<<< * * self.control_connection = ControlConnection( */ __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_Metrics); __pyx_t_11 = __pyx_v_Metrics; __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_proxy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_self}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics, __pyx_t_8) < (0)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1397 * self._lock = RLock() * * if self.metrics_enabled: # <<<<<<<<<<<<<< * from cassandra.metrics import Metrics * self.metrics = Metrics(weakref.proxy(self)) */ } /* "cassandra/cluster.py":1401 * self.metrics = Metrics(weakref.proxy(self)) * * self.control_connection = ControlConnection( # <<<<<<<<<<<<<< * self, self.control_connection_timeout, * self.schema_event_refresh_window, self.topology_event_refresh_window, */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ControlConnection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":1402 * * self.control_connection = ControlConnection( * self, self.control_connection_timeout, # <<<<<<<<<<<<<< * self.schema_event_refresh_window, self.topology_event_refresh_window, * self.status_event_refresh_window, */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection_timeout); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "cassandra/cluster.py":1403 * self.control_connection = ControlConnection( * self, self.control_connection_timeout, * self.schema_event_refresh_window, self.topology_event_refresh_window, # <<<<<<<<<<<<<< * self.status_event_refresh_window, * schema_metadata_enabled, token_metadata_enabled) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":1404 * self, self.control_connection_timeout, * self.schema_event_refresh_window, self.topology_event_refresh_window, * self.status_event_refresh_window, # <<<<<<<<<<<<<< * schema_metadata_enabled, token_metadata_enabled) * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status_event_refresh_window); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "cassandra/cluster.py":1405 * self.schema_event_refresh_window, self.topology_event_refresh_window, * self.status_event_refresh_window, * schema_metadata_enabled, token_metadata_enabled) # <<<<<<<<<<<<<< * * if client_id is None: */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[8] = {__pyx_t_11, __pyx_v_self, __pyx_t_7, __pyx_t_13, __pyx_t_2, __pyx_t_6, __pyx_v_schema_metadata_enabled, __pyx_v_token_metadata_enabled}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } /* "cassandra/cluster.py":1401 * self.metrics = Metrics(weakref.proxy(self)) * * self.control_connection = ControlConnection( # <<<<<<<<<<<<<< * self, self.control_connection_timeout, * self.schema_event_refresh_window, self.topology_event_refresh_window, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection, __pyx_t_8) < (0)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1407 * schema_metadata_enabled, token_metadata_enabled) * * if client_id is None: # <<<<<<<<<<<<<< * self.client_id = uuid.uuid4() * if application_name is not None: */ __pyx_t_3 = (__pyx_v_client_id == Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1408 * * if client_id is None: * self.client_id = uuid.uuid4() # <<<<<<<<<<<<<< * if application_name is not None: * self.application_name = application_name */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uuid); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_uuid4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_client_id, __pyx_t_8) < (0)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":1407 * schema_metadata_enabled, token_metadata_enabled) * * if client_id is None: # <<<<<<<<<<<<<< * self.client_id = uuid.uuid4() * if application_name is not None: */ } /* "cassandra/cluster.py":1409 * if client_id is None: * self.client_id = uuid.uuid4() * if application_name is not None: # <<<<<<<<<<<<<< * self.application_name = application_name * if application_version is not None: */ __pyx_t_3 = (__pyx_v_application_name != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1410 * self.client_id = uuid.uuid4() * if application_name is not None: * self.application_name = application_name # <<<<<<<<<<<<<< * if application_version is not None: * self.application_version = application_version */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_application_name, __pyx_v_application_name) < (0)) __PYX_ERR(0, 1410, __pyx_L1_error) /* "cassandra/cluster.py":1409 * if client_id is None: * self.client_id = uuid.uuid4() * if application_name is not None: # <<<<<<<<<<<<<< * self.application_name = application_name * if application_version is not None: */ } /* "cassandra/cluster.py":1411 * if application_name is not None: * self.application_name = application_name * if application_version is not None: # <<<<<<<<<<<<<< * self.application_version = application_version * */ __pyx_t_3 = (__pyx_v_application_version != Py_None); if (__pyx_t_3) { /* "cassandra/cluster.py":1412 * self.application_name = application_name * if application_version is not None: * self.application_version = application_version # <<<<<<<<<<<<<< * * def _create_thread_pool_executor(self, **kwargs): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_application_version, __pyx_v_application_version) < (0)) __PYX_ERR(0, 1412, __pyx_L1_error) /* "cassandra/cluster.py":1411 * if application_name is not None: * self.application_name = application_name * if application_version is not None: # <<<<<<<<<<<<<< * self.application_version = application_version * */ } /* "cassandra/cluster.py":1114 * _listener_lock = None * * def __init__(self, # <<<<<<<<<<<<<< * contact_points=_NOT_SET, * port=9042, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_AddTraceback("cassandra.cluster.Cluster.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_uses_twisted); __Pyx_XDECREF(__pyx_v_uses_eventlet); __Pyx_XDECREF(__pyx_v_cloud_config); __Pyx_XDECREF(__pyx_v_raw_contact_points); __Pyx_XDECREF(__pyx_v_cp); __Pyx_XDECREF(__pyx_v_strs_resolved_map); __Pyx_XDECREF(__pyx_v_profiles); __Pyx_XDECREF(__pyx_v_lbp); __Pyx_XDECREF(__pyx_v_default_lbp_profiles); __Pyx_XDECREF(__pyx_v_Metrics); __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_host_id); __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_cp); __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_cp); __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_ep); __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_xs); __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_ip); __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_port); __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_value); __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_ip); __Pyx_XDECREF(__pyx_9genexpr10__pyx_v_port); __Pyx_XDECREF(__pyx_v_contact_points); __Pyx_XDECREF(__pyx_v_auth_provider); __Pyx_XDECREF(__pyx_v_ssl_options); __Pyx_XDECREF(__pyx_v_ssl_context); __Pyx_XDECREF(__pyx_v_endpoint_factory); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1414 * self.application_version = application_version * * def _create_thread_pool_executor(self, **kwargs): # <<<<<<<<<<<<<< * """ * Create a ThreadPoolExecutor for the cluster. In most cases, the built-in */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_25_create_thread_pool_executor(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_24_create_thread_pool_executor, "\n Create a ThreadPoolExecutor for the cluster. In most cases, the built-in\n `concurrent.futures.ThreadPoolExecutor` is used.\n\n Python 3.7+ and Eventlet cause the `concurrent.futures.ThreadPoolExecutor`\n to hang indefinitely. In that case, the user needs to have the `futurist`\n package so we can use the `futurist.GreenThreadPoolExecutor` class instead.\n\n :param kwargs: All keyword args are passed to the ThreadPoolExecutor constructor.\n :return: A ThreadPoolExecutor instance.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_25_create_thread_pool_executor = {"_create_thread_pool_executor", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_25_create_thread_pool_executor, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_24_create_thread_pool_executor}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_25_create_thread_pool_executor(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_thread_pool_executor (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1414, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1414, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "_create_thread_pool_executor", 1) < (0)) __PYX_ERR(0, 1414, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_create_thread_pool_executor", 1, 1, 1, i); __PYX_ERR(0, 1414, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1414, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_create_thread_pool_executor", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1414, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Cluster._create_thread_pool_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_24_create_thread_pool_executor(__pyx_self, __pyx_v_self, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_24_create_thread_pool_executor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_tpe_class = NULL; PyObject *__pyx_v_EventletConnection = NULL; int __pyx_v_is_eventlet; PyObject *__pyx_v_GreenThreadPoolExecutor = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; 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; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; size_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_thread_pool_executor", 0); /* "cassandra/cluster.py":1426 * :return: A ThreadPoolExecutor instance. * """ * tpe_class = ThreadPoolExecutor # <<<<<<<<<<<<<< * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: * try: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_tpe_class = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":1427 * """ * tpe_class = ThreadPoolExecutor * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: # <<<<<<<<<<<<<< * try: * from cassandra.io.eventletreactor import EventletConnection */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_version_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_mstate_global->__pyx_int_7, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "cassandra/cluster.py":1428 * tpe_class = ThreadPoolExecutor * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: * try: # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * is_eventlet = issubclass(self.connection_class, EventletConnection) */ { __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:*/ { /* "cassandra/cluster.py":1429 * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: * try: * from cassandra.io.eventletreactor import EventletConnection # <<<<<<<<<<<<<< * is_eventlet = issubclass(self.connection_class, EventletConnection) * except: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_EventletConnection}; __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_eventletreactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1429, __pyx_L6_error) } __pyx_t_1 = __pyx_t_8; __Pyx_GOTREF(__pyx_t_1); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_EventletConnection}; __pyx_t_9 = 0; { __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); switch (__pyx_t_9) { case 0: __Pyx_INCREF(__pyx_t_3); __pyx_v_EventletConnection = __pyx_t_3; break; default:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1430 * try: * from cassandra.io.eventletreactor import EventletConnection * is_eventlet = issubclass(self.connection_class, EventletConnection) # <<<<<<<<<<<<<< * except: * # Eventlet is not available or can't be detected */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsSubclass(__pyx_t_1, __pyx_v_EventletConnection); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1430, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_is_eventlet = __pyx_t_2; /* "cassandra/cluster.py":1428 * tpe_class = ThreadPoolExecutor * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: * try: # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * is_eventlet = issubclass(self.connection_class, EventletConnection) */ } __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_L11_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1431 * from cassandra.io.eventletreactor import EventletConnection * is_eventlet = issubclass(self.connection_class, EventletConnection) * except: # <<<<<<<<<<<<<< * # Eventlet is not available or can't be detected * return tpe_class(**kwargs) */ /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster._create_thread_pool_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(0, 1431, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_10); /* "cassandra/cluster.py":1433 * except: * # Eventlet is not available or can't be detected * return tpe_class(**kwargs) # <<<<<<<<<<<<<< * * if is_eventlet: */ __Pyx_XDECREF(__pyx_r); __pyx_t_11 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1433, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_v_tpe_class, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1433, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_12; __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9_except_return; } /* "cassandra/cluster.py":1428 * tpe_class = ThreadPoolExecutor * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: * try: # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * is_eventlet = issubclass(self.connection_class, EventletConnection) */ __pyx_L8_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_L9_except_return:; __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_L0; __pyx_L11_try_end:; } /* "cassandra/cluster.py":1435 * return tpe_class(**kwargs) * * if is_eventlet: # <<<<<<<<<<<<<< * try: * from futurist import GreenThreadPoolExecutor */ if (__pyx_v_is_eventlet) { /* "cassandra/cluster.py":1436 * * if is_eventlet: * try: # <<<<<<<<<<<<<< * from futurist import GreenThreadPoolExecutor * tpe_class = GreenThreadPoolExecutor */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "cassandra/cluster.py":1437 * if is_eventlet: * try: * from futurist import GreenThreadPoolExecutor # <<<<<<<<<<<<<< * tpe_class = GreenThreadPoolExecutor * except ImportError: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GreenThreadPoolExecutor}; __pyx_t_8 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_futurist, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1437, __pyx_L15_error) } __pyx_t_10 = __pyx_t_8; __Pyx_GOTREF(__pyx_t_10); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_GreenThreadPoolExecutor}; __pyx_t_9 = 0; { __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_10, __pyx_imported_names[__pyx_t_9]); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1437, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_3); switch (__pyx_t_9) { case 0: __Pyx_INCREF(__pyx_t_3); __pyx_v_GreenThreadPoolExecutor = __pyx_t_3; break; default:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":1438 * try: * from futurist import GreenThreadPoolExecutor * tpe_class = GreenThreadPoolExecutor # <<<<<<<<<<<<<< * except ImportError: * # futurist is not available */ __Pyx_INCREF(__pyx_v_GreenThreadPoolExecutor); __Pyx_DECREF_SET(__pyx_v_tpe_class, __pyx_v_GreenThreadPoolExecutor); /* "cassandra/cluster.py":1436 * * if is_eventlet: * try: # <<<<<<<<<<<<<< * from futurist import GreenThreadPoolExecutor * tpe_class = GreenThreadPoolExecutor */ } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L20_try_end; __pyx_L15_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 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; /* "cassandra/cluster.py":1439 * from futurist import GreenThreadPoolExecutor * tpe_class = GreenThreadPoolExecutor * except ImportError: # <<<<<<<<<<<<<< * # futurist is not available * raise ImportError( */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); if (__pyx_t_13) { __Pyx_AddTraceback("cassandra.cluster.Cluster._create_thread_pool_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 1439, __pyx_L17_except_error) __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); /* "cassandra/cluster.py":1441 * except ImportError: * # futurist is not available * raise ImportError( # <<<<<<<<<<<<<< * ("Python 3.7+ and Eventlet cause the `concurrent.futures.ThreadPoolExecutor` " * "to hang indefinitely. If you want to use the Eventlet reactor, you " */ __pyx_t_11 = NULL; __pyx_t_14 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Python_3_7_and_Eventlet_cause_th}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ImportError)), __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1441, __pyx_L17_except_error) __Pyx_GOTREF(__pyx_t_12); } __Pyx_Raise(__pyx_t_12, 0, 0, 0); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __PYX_ERR(0, 1441, __pyx_L17_except_error) } goto __pyx_L17_except_error; /* "cassandra/cluster.py":1436 * * if is_eventlet: * try: # <<<<<<<<<<<<<< * from futurist import GreenThreadPoolExecutor * tpe_class = GreenThreadPoolExecutor */ __pyx_L17_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5); goto __pyx_L1_error; __pyx_L20_try_end:; } /* "cassandra/cluster.py":1435 * return tpe_class(**kwargs) * * if is_eventlet: # <<<<<<<<<<<<<< * try: * from futurist import GreenThreadPoolExecutor */ } /* "cassandra/cluster.py":1427 * """ * tpe_class = ThreadPoolExecutor * if sys.version_info[0] >= 3 and sys.version_info[1] >= 7: # <<<<<<<<<<<<<< * try: * from cassandra.io.eventletreactor import EventletConnection */ } /* "cassandra/cluster.py":1448 * "for more details.")) * * return tpe_class(**kwargs) # <<<<<<<<<<<<<< * * def register_user_type(self, keyspace, user_type, klass): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_tpe_class, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":1414 * self.application_version = application_version * * def _create_thread_pool_executor(self, **kwargs): # <<<<<<<<<<<<<< * """ * Create a ThreadPoolExecutor for the cluster. In most cases, the built-in */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("cassandra.cluster.Cluster._create_thread_pool_executor", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_tpe_class); __Pyx_XDECREF(__pyx_v_EventletConnection); __Pyx_XDECREF(__pyx_v_GreenThreadPoolExecutor); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1450 * return tpe_class(**kwargs) * * def register_user_type(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Registers a class to use to represent a particular user-defined type. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_27register_user_type(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_26register_user_type, "\n Registers a class to use to represent a particular user-defined type.\n Query parameters for this user-defined type will be assumed to be\n instances of `klass`. Result sets for this user-defined type will\n be instances of `klass`. If no class is registered for a user-defined\n type, a namedtuple will be used for result sets, and non-prepared\n statements may not encode parameters for this type correctly.\n\n `keyspace` is the name of the keyspace that the UDT is defined in.\n\n `user_type` is the string name of the UDT to register the mapping\n for.\n\n `klass` should be a class with attributes whose names match the\n fields of the user-defined type. The constructor must accept kwargs\n for each of the fields in the UDT.\n\n This method should only be called after the type has been created\n within Cassandra.\n\n Example::\n\n cluster = Cluster(protocol_version=3)\n session = cluster.connect()\n session.set_keyspace('mykeyspace')\n session.execute(\"CREATE TYPE address (street text, zipcode int)\")\n session.execute(\"CREATE TABLE users (id int PRIMARY KEY, location address)\")\n\n # create a class to map to the \"address\" UDT\n class Address(object):\n\n def __init__(self, street, zipcode):\n self.street = street\n self.zipcode = zipcode\n\n cluster.register_user_type('mykeyspace', 'address', Address)\n\n # insert a row using an instance of Address\n session.execute(\"INSERT INTO users (id, location) VALUES (%s, %s)\",\n (0, Address(\"123 Main St.\", 78723)))\n\n # results will include Address instances\n results = session.execute(\"SELECT * FROM users\")\n row = results[0]\n print(row.id, row.location.street, row.location.""zipcode)\n\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_27register_user_type = {"register_user_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_27register_user_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_26register_user_type}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_27register_user_type(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_user_type = 0; PyObject *__pyx_v_klass = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("register_user_type (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_user_type,&__pyx_mstate_global->__pyx_n_u_klass,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1450, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1450, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1450, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1450, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1450, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register_user_type", 0) < (0)) __PYX_ERR(0, 1450, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register_user_type", 1, 4, 4, i); __PYX_ERR(0, 1450, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1450, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1450, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1450, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1450, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_user_type = values[2]; __pyx_v_klass = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("register_user_type", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 1450, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.register_user_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_26register_user_type(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_user_type, __pyx_v_klass); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_26register_user_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_user_type, PyObject *__pyx_v_klass) { PyObject *__pyx_v_session = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("register_user_type", 0); /* "cassandra/cluster.py":1498 * * """ * if self.protocol_version < 3: # <<<<<<<<<<<<<< * log.warning("User Type serialization is only supported in native protocol version 3+ (%d in use). " * "CQL encoding for simple statements will still work, but named tuples will " */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":1499 * """ * if self.protocol_version < 3: * log.warning("User Type serialization is only supported in native protocol version 3+ (%d in use). " # <<<<<<<<<<<<<< * "CQL encoding for simple statements will still work, but named tuples will " * "be returned when reading type %s.%s.", self.protocol_version, keyspace, user_type) */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1501 * log.warning("User Type serialization is only supported in native protocol version 3+ (%d in use). " * "CQL encoding for simple statements will still work, but named tuples will " * "be returned when reading type %s.%s.", self.protocol_version, keyspace, user_type) # <<<<<<<<<<<<<< * * self._user_types[keyspace][user_type] = klass */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_User_Type_serialization_is_only, __pyx_t_4, __pyx_v_keyspace, __pyx_v_user_type}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__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; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1498 * * """ * if self.protocol_version < 3: # <<<<<<<<<<<<<< * log.warning("User Type serialization is only supported in native protocol version 3+ (%d in use). " * "CQL encoding for simple statements will still work, but named tuples will " */ } /* "cassandra/cluster.py":1503 * "be returned when reading type %s.%s.", self.protocol_version, keyspace, user_type) * * self._user_types[keyspace][user_type] = klass # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * session.user_type_registered(keyspace, user_type, klass) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_user_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_keyspace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_v_user_type, __pyx_v_klass) < 0))) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1504 * * self._user_types[keyspace][user_type] = klass * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.user_type_registered(keyspace, user_type, klass) * UserType.evict_udt_class(keyspace, user_type) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1504, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); #endif ++__pyx_t_7; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1505 * self._user_types[keyspace][user_type] = klass * for session in tuple(self.sessions): * session.user_type_registered(keyspace, user_type, klass) # <<<<<<<<<<<<<< * UserType.evict_udt_class(keyspace, user_type) * */ __pyx_t_4 = __pyx_v_session; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_keyspace, __pyx_v_user_type, __pyx_v_klass}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_user_type_registered, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1504 * * self._user_types[keyspace][user_type] = klass * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.user_type_registered(keyspace, user_type, klass) * UserType.evict_udt_class(keyspace, user_type) */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1506 * for session in tuple(self.sessions): * session.user_type_registered(keyspace, user_type, klass) * UserType.evict_udt_class(keyspace, user_type) # <<<<<<<<<<<<<< * * def add_execution_profile(self, name, profile, pool_wait_timeout=5): */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UserType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_evict_udt_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_keyspace, __pyx_v_user_type}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1450 * return tpe_class(**kwargs) * * def register_user_type(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Registers a class to use to represent a particular user-defined type. */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.register_user_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_session); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1508 * UserType.evict_udt_class(keyspace, user_type) * * def add_execution_profile(self, name, profile, pool_wait_timeout=5): # <<<<<<<<<<<<<< * """ * Adds an :class:`.ExecutionProfile` to the cluster. This makes it available for use by ``name`` in :meth:`.Session.execute` */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_29add_execution_profile(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_28add_execution_profile, "\n Adds an :class:`.ExecutionProfile` to the cluster. This makes it available for use by ``name`` in :meth:`.Session.execute`\n and :meth:`.Session.execute_async`. This method will raise if the profile already exists.\n\n Normally profiles will be injected at cluster initialization via ``Cluster(execution_profiles)``. This method\n provides a way of adding them dynamically.\n\n Adding a new profile updates the connection pools according to the specified ``load_balancing_policy``. By default,\n this method will wait up to five seconds for the pool creation to complete, so the profile can be used immediately\n upon return. This behavior can be controlled using ``pool_wait_timeout`` (see\n `concurrent.futures.wait `_\n for timeout semantics).\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_29add_execution_profile = {"add_execution_profile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_29add_execution_profile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_28add_execution_profile}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_29add_execution_profile(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_name = 0; PyObject *__pyx_v_profile = 0; PyObject *__pyx_v_pool_wait_timeout = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_execution_profile (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_profile,&__pyx_mstate_global->__pyx_n_u_pool_wait_timeout,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1508, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1508, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1508, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1508, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1508, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_execution_profile", 0) < (0)) __PYX_ERR(0, 1508, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5))); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_execution_profile", 0, 3, 4, i); __PYX_ERR(0, 1508, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1508, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1508, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1508, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1508, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_5))); } __pyx_v_self = values[0]; __pyx_v_name = values[1]; __pyx_v_profile = values[2]; __pyx_v_pool_wait_timeout = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_execution_profile", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1508, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.add_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_28add_execution_profile(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_profile, __pyx_v_pool_wait_timeout); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1546 * profile.load_balancing_policy.populate(self, self.metadata.all_hosts()) * # on_up after populate allows things like DCA LBP to choose default local dc * for host in filter(lambda h: h.is_up, self.metadata.all_hosts()): # <<<<<<<<<<<<<< * profile.load_balancing_policy.on_up(host) * futures = set() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_21add_execution_profile_lambda3(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_21add_execution_profile_lambda3 = {"lambda3", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_21add_execution_profile_lambda3, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_21add_execution_profile_lambda3(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_h = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_h,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1546, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1546, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda3", 0) < (0)) __PYX_ERR(0, 1546, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, i); __PYX_ERR(0, 1546, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1546, __pyx_L3_error) } __pyx_v_h = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda3", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1546, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.add_execution_profile.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_h); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_h) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda3", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_h, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __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("cassandra.cluster.Cluster.add_execution_profile.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1508 * UserType.evict_udt_class(keyspace, user_type) * * def add_execution_profile(self, name, profile, pool_wait_timeout=5): # <<<<<<<<<<<<<< * """ * Adds an :class:`.ExecutionProfile` to the cluster. This makes it available for use by ``name`` in :meth:`.Session.execute` */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_28add_execution_profile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_profile, PyObject *__pyx_v_pool_wait_timeout) { PyObject *__pyx_v_contact_points_but_no_lbp = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_futures = NULL; PyObject *__pyx_v_session = NULL; CYTHON_UNUSED PyObject *__pyx_v__ = NULL; PyObject *__pyx_v_not_done = 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; size_t __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; Py_ssize_t __pyx_t_12; PyObject *(*__pyx_t_13)(PyObject *); PyObject *(*__pyx_t_14)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_execution_profile", 0); /* "cassandra/cluster.py":1522 * for timeout semantics). * """ * if not isinstance(profile, ExecutionProfile): # <<<<<<<<<<<<<< * raise TypeError("profile must be an instance of ExecutionProfile") * if self._config_mode == _ConfigMode.LEGACY: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ExecutionProfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_profile, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (!__pyx_t_2); if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1523 * """ * if not isinstance(profile, ExecutionProfile): * raise TypeError("profile must be an instance of ExecutionProfile") # <<<<<<<<<<<<<< * if self._config_mode == _ConfigMode.LEGACY: * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") */ __pyx_t_4 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_profile_must_be_an_instance_of_E}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __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(0, 1523, __pyx_L1_error) /* "cassandra/cluster.py":1522 * for timeout semantics). * """ * if not isinstance(profile, ExecutionProfile): # <<<<<<<<<<<<<< * raise TypeError("profile must be an instance of ExecutionProfile") * if self._config_mode == _ConfigMode.LEGACY: */ } /* "cassandra/cluster.py":1524 * if not isinstance(profile, ExecutionProfile): * raise TypeError("profile must be an instance of ExecutionProfile") * if self._config_mode == _ConfigMode.LEGACY: # <<<<<<<<<<<<<< * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") * if name in self.profile_manager.profiles: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1525 * raise TypeError("profile must be an instance of ExecutionProfile") * if self._config_mode == _ConfigMode.LEGACY: * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") # <<<<<<<<<<<<<< * if name in self.profile_manager.profiles: * raise ValueError("Profile {} already exists".format(name)) */ __pyx_t_6 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Cannot_add_execution_profiles_wh}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(0, 1525, __pyx_L1_error) /* "cassandra/cluster.py":1524 * if not isinstance(profile, ExecutionProfile): * raise TypeError("profile must be an instance of ExecutionProfile") * if self._config_mode == _ConfigMode.LEGACY: # <<<<<<<<<<<<<< * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") * if name in self.profile_manager.profiles: */ } /* "cassandra/cluster.py":1526 * if self._config_mode == _ConfigMode.LEGACY: * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") * if name in self.profile_manager.profiles: # <<<<<<<<<<<<<< * raise ValueError("Profile {} already exists".format(name)) * contact_points_but_no_lbp = ( */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_6, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1527 * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") * if name in self.profile_manager.profiles: * raise ValueError("Profile {} already exists".format(name)) # <<<<<<<<<<<<<< * contact_points_but_no_lbp = ( * self._contact_points_explicit and not */ __pyx_t_4 = NULL; __pyx_t_7 = __pyx_mstate_global->__pyx_kp_u_Profile_already_exists; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_name}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 1527, __pyx_L1_error) /* "cassandra/cluster.py":1526 * if self._config_mode == _ConfigMode.LEGACY: * raise ValueError("Cannot add execution profiles when legacy parameters are set explicitly.") * if name in self.profile_manager.profiles: # <<<<<<<<<<<<<< * raise ValueError("Profile {} already exists".format(name)) * contact_points_but_no_lbp = ( */ } /* "cassandra/cluster.py":1529 * raise ValueError("Profile {} already exists".format(name)) * contact_points_but_no_lbp = ( * self._contact_points_explicit and not # <<<<<<<<<<<<<< * profile._load_balancing_policy_explicit) * if contact_points_but_no_lbp: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points_explicit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1529, __pyx_L1_error) if (__pyx_t_3) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_bool_binop_done; } /* "cassandra/cluster.py":1530 * contact_points_but_no_lbp = ( * self._contact_points_explicit and not * profile._load_balancing_policy_explicit) # <<<<<<<<<<<<<< * if contact_points_but_no_lbp: * log.warning( */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_profile, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_explicit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1529 * raise ValueError("Profile {} already exists".format(name)) * contact_points_but_no_lbp = ( * self._contact_points_explicit and not # <<<<<<<<<<<<<< * profile._load_balancing_policy_explicit) * if contact_points_but_no_lbp: */ __pyx_t_2 = (!__pyx_t_3); __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __pyx_t_1 = 0; __pyx_L6_bool_binop_done:; __pyx_v_contact_points_but_no_lbp = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":1531 * self._contact_points_explicit and not * profile._load_balancing_policy_explicit) * if contact_points_but_no_lbp: # <<<<<<<<<<<<<< * log.warning( * 'Tried to add an ExecutionProfile with name {name}. ' */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_contact_points_but_no_lbp); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1531, __pyx_L1_error) if (__pyx_t_2) { /* "cassandra/cluster.py":1532 * profile._load_balancing_policy_explicit) * if contact_points_but_no_lbp: * log.warning( # <<<<<<<<<<<<<< * 'Tried to add an ExecutionProfile with name {name}. ' * '{self} was explicitly configured with contact_points, but ' */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1541 * 'raise an exception; please specify a load-balancing policy ' * 'in the ExecutionProfile.' * ''.format(name=_execution_profile_to_string(name), self=self, ep=profile)) # <<<<<<<<<<<<<< * * self.profile_manager.profiles[name] = profile */ __pyx_t_8 = __pyx_mstate_global->__pyx_kp_u_Tried_to_add_an_ExecutionProfile; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execution_profile_to_string); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_name}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_8, NULL}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_t_9, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 1541, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_self, __pyx_v_self, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 1541, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_ep, __pyx_v_profile, __pyx_t_11, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 1541, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1531 * self._contact_points_explicit and not * profile._load_balancing_policy_explicit) * if contact_points_but_no_lbp: # <<<<<<<<<<<<<< * log.warning( * 'Tried to add an ExecutionProfile with name {name}. ' */ } /* "cassandra/cluster.py":1543 * ''.format(name=_execution_profile_to_string(name), self=self, ep=profile)) * * self.profile_manager.profiles[name] = profile # <<<<<<<<<<<<<< * profile.load_balancing_policy.populate(self, self.metadata.all_hosts()) * # on_up after populate allows things like DCA LBP to choose default local dc */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely((PyObject_SetItem(__pyx_t_7, __pyx_v_name, __pyx_v_profile) < 0))) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1544 * * self.profile_manager.profiles[name] = profile * profile.load_balancing_policy.populate(self, self.metadata.all_hosts()) # <<<<<<<<<<<<<< * # on_up after populate allows things like DCA LBP to choose default local dc * for host in filter(lambda h: h.is_up, self.metadata.all_hosts()): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_profile, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __pyx_t_9; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_self, __pyx_t_1}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_populate, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1546 * profile.load_balancing_policy.populate(self, self.metadata.all_hosts()) * # on_up after populate allows things like DCA LBP to choose default local dc * for host in filter(lambda h: h.is_up, self.metadata.all_hosts()): # <<<<<<<<<<<<<< * profile.load_balancing_policy.on_up(host) * futures = set() */ __pyx_t_4 = NULL; __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_21add_execution_profile_lambda3, 0, __pyx_mstate_global->__pyx_n_u_Cluster_add_execution_profile_lo, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = __pyx_t_11; __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_5 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_t_6}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_filter, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1546, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_6))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1546, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } __pyx_t_7 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_12; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1546, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12)); #else __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); #endif ++__pyx_t_12; } if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L1_error) } else { __pyx_t_7 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1546, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1547 * # on_up after populate allows things like DCA LBP to choose default local dc * for host in filter(lambda h: h.is_up, self.metadata.all_hosts()): * profile.load_balancing_policy.on_up(host) # <<<<<<<<<<<<<< * futures = set() * for session in tuple(self.sessions): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_profile, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_host}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_up, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1546 * profile.load_balancing_policy.populate(self, self.metadata.all_hosts()) * # on_up after populate allows things like DCA LBP to choose default local dc * for host in filter(lambda h: h.is_up, self.metadata.all_hosts()): # <<<<<<<<<<<<<< * profile.load_balancing_policy.on_up(host) * futures = set() */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1548 * for host in filter(lambda h: h.is_up, self.metadata.all_hosts()): * profile.load_balancing_policy.on_up(host) * futures = set() # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * self._set_default_dbaas_consistency(session) */ __pyx_t_6 = PySet_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_futures = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1549 * profile.load_balancing_policy.on_up(host) * futures = set() * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * self._set_default_dbaas_consistency(session) * futures.update(session.update_created_pools()) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1549, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12)); #else __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); #endif ++__pyx_t_12; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1550 * futures = set() * for session in tuple(self.sessions): * self._set_default_dbaas_consistency(session) # <<<<<<<<<<<<<< * futures.update(session.update_created_pools()) * _, not_done = wait_futures(futures, pool_wait_timeout) */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_session}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_default_dbaas_consistency, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1551 * for session in tuple(self.sessions): * self._set_default_dbaas_consistency(session) * futures.update(session.update_created_pools()) # <<<<<<<<<<<<<< * _, not_done = wait_futures(futures, pool_wait_timeout) * if not_done: */ __pyx_t_4 = __pyx_v_session; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_created_pools, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_mstate_global->__pyx_umethod_PySet_Type__update, __pyx_v_futures, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1549 * profile.load_balancing_policy.on_up(host) * futures = set() * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * self._set_default_dbaas_consistency(session) * futures.update(session.update_created_pools()) */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1552 * self._set_default_dbaas_consistency(session) * futures.update(session.update_created_pools()) * _, not_done = wait_futures(futures, pool_wait_timeout) # <<<<<<<<<<<<<< * if not_done: * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_wait_futures); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_futures, __pyx_v_pool_wait_timeout}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 1552, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); } #else __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); index = 0; __pyx_t_7 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_7)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_4 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < (0)) __PYX_ERR(0, 1552, __pyx_L1_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L16_unpacking_done; __pyx_L15_unpacking_failed:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1552, __pyx_L1_error) __pyx_L16_unpacking_done:; } __pyx_v__ = __pyx_t_7; __pyx_t_7 = 0; __pyx_v_not_done = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":1553 * futures.update(session.update_created_pools()) * _, not_done = wait_futures(futures, pool_wait_timeout) * if not_done: # <<<<<<<<<<<<<< * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_not_done); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1553, __pyx_L1_error) if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":1554 * _, not_done = wait_futures(futures, pool_wait_timeout) * if not_done: * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") # <<<<<<<<<<<<<< * * def get_min_requests_per_connection(self, host_distance): */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OperationTimedOut); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_to_create_all_new_connect}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 1554, __pyx_L1_error) /* "cassandra/cluster.py":1553 * futures.update(session.update_created_pools()) * _, not_done = wait_futures(futures, pool_wait_timeout) * if not_done: # <<<<<<<<<<<<<< * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") * */ } /* "cassandra/cluster.py":1508 * UserType.evict_udt_class(keyspace, user_type) * * def add_execution_profile(self, name, profile, pool_wait_timeout=5): # <<<<<<<<<<<<<< * """ * Adds an :class:`.ExecutionProfile` to the cluster. This makes it available for use by ``name`` in :meth:`.Session.execute` */ /* 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_4); __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_11); __Pyx_AddTraceback("cassandra.cluster.Cluster.add_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_contact_points_but_no_lbp); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_futures); __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v__); __Pyx_XDECREF(__pyx_v_not_done); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1556 * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") * * def get_min_requests_per_connection(self, host_distance): # <<<<<<<<<<<<<< * return self._min_requests_per_connection[host_distance] * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_31get_min_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_31get_min_requests_per_connection = {"get_min_requests_per_connection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_31get_min_requests_per_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_31get_min_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_min_requests_per_connection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1556, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1556, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1556, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_min_requests_per_connection", 0) < (0)) __PYX_ERR(0, 1556, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_min_requests_per_connection", 1, 2, 2, i); __PYX_ERR(0, 1556, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1556, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1556, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_min_requests_per_connection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1556, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.get_min_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_30get_min_requests_per_connection(__pyx_self, __pyx_v_self, __pyx_v_host_distance); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_30get_min_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_min_requests_per_connection", 0); /* "cassandra/cluster.py":1557 * * def get_min_requests_per_connection(self, host_distance): * return self._min_requests_per_connection[host_distance] # <<<<<<<<<<<<<< * * def set_min_requests_per_connection(self, host_distance, min_requests): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_requests_per_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_host_distance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __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; /* "cassandra/cluster.py":1556 * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") * * def get_min_requests_per_connection(self, host_distance): # <<<<<<<<<<<<<< * return self._min_requests_per_connection[host_distance] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.get_min_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1559 * return self._min_requests_per_connection[host_distance] * * def set_min_requests_per_connection(self, host_distance, min_requests): # <<<<<<<<<<<<<< * """ * Sets a threshold for concurrent requests per connection, below which */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_33set_min_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_32set_min_requests_per_connection, "\n Sets a threshold for concurrent requests per connection, below which\n connections will be considered for disposal (down to core connections;\n see :meth:`~Cluster.set_core_connections_per_host`).\n\n Pertains to connection pool management in protocol versions {1,2}.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_33set_min_requests_per_connection = {"set_min_requests_per_connection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_33set_min_requests_per_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_32set_min_requests_per_connection}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_33set_min_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; PyObject *__pyx_v_min_requests = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_min_requests_per_connection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,&__pyx_mstate_global->__pyx_n_u_min_requests,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1559, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1559, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1559, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1559, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_min_requests_per_connection", 0) < (0)) __PYX_ERR(0, 1559, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_min_requests_per_connection", 1, 3, 3, i); __PYX_ERR(0, 1559, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1559, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1559, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1559, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; __pyx_v_min_requests = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_min_requests_per_connection", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1559, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.set_min_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_32set_min_requests_per_connection(__pyx_self, __pyx_v_self, __pyx_v_host_distance, __pyx_v_min_requests); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_32set_min_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_min_requests) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8[3]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_min_requests_per_connection", 0); /* "cassandra/cluster.py":1567 * Pertains to connection pool management in protocol versions {1,2}. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_min_requests_per_connection() only has an effect " */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1567, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1568 * """ * if self.protocol_version >= 3: * raise UnsupportedOperation( # <<<<<<<<<<<<<< * "Cluster.set_min_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Cluster_set_min_requests_per_con}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1568, __pyx_L1_error) /* "cassandra/cluster.py":1567 * Pertains to connection pool management in protocol versions {1,2}. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_min_requests_per_connection() only has an effect " */ } /* "cassandra/cluster.py":1571 * "Cluster.set_min_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") * if min_requests < 0 or min_requests > 126 or \ # <<<<<<<<<<<<<< * min_requests >= self._max_requests_per_connection[host_distance]: * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_min_requests, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { } else { __pyx_t_3 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_v_min_requests, __pyx_mstate_global->__pyx_int_126, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { } else { __pyx_t_3 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } /* "cassandra/cluster.py":1572 * "when using protocol_version 1 or 2.") * if min_requests < 0 or min_requests > 126 or \ * min_requests >= self._max_requests_per_connection[host_distance]: # <<<<<<<<<<<<<< * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % * (self._min_requests_per_connection[host_distance],)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_requests_per_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_host_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_min_requests, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_6; __pyx_L5_bool_binop_done:; /* "cassandra/cluster.py":1571 * "Cluster.set_min_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") * if min_requests < 0 or min_requests > 126 or \ # <<<<<<<<<<<<<< * min_requests >= self._max_requests_per_connection[host_distance]: * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % */ if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1573 * if min_requests < 0 or min_requests > 126 or \ * min_requests >= self._max_requests_per_connection[host_distance]: * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % # <<<<<<<<<<<<<< * (self._min_requests_per_connection[host_distance],)) * self._min_requests_per_connection[host_distance] = min_requests */ __pyx_t_4 = NULL; /* "cassandra/cluster.py":1574 * min_requests >= self._max_requests_per_connection[host_distance]: * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % * (self._min_requests_per_connection[host_distance],)) # <<<<<<<<<<<<<< * self._min_requests_per_connection[host_distance] = min_requests * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_requests_per_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_host_distance); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_min_requests_must_be_0_126_and_l; __pyx_t_8[1] = __pyx_t_1; __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__3; /* "cassandra/cluster.py":1573 * if min_requests < 0 or min_requests > 126 or \ * min_requests >= self._max_requests_per_connection[host_distance]: * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % # <<<<<<<<<<<<<< * (self._min_requests_per_connection[host_distance],)) * self._min_requests_per_connection[host_distance] = min_requests */ __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 82 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1573, __pyx_L1_error) /* "cassandra/cluster.py":1571 * "Cluster.set_min_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") * if min_requests < 0 or min_requests > 126 or \ # <<<<<<<<<<<<<< * min_requests >= self._max_requests_per_connection[host_distance]: * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % */ } /* "cassandra/cluster.py":1575 * raise ValueError("min_requests must be 0-126 and less than the max_requests for this host_distance (%d)" % * (self._min_requests_per_connection[host_distance],)) * self._min_requests_per_connection[host_distance] = min_requests # <<<<<<<<<<<<<< * * def get_max_requests_per_connection(self, host_distance): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_requests_per_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_v_host_distance, __pyx_v_min_requests) < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1559 * return self._min_requests_per_connection[host_distance] * * def set_min_requests_per_connection(self, host_distance, min_requests): # <<<<<<<<<<<<<< * """ * Sets a threshold for concurrent requests per connection, below which */ /* 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_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.Cluster.set_min_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1577 * self._min_requests_per_connection[host_distance] = min_requests * * def get_max_requests_per_connection(self, host_distance): # <<<<<<<<<<<<<< * return self._max_requests_per_connection[host_distance] * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_35get_max_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_35get_max_requests_per_connection = {"get_max_requests_per_connection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_35get_max_requests_per_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_35get_max_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_max_requests_per_connection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1577, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_max_requests_per_connection", 0) < (0)) __PYX_ERR(0, 1577, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_max_requests_per_connection", 1, 2, 2, i); __PYX_ERR(0, 1577, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1577, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1577, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_max_requests_per_connection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1577, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.get_max_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_34get_max_requests_per_connection(__pyx_self, __pyx_v_self, __pyx_v_host_distance); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_34get_max_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_max_requests_per_connection", 0); /* "cassandra/cluster.py":1578 * * def get_max_requests_per_connection(self, host_distance): * return self._max_requests_per_connection[host_distance] # <<<<<<<<<<<<<< * * def set_max_requests_per_connection(self, host_distance, max_requests): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_requests_per_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_host_distance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1578, __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; /* "cassandra/cluster.py":1577 * self._min_requests_per_connection[host_distance] = min_requests * * def get_max_requests_per_connection(self, host_distance): # <<<<<<<<<<<<<< * return self._max_requests_per_connection[host_distance] * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.get_max_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1580 * return self._max_requests_per_connection[host_distance] * * def set_max_requests_per_connection(self, host_distance, max_requests): # <<<<<<<<<<<<<< * """ * Sets a threshold for concurrent requests per connection, above which new */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_37set_max_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_36set_max_requests_per_connection, "\n Sets a threshold for concurrent requests per connection, above which new\n connections will be created to a host (up to max connections;\n see :meth:`~Cluster.set_max_connections_per_host`).\n\n Pertains to connection pool management in protocol versions {1,2}.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_37set_max_requests_per_connection = {"set_max_requests_per_connection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_37set_max_requests_per_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_36set_max_requests_per_connection}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_37set_max_requests_per_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; PyObject *__pyx_v_max_requests = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_max_requests_per_connection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,&__pyx_mstate_global->__pyx_n_u_max_requests,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1580, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1580, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1580, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1580, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_max_requests_per_connection", 0) < (0)) __PYX_ERR(0, 1580, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_max_requests_per_connection", 1, 3, 3, i); __PYX_ERR(0, 1580, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1580, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1580, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1580, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; __pyx_v_max_requests = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_max_requests_per_connection", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1580, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.set_max_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_36set_max_requests_per_connection(__pyx_self, __pyx_v_self, __pyx_v_host_distance, __pyx_v_max_requests); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_36set_max_requests_per_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_max_requests) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8[3]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_max_requests_per_connection", 0); /* "cassandra/cluster.py":1588 * Pertains to connection pool management in protocol versions {1,2}. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_max_requests_per_connection() only has an effect " */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1589 * """ * if self.protocol_version >= 3: * raise UnsupportedOperation( # <<<<<<<<<<<<<< * "Cluster.set_max_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Cluster_set_max_requests_per_con}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1589, __pyx_L1_error) /* "cassandra/cluster.py":1588 * Pertains to connection pool management in protocol versions {1,2}. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_max_requests_per_connection() only has an effect " */ } /* "cassandra/cluster.py":1592 * "Cluster.set_max_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") * if max_requests < 1 or max_requests > 127 or \ # <<<<<<<<<<<<<< * max_requests <= self._min_requests_per_connection[host_distance]: * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % */ __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_requests, __pyx_mstate_global->__pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { } else { __pyx_t_3 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_requests, __pyx_mstate_global->__pyx_int_127, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_6) { } else { __pyx_t_3 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } /* "cassandra/cluster.py":1593 * "when using protocol_version 1 or 2.") * if max_requests < 1 or max_requests > 127 or \ * max_requests <= self._min_requests_per_connection[host_distance]: # <<<<<<<<<<<<<< * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % * (self._min_requests_per_connection[host_distance],)) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_requests_per_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_host_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_requests, __pyx_t_4, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_6; __pyx_L5_bool_binop_done:; /* "cassandra/cluster.py":1592 * "Cluster.set_max_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") * if max_requests < 1 or max_requests > 127 or \ # <<<<<<<<<<<<<< * max_requests <= self._min_requests_per_connection[host_distance]: * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % */ if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1594 * if max_requests < 1 or max_requests > 127 or \ * max_requests <= self._min_requests_per_connection[host_distance]: * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % # <<<<<<<<<<<<<< * (self._min_requests_per_connection[host_distance],)) * self._max_requests_per_connection[host_distance] = max_requests */ __pyx_t_4 = NULL; /* "cassandra/cluster.py":1595 * max_requests <= self._min_requests_per_connection[host_distance]: * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % * (self._min_requests_per_connection[host_distance],)) # <<<<<<<<<<<<<< * self._max_requests_per_connection[host_distance] = max_requests * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_min_requests_per_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_host_distance); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_7), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_max_requests_must_be_1_127_and_g; __pyx_t_8[1] = __pyx_t_1; __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u__3; /* "cassandra/cluster.py":1594 * if max_requests < 1 or max_requests > 127 or \ * max_requests <= self._min_requests_per_connection[host_distance]: * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % # <<<<<<<<<<<<<< * (self._min_requests_per_connection[host_distance],)) * self._max_requests_per_connection[host_distance] = max_requests */ __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, 85 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1594, __pyx_L1_error) /* "cassandra/cluster.py":1592 * "Cluster.set_max_requests_per_connection() only has an effect " * "when using protocol_version 1 or 2.") * if max_requests < 1 or max_requests > 127 or \ # <<<<<<<<<<<<<< * max_requests <= self._min_requests_per_connection[host_distance]: * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % */ } /* "cassandra/cluster.py":1596 * raise ValueError("max_requests must be 1-127 and greater than the min_requests for this host_distance (%d)" % * (self._min_requests_per_connection[host_distance],)) * self._max_requests_per_connection[host_distance] = max_requests # <<<<<<<<<<<<<< * * def get_core_connections_per_host(self, host_distance): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_requests_per_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_v_host_distance, __pyx_v_max_requests) < 0))) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1580 * return self._max_requests_per_connection[host_distance] * * def set_max_requests_per_connection(self, host_distance, max_requests): # <<<<<<<<<<<<<< * """ * Sets a threshold for concurrent requests per connection, above which new */ /* 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_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.Cluster.set_max_requests_per_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1598 * self._max_requests_per_connection[host_distance] = max_requests * * def get_core_connections_per_host(self, host_distance): # <<<<<<<<<<<<<< * """ * Gets the minimum number of connections per Session that will be opened */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_39get_core_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_38get_core_connections_per_host, "\n Gets the minimum number of connections per Session that will be opened\n for each host with :class:`~.HostDistance` equal to `host_distance`.\n The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for\n :attr:`~HostDistance.REMOTE`.\n\n This property is ignored if :attr:`~.Cluster.protocol_version` is\n 3 or higher.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_39get_core_connections_per_host = {"get_core_connections_per_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_39get_core_connections_per_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_38get_core_connections_per_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_39get_core_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_core_connections_per_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1598, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1598, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1598, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_core_connections_per_host", 0) < (0)) __PYX_ERR(0, 1598, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_core_connections_per_host", 1, 2, 2, i); __PYX_ERR(0, 1598, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1598, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1598, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_core_connections_per_host", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1598, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.get_core_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_38get_core_connections_per_host(__pyx_self, __pyx_v_self, __pyx_v_host_distance); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_38get_core_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_core_connections_per_host", 0); /* "cassandra/cluster.py":1608 * 3 or higher. * """ * return self._core_connections_per_host[host_distance] # <<<<<<<<<<<<<< * * def set_core_connections_per_host(self, host_distance, core_connections): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_core_connections_per_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_host_distance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __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; /* "cassandra/cluster.py":1598 * self._max_requests_per_connection[host_distance] = max_requests * * def get_core_connections_per_host(self, host_distance): # <<<<<<<<<<<<<< * """ * Gets the minimum number of connections per Session that will be opened */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.get_core_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1610 * return self._core_connections_per_host[host_distance] * * def set_core_connections_per_host(self, host_distance, core_connections): # <<<<<<<<<<<<<< * """ * Sets the minimum number of connections per Session that will be opened */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_41set_core_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_40set_core_connections_per_host, "\n Sets the minimum number of connections per Session that will be opened\n for each host with :class:`~.HostDistance` equal to `host_distance`.\n The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for\n :attr:`~HostDistance.REMOTE`.\n\n Protocol version 1 and 2 are limited in the number of concurrent\n requests they can send per connection. The driver implements connection\n pooling to support higher levels of concurrency.\n\n If :attr:`~.Cluster.protocol_version` is set to 3 or higher, this\n is not supported (there is always one connection per host, unless\n the host is remote and :attr:`connect_to_remote_hosts` is :const:`False`)\n and using this will result in an :exc:`~.UnsupportedOperation`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_41set_core_connections_per_host = {"set_core_connections_per_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_41set_core_connections_per_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_40set_core_connections_per_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_41set_core_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; PyObject *__pyx_v_core_connections = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_core_connections_per_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,&__pyx_mstate_global->__pyx_n_u_core_connections,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1610, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1610, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1610, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1610, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_core_connections_per_host", 0) < (0)) __PYX_ERR(0, 1610, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_core_connections_per_host", 1, 3, 3, i); __PYX_ERR(0, 1610, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1610, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1610, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1610, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; __pyx_v_core_connections = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_core_connections_per_host", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1610, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.set_core_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_40set_core_connections_per_host(__pyx_self, __pyx_v_self, __pyx_v_host_distance, __pyx_v_core_connections); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_40set_core_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_core_connections) { PyObject *__pyx_v_old = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_core_connections_per_host", 0); /* "cassandra/cluster.py":1626 * and using this will result in an :exc:`~.UnsupportedOperation`. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_core_connections_per_host() only has an effect " */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1627 * """ * if self.protocol_version >= 3: * raise UnsupportedOperation( # <<<<<<<<<<<<<< * "Cluster.set_core_connections_per_host() only has an effect " * "when using protocol_version 1 or 2.") */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Cluster_set_core_connections_per}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1627, __pyx_L1_error) /* "cassandra/cluster.py":1626 * and using this will result in an :exc:`~.UnsupportedOperation`. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_core_connections_per_host() only has an effect " */ } /* "cassandra/cluster.py":1630 * "Cluster.set_core_connections_per_host() only has an effect " * "when using protocol_version 1 or 2.") * old = self._core_connections_per_host[host_distance] # <<<<<<<<<<<<<< * self._core_connections_per_host[host_distance] = core_connections * if old < core_connections: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_core_connections_per_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_host_distance); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_old = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":1631 * "when using protocol_version 1 or 2.") * old = self._core_connections_per_host[host_distance] * self._core_connections_per_host[host_distance] = core_connections # <<<<<<<<<<<<<< * if old < core_connections: * self._ensure_core_connections() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_core_connections_per_host); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely((PyObject_SetItem(__pyx_t_4, __pyx_v_host_distance, __pyx_v_core_connections) < 0))) __PYX_ERR(0, 1631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1632 * old = self._core_connections_per_host[host_distance] * self._core_connections_per_host[host_distance] = core_connections * if old < core_connections: # <<<<<<<<<<<<<< * self._ensure_core_connections() * */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_old, __pyx_v_core_connections, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1632, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":1633 * self._core_connections_per_host[host_distance] = core_connections * if old < core_connections: * self._ensure_core_connections() # <<<<<<<<<<<<<< * * def get_max_connections_per_host(self, host_distance): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_core_connections, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1632 * old = self._core_connections_per_host[host_distance] * self._core_connections_per_host[host_distance] = core_connections * if old < core_connections: # <<<<<<<<<<<<<< * self._ensure_core_connections() * */ } /* "cassandra/cluster.py":1610 * return self._core_connections_per_host[host_distance] * * def set_core_connections_per_host(self, host_distance, core_connections): # <<<<<<<<<<<<<< * """ * Sets the minimum number of connections per Session that will be opened */ /* 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_4); __Pyx_AddTraceback("cassandra.cluster.Cluster.set_core_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_old); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1635 * self._ensure_core_connections() * * def get_max_connections_per_host(self, host_distance): # <<<<<<<<<<<<<< * """ * Gets the maximum number of connections per Session that will be opened */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_43get_max_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_42get_max_connections_per_host, "\n Gets the maximum number of connections per Session that will be opened\n for each host with :class:`~.HostDistance` equal to `host_distance`.\n The default is 8 for :attr:`~HostDistance.LOCAL` and 2 for\n :attr:`~HostDistance.REMOTE`.\n\n This property is ignored if :attr:`~.Cluster.protocol_version` is\n 3 or higher.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_43get_max_connections_per_host = {"get_max_connections_per_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_43get_max_connections_per_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_42get_max_connections_per_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_43get_max_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_max_connections_per_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1635, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_max_connections_per_host", 0) < (0)) __PYX_ERR(0, 1635, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_max_connections_per_host", 1, 2, 2, i); __PYX_ERR(0, 1635, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1635, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1635, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_max_connections_per_host", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1635, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.get_max_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_42get_max_connections_per_host(__pyx_self, __pyx_v_self, __pyx_v_host_distance); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_42get_max_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_max_connections_per_host", 0); /* "cassandra/cluster.py":1645 * 3 or higher. * """ * return self._max_connections_per_host[host_distance] # <<<<<<<<<<<<<< * * def set_max_connections_per_host(self, host_distance, max_connections): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_connections_per_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_host_distance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1645, __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; /* "cassandra/cluster.py":1635 * self._ensure_core_connections() * * def get_max_connections_per_host(self, host_distance): # <<<<<<<<<<<<<< * """ * Gets the maximum number of connections per Session that will be opened */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.get_max_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1647 * return self._max_connections_per_host[host_distance] * * def set_max_connections_per_host(self, host_distance, max_connections): # <<<<<<<<<<<<<< * """ * Sets the maximum number of connections per Session that will be opened */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_45set_max_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_44set_max_connections_per_host, "\n Sets the maximum number of connections per Session that will be opened\n for each host with :class:`~.HostDistance` equal to `host_distance`.\n The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for\n :attr:`~HostDistance.REMOTE`.\n\n If :attr:`~.Cluster.protocol_version` is set to 3 or higher, this\n is not supported (there is always one connection per host, unless\n the host is remote and :attr:`connect_to_remote_hosts` is :const:`False`)\n and using this will result in an :exc:`~.UnsupportedOperation`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_45set_max_connections_per_host = {"set_max_connections_per_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_45set_max_connections_per_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_44set_max_connections_per_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_45set_max_connections_per_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_distance = 0; PyObject *__pyx_v_max_connections = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_max_connections_per_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_distance,&__pyx_mstate_global->__pyx_n_u_max_connections,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1647, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1647, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1647, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1647, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_max_connections_per_host", 0) < (0)) __PYX_ERR(0, 1647, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_max_connections_per_host", 1, 3, 3, i); __PYX_ERR(0, 1647, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1647, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1647, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1647, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_distance = values[1]; __pyx_v_max_connections = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_max_connections_per_host", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1647, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.set_max_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_44set_max_connections_per_host(__pyx_self, __pyx_v_self, __pyx_v_host_distance, __pyx_v_max_connections); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_44set_max_connections_per_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_distance, PyObject *__pyx_v_max_connections) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_max_connections_per_host", 0); /* "cassandra/cluster.py":1659 * and using this will result in an :exc:`~.UnsupportedOperation`. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_max_connections_per_host() only has an effect " */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1659, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":1660 * """ * if self.protocol_version >= 3: * raise UnsupportedOperation( # <<<<<<<<<<<<<< * "Cluster.set_max_connections_per_host() only has an effect " * "when using protocol_version 1 or 2.") */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Cluster_set_max_connections_per}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 1660, __pyx_L1_error) /* "cassandra/cluster.py":1659 * and using this will result in an :exc:`~.UnsupportedOperation`. * """ * if self.protocol_version >= 3: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "Cluster.set_max_connections_per_host() only has an effect " */ } /* "cassandra/cluster.py":1663 * "Cluster.set_max_connections_per_host() only has an effect " * "when using protocol_version 1 or 2.") * self._max_connections_per_host[host_distance] = max_connections # <<<<<<<<<<<<<< * * def connection_factory(self, endpoint, *args, **kwargs): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_max_connections_per_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_v_host_distance, __pyx_v_max_connections) < 0))) __PYX_ERR(0, 1663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1647 * return self._max_connections_per_host[host_distance] * * def set_max_connections_per_host(self, host_distance, max_connections): # <<<<<<<<<<<<<< * """ * Sets the maximum number of connections per Session that will be opened */ /* 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_4); __Pyx_AddTraceback("cassandra.cluster.Cluster.set_max_connections_per_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1665 * self._max_connections_per_host[host_distance] = max_connections * * def connection_factory(self, endpoint, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Called to create a new connection with proper configuration. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_47connection_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_46connection_factory, "\n Called to create a new connection with proper configuration.\n Intended for internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_47connection_factory = {"connection_factory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_47connection_factory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_46connection_factory}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_47connection_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_endpoint = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connection_factory (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_endpoint,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1665, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1665, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1665, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "connection_factory", 1) < (0)) __PYX_ERR(0, 1665, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("connection_factory", 0, 2, 2, i); __PYX_ERR(0, 1665, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1665, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1665, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_endpoint = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connection_factory", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1665, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Cluster.connection_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_46connection_factory(__pyx_self, __pyx_v_self, __pyx_v_endpoint, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_46connection_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_endpoint, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connection_factory", 0); __Pyx_INCREF(__pyx_v_kwargs); /* "cassandra/cluster.py":1670 * Intended for internal use only. * """ * kwargs = self._make_connection_kwargs(endpoint, kwargs) # <<<<<<<<<<<<<< * return self.connection_class.factory(endpoint, self.connect_timeout, *args, **kwargs) * */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_endpoint, __pyx_v_kwargs}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_connection_kwargs, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1671 * """ * kwargs = self._make_connection_kwargs(endpoint, kwargs) * return self.connection_class.factory(endpoint, self.connect_timeout, *args, **kwargs) # <<<<<<<<<<<<<< * * def _make_connection_factory(self, host, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connect_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_endpoint); __Pyx_GIVEREF(__pyx_v_endpoint); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_endpoint) != (0)) __PYX_ERR(0, 1671, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 1671, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 1671, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_4 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "cassandra/cluster.py":1665 * self._max_connections_per_host[host_distance] = max_connections * * def connection_factory(self, endpoint, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Called to create a new connection with proper configuration. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.connection_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1673 * return self.connection_class.factory(endpoint, self.connect_timeout, *args, **kwargs) * * def _make_connection_factory(self, host, *args, **kwargs): # <<<<<<<<<<<<<< * kwargs = self._make_connection_kwargs(host.endpoint, kwargs) * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_49_make_connection_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_49_make_connection_factory = {"_make_connection_factory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_49_make_connection_factory, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_49_make_connection_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_connection_factory (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1673, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1673, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1673, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "_make_connection_factory", 1) < (0)) __PYX_ERR(0, 1673, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_make_connection_factory", 0, 2, 2, i); __PYX_ERR(0, 1673, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1673, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1673, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_make_connection_factory", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 1673, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Cluster._make_connection_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_48_make_connection_factory(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_48_make_connection_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_connection_factory", 0); __Pyx_INCREF(__pyx_v_kwargs); /* "cassandra/cluster.py":1674 * * def _make_connection_factory(self, host, *args, **kwargs): * kwargs = self._make_connection_kwargs(host.endpoint, kwargs) # <<<<<<<<<<<<<< * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) * */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_3, __pyx_v_kwargs}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_connection_kwargs, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1675 * def _make_connection_factory(self, host, *args, **kwargs): * kwargs = self._make_connection_kwargs(host.endpoint, kwargs) * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) # <<<<<<<<<<<<<< * * def _make_connection_kwargs(self, endpoint, kwargs_dict): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connect_timeout); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2) != (0)) __PYX_ERR(0, 1675, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3) != (0)) __PYX_ERR(0, 1675, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5) != (0)) __PYX_ERR(0, 1675, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 1675, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_6 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":1673 * return self.connection_class.factory(endpoint, self.connect_timeout, *args, **kwargs) * * def _make_connection_factory(self, host, *args, **kwargs): # <<<<<<<<<<<<<< * kwargs = self._make_connection_kwargs(host.endpoint, kwargs) * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.Cluster._make_connection_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1677 * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) * * def _make_connection_kwargs(self, endpoint, kwargs_dict): # <<<<<<<<<<<<<< * if self._auth_provider_callable: * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_51_make_connection_kwargs(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_51_make_connection_kwargs = {"_make_connection_kwargs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_51_make_connection_kwargs, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_51_make_connection_kwargs(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_endpoint = 0; PyObject *__pyx_v_kwargs_dict = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_connection_kwargs (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_endpoint,&__pyx_mstate_global->__pyx_n_u_kwargs_dict,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1677, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1677, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1677, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1677, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_make_connection_kwargs", 0) < (0)) __PYX_ERR(0, 1677, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_make_connection_kwargs", 1, 3, 3, i); __PYX_ERR(0, 1677, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1677, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1677, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1677, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_endpoint = values[1]; __pyx_v_kwargs_dict = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_make_connection_kwargs", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1677, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._make_connection_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_50_make_connection_kwargs(__pyx_self, __pyx_v_self, __pyx_v_endpoint, __pyx_v_kwargs_dict); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_50_make_connection_kwargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_endpoint, PyObject *__pyx_v_kwargs_dict) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_connection_kwargs", 0); /* "cassandra/cluster.py":1678 * * def _make_connection_kwargs(self, endpoint, kwargs_dict): * if self._auth_provider_callable: # <<<<<<<<<<<<<< * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_auth_provider_callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1678, __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(0, 1678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":1679 * def _make_connection_kwargs(self, endpoint, kwargs_dict): * if self._auth_provider_callable: * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) # <<<<<<<<<<<<<< * * kwargs_dict.setdefault('port', self.port) */ __pyx_t_3 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_endpoint, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_auth_provider_callable, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_authenticator, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1678 * * def _make_connection_kwargs(self, endpoint, kwargs_dict): * if self._auth_provider_callable: # <<<<<<<<<<<<<< * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) * */ } /* "cassandra/cluster.py":1681 * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) * * kwargs_dict.setdefault('port', self.port) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('compression', self.compression) * kwargs_dict.setdefault('sockopts', self.sockopts) */ __pyx_t_4 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_port); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_port, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1682 * * kwargs_dict.setdefault('port', self.port) * kwargs_dict.setdefault('compression', self.compression) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('sockopts', self.sockopts) * kwargs_dict.setdefault('ssl_options', self.ssl_options) */ __pyx_t_3 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_compression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_compression, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1683 * kwargs_dict.setdefault('port', self.port) * kwargs_dict.setdefault('compression', self.compression) * kwargs_dict.setdefault('sockopts', self.sockopts) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('ssl_options', self.ssl_options) * kwargs_dict.setdefault('ssl_context', self.ssl_context) */ __pyx_t_4 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sockopts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_sockopts, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1684 * kwargs_dict.setdefault('compression', self.compression) * kwargs_dict.setdefault('sockopts', self.sockopts) * kwargs_dict.setdefault('ssl_options', self.ssl_options) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('ssl_context', self.ssl_context) * kwargs_dict.setdefault('cql_version', self.cql_version) */ __pyx_t_3 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ssl_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ssl_options, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1685 * kwargs_dict.setdefault('sockopts', self.sockopts) * kwargs_dict.setdefault('ssl_options', self.ssl_options) * kwargs_dict.setdefault('ssl_context', self.ssl_context) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('cql_version', self.cql_version) * kwargs_dict.setdefault('protocol_version', self.protocol_version) */ __pyx_t_4 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_ssl_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ssl_context, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1686 * kwargs_dict.setdefault('ssl_options', self.ssl_options) * kwargs_dict.setdefault('ssl_context', self.ssl_context) * kwargs_dict.setdefault('cql_version', self.cql_version) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('protocol_version', self.protocol_version) * kwargs_dict.setdefault('user_type_map', self._user_types) */ __pyx_t_3 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cql_version); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cql_version, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1687 * kwargs_dict.setdefault('ssl_context', self.ssl_context) * kwargs_dict.setdefault('cql_version', self.cql_version) * kwargs_dict.setdefault('protocol_version', self.protocol_version) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('user_type_map', self._user_types) * kwargs_dict.setdefault('allow_beta_protocol_version', self.allow_beta_protocol_version) */ __pyx_t_4 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_protocol_version, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1688 * kwargs_dict.setdefault('cql_version', self.cql_version) * kwargs_dict.setdefault('protocol_version', self.protocol_version) * kwargs_dict.setdefault('user_type_map', self._user_types) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('allow_beta_protocol_version', self.allow_beta_protocol_version) * kwargs_dict.setdefault('no_compact', self.no_compact) */ __pyx_t_3 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_user_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_user_type_map, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1689 * kwargs_dict.setdefault('protocol_version', self.protocol_version) * kwargs_dict.setdefault('user_type_map', self._user_types) * kwargs_dict.setdefault('allow_beta_protocol_version', self.allow_beta_protocol_version) # <<<<<<<<<<<<<< * kwargs_dict.setdefault('no_compact', self.no_compact) * */ __pyx_t_4 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1690 * kwargs_dict.setdefault('user_type_map', self._user_types) * kwargs_dict.setdefault('allow_beta_protocol_version', self.allow_beta_protocol_version) * kwargs_dict.setdefault('no_compact', self.no_compact) # <<<<<<<<<<<<<< * * return kwargs_dict */ __pyx_t_3 = __pyx_v_kwargs_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_no_compact); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_no_compact, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_setdefault, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1692 * kwargs_dict.setdefault('no_compact', self.no_compact) * * return kwargs_dict # <<<<<<<<<<<<<< * * def protocol_downgrade(self, host_endpoint, previous_version): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_kwargs_dict); __pyx_r = __pyx_v_kwargs_dict; goto __pyx_L0; /* "cassandra/cluster.py":1677 * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) * * def _make_connection_kwargs(self, endpoint, kwargs_dict): # <<<<<<<<<<<<<< * if self._auth_provider_callable: * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) */ /* function exit code */ __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_6); __Pyx_AddTraceback("cassandra.cluster.Cluster._make_connection_kwargs", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1694 * return kwargs_dict * * def protocol_downgrade(self, host_endpoint, previous_version): # <<<<<<<<<<<<<< * if self._protocol_version_explicit: * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_53protocol_downgrade(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_53protocol_downgrade = {"protocol_downgrade", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_53protocol_downgrade, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_53protocol_downgrade(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host_endpoint = 0; PyObject *__pyx_v_previous_version = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("protocol_downgrade (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host_endpoint,&__pyx_mstate_global->__pyx_n_u_previous_version,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1694, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1694, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1694, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1694, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "protocol_downgrade", 0) < (0)) __PYX_ERR(0, 1694, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("protocol_downgrade", 1, 3, 3, i); __PYX_ERR(0, 1694, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1694, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1694, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1694, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host_endpoint = values[1]; __pyx_v_previous_version = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("protocol_downgrade", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1694, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.protocol_downgrade", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_52protocol_downgrade(__pyx_self, __pyx_v_self, __pyx_v_host_endpoint, __pyx_v_previous_version); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_52protocol_downgrade(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host_endpoint, PyObject *__pyx_v_previous_version) { PyObject *__pyx_v_new_version = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("protocol_downgrade", 0); /* "cassandra/cluster.py":1695 * * def protocol_downgrade(self, host_endpoint, previous_version): * if self._protocol_version_explicit: # <<<<<<<<<<<<<< * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) * new_version = ProtocolVersion.get_lower_supported(previous_version) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_explicit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __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(0, 1695, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":1696 * def protocol_downgrade(self, host_endpoint, previous_version): * if self._protocol_version_explicit: * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) # <<<<<<<<<<<<<< * new_version = ProtocolVersion.get_lower_supported(previous_version) * if new_version < ProtocolVersion.MIN_SUPPORTED: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_v_previous_version), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_ProtocolError_returned_from_serv, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __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(0, 1696, __pyx_L1_error) /* "cassandra/cluster.py":1695 * * def protocol_downgrade(self, host_endpoint, previous_version): * if self._protocol_version_explicit: # <<<<<<<<<<<<<< * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) * new_version = ProtocolVersion.get_lower_supported(previous_version) */ } /* "cassandra/cluster.py":1697 * if self._protocol_version_explicit: * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) * new_version = ProtocolVersion.get_lower_supported(previous_version) # <<<<<<<<<<<<<< * if new_version < ProtocolVersion.MIN_SUPPORTED: * raise DriverException( */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_get_lower_supported); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_previous_version}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_new_version = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":1698 * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) * new_version = ProtocolVersion.get_lower_supported(previous_version) * if new_version < ProtocolVersion.MIN_SUPPORTED: # <<<<<<<<<<<<<< * raise DriverException( * "Cannot downgrade protocol version below minimum supported version: %d" % (ProtocolVersion.MIN_SUPPORTED,)) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_MIN_SUPPORTED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_new_version, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":1699 * new_version = ProtocolVersion.get_lower_supported(previous_version) * if new_version < ProtocolVersion.MIN_SUPPORTED: * raise DriverException( # <<<<<<<<<<<<<< * "Cannot downgrade protocol version below minimum supported version: %d" % (ProtocolVersion.MIN_SUPPORTED,)) * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":1700 * if new_version < ProtocolVersion.MIN_SUPPORTED: * raise DriverException( * "Cannot downgrade protocol version below minimum supported version: %d" % (ProtocolVersion.MIN_SUPPORTED,)) # <<<<<<<<<<<<<< * * log.warning("Downgrading core protocol version from %d to %d for %s. " */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_MIN_SUPPORTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_FormatAndDecref(__Pyx_PyNumber_Long(__pyx_t_5), __pyx_mstate_global->__pyx_n_u_d); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Cannot_downgrade_protocol_versio, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 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(0, 1699, __pyx_L1_error) /* "cassandra/cluster.py":1698 * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) * new_version = ProtocolVersion.get_lower_supported(previous_version) * if new_version < ProtocolVersion.MIN_SUPPORTED: # <<<<<<<<<<<<<< * raise DriverException( * "Cannot downgrade protocol version below minimum supported version: %d" % (ProtocolVersion.MIN_SUPPORTED,)) */ } /* "cassandra/cluster.py":1702 * "Cannot downgrade protocol version below minimum supported version: %d" % (ProtocolVersion.MIN_SUPPORTED,)) * * log.warning("Downgrading core protocol version from %d to %d for %s. " # <<<<<<<<<<<<<< * "To avoid this, it is best practice to explicitly set Cluster(protocol_version) to the version supported by your cluster. " * "https://docs.datastax.com/en/developer/python-driver/latest/api/cassandra/cluster.html#cassandra.cluster.Cluster.protocol_version", self.protocol_version, new_version, host_endpoint) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1704 * log.warning("Downgrading core protocol version from %d to %d for %s. " * "To avoid this, it is best practice to explicitly set Cluster(protocol_version) to the version supported by your cluster. " * "https://docs.datastax.com/en/developer/python-driver/latest/api/cassandra/cluster.html#cassandra.cluster.Cluster.protocol_version", self.protocol_version, new_version, host_endpoint) # <<<<<<<<<<<<<< * self.protocol_version = new_version * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Downgrading_core_protocol_versio, __pyx_t_5, __pyx_v_new_version, __pyx_v_host_endpoint}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1705 * "To avoid this, it is best practice to explicitly set Cluster(protocol_version) to the version supported by your cluster. " * "https://docs.datastax.com/en/developer/python-driver/latest/api/cassandra/cluster.html#cassandra.cluster.Cluster.protocol_version", self.protocol_version, new_version, host_endpoint) * self.protocol_version = new_version # <<<<<<<<<<<<<< * * def connect(self, keyspace=None, wait_for_all_pools=False): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version, __pyx_v_new_version) < (0)) __PYX_ERR(0, 1705, __pyx_L1_error) /* "cassandra/cluster.py":1694 * return kwargs_dict * * def protocol_downgrade(self, host_endpoint, previous_version): # <<<<<<<<<<<<<< * if self._protocol_version_explicit: * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.Cluster.protocol_downgrade", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_new_version); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1707 * self.protocol_version = new_version * * def connect(self, keyspace=None, wait_for_all_pools=False): # <<<<<<<<<<<<<< * """ * Creates and returns a new :class:`~.Session` object. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_55connect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_54connect, "\n Creates and returns a new :class:`~.Session` object.\n\n If `keyspace` is specified, that keyspace will be the default keyspace for\n operations on the ``Session``.\n\n `wait_for_all_pools` specifies whether this call should wait for all connection pools to be\n established or attempted. Default is `False`, which means it will return when the first\n successful connection is established. Remaining pools are added asynchronously.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_55connect = {"connect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_55connect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_54connect}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_55connect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_wait_for_all_pools = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_wait_for_all_pools,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1707, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1707, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1707, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1707, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "connect", 0) < (0)) __PYX_ERR(0, 1707, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("connect", 0, 1, 3, i); __PYX_ERR(0, 1707, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1707, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1707, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1707, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_wait_for_all_pools = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connect", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1707, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_54connect(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_wait_for_all_pools); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_54connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_wait_for_all_pools) { PyObject *__pyx_v_endpoint = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_new = NULL; PyObject *__pyx_v_listener = NULL; PyObject *__pyx_v_h = NULL; PyObject *__pyx_v_session = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); PyObject *(*__pyx_t_15)(PyObject *); Py_ssize_t __pyx_t_16; PyObject *(*__pyx_t_17)(PyObject *); PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 0); /* "cassandra/cluster.py":1718 * successful connection is established. Remaining pools are added asynchronously. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * raise DriverException("Cluster is already shut down") */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1718, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1718, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":1719 * """ * with self._lock: * if self.is_shutdown: # <<<<<<<<<<<<<< * raise DriverException("Cluster is already shut down") * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1719, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_10)) { /* "cassandra/cluster.py":1720 * with self._lock: * if self.is_shutdown: * raise DriverException("Cluster is already shut down") # <<<<<<<<<<<<<< * * if not self._is_setup: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1720, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cluster_is_already_shut_down}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L7_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(0, 1720, __pyx_L7_error) /* "cassandra/cluster.py":1719 * """ * with self._lock: * if self.is_shutdown: # <<<<<<<<<<<<<< * raise DriverException("Cluster is already shut down") * */ } /* "cassandra/cluster.py":1722 * raise DriverException("Cluster is already shut down") * * if not self._is_setup: # <<<<<<<<<<<<<< * log.debug("Connecting to cluster, contact points: %s; protocol version: %s", * self.contact_points, self.protocol_version) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_setup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1722, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (!__pyx_t_10); if (__pyx_t_11) { /* "cassandra/cluster.py":1723 * * if not self._is_setup: * log.debug("Connecting to cluster, contact points: %s; protocol version: %s", # <<<<<<<<<<<<<< * self.contact_points, self.protocol_version) * self.connection_class.initialize_reactor() */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1723, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1723, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1724 * if not self._is_setup: * log.debug("Connecting to cluster, contact points: %s; protocol version: %s", * self.contact_points, self.protocol_version) # <<<<<<<<<<<<<< * self.connection_class.initialize_reactor() * _register_cluster_shutdown(self) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_contact_points); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1724, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Connecting_to_cluster_contact_po, __pyx_t_3, __pyx_t_12}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1725 * log.debug("Connecting to cluster, contact points: %s; protocol version: %s", * self.contact_points, self.protocol_version) * self.connection_class.initialize_reactor() # <<<<<<<<<<<<<< * _register_cluster_shutdown(self) * for endpoint in self.endpoints_resolved: */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1725, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_initialize_reactor, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1725, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1726 * self.contact_points, self.protocol_version) * self.connection_class.initialize_reactor() * _register_cluster_shutdown(self) # <<<<<<<<<<<<<< * for endpoint in self.endpoints_resolved: * host, new = self.add_host(endpoint, signal=False) */ __pyx_t_12 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_register_cluster_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1726, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_12); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_self}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1726, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1727 * self.connection_class.initialize_reactor() * _register_cluster_shutdown(self) * for endpoint in self.endpoints_resolved: # <<<<<<<<<<<<<< * host, new = self.add_host(endpoint, signal=False) * if new: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoints_resolved); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); 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_13 = 0; __pyx_t_14 = NULL; } else { __pyx_t_13 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1727, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1727, __pyx_L7_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_4))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1727, __pyx_L7_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_13; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1727, __pyx_L7_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_13)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_13); #endif ++__pyx_t_13; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L7_error) } else { __pyx_t_1 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1727, __pyx_L7_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_endpoint, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1728 * _register_cluster_shutdown(self) * for endpoint in self.endpoints_resolved: * host, new = self.add_host(endpoint, signal=False) # <<<<<<<<<<<<<< * if new: * host.set_up() */ __pyx_t_12 = __pyx_v_self; __Pyx_INCREF(__pyx_t_12); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_v_endpoint}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_signal, Py_False, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1728, __pyx_L7_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_add_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L7_error) __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(0, 1728, __pyx_L7_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_3); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_12); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L7_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1728, __pyx_L7_error) __Pyx_XGOTREF(__pyx_t_12); } #else __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1728, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1728, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1728, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); index = 0; __pyx_t_3 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_12 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_12)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_5), 2) < (0)) __PYX_ERR(0, 1728, __pyx_L7_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L18_unpacking_done; __pyx_L17_unpacking_failed:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 1728, __pyx_L7_error) __pyx_L18_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":1729 * for endpoint in self.endpoints_resolved: * host, new = self.add_host(endpoint, signal=False) * if new: # <<<<<<<<<<<<<< * host.set_up() * for listener in self.listeners: */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_new); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1729, __pyx_L7_error) if (__pyx_t_11) { /* "cassandra/cluster.py":1730 * host, new = self.add_host(endpoint, signal=False) * if new: * host.set_up() # <<<<<<<<<<<<<< * for listener in self.listeners: * listener.on_add(host) */ __pyx_t_12 = __pyx_v_host; __Pyx_INCREF(__pyx_t_12); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_up, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1731 * if new: * host.set_up() * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_add(host) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_12 = __pyx_t_1; __Pyx_INCREF(__pyx_t_12); __pyx_t_16 = 0; __pyx_t_17 = NULL; } else { __pyx_t_16 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1731, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_17 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1731, __pyx_L7_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_17)) { if (likely(PyList_CheckExact(__pyx_t_12))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1731, __pyx_L7_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_12, __pyx_t_16, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_16; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_12); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1731, __pyx_L7_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_16)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_12, __pyx_t_16); #endif ++__pyx_t_16; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L7_error) } else { __pyx_t_1 = __pyx_t_17(__pyx_t_12); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1731, __pyx_L7_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_listener, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1732 * host.set_up() * for listener in self.listeners: * listener.on_add(host) # <<<<<<<<<<<<<< * * self.profile_manager.populate( */ __pyx_t_3 = __pyx_v_listener; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1731 * if new: * host.set_up() * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_add(host) * */ } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":1729 * for endpoint in self.endpoints_resolved: * host, new = self.add_host(endpoint, signal=False) * if new: # <<<<<<<<<<<<<< * host.set_up() * for listener in self.listeners: */ } /* "cassandra/cluster.py":1727 * self.connection_class.initialize_reactor() * _register_cluster_shutdown(self) * for endpoint in self.endpoints_resolved: # <<<<<<<<<<<<<< * host, new = self.add_host(endpoint, signal=False) * if new: */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1734 * listener.on_add(host) * * self.profile_manager.populate( # <<<<<<<<<<<<<< * weakref.proxy(self), self.metadata.all_hosts()) * self.load_balancing_policy.populate( */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1734, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __pyx_t_1; __Pyx_INCREF(__pyx_t_12); /* "cassandra/cluster.py":1735 * * self.profile_manager.populate( * weakref.proxy(self), self.metadata.all_hosts()) # <<<<<<<<<<<<<< * self.load_balancing_policy.populate( * weakref.proxy(self), self.metadata.all_hosts() */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1735, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_proxy); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1735, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_19))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_19); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_19); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_19, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1735, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1735, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_5 = __pyx_t_18; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1735, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_19); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_t_3, __pyx_t_19}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_populate, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1734, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1736 * self.profile_manager.populate( * weakref.proxy(self), self.metadata.all_hosts()) * self.load_balancing_policy.populate( # <<<<<<<<<<<<<< * weakref.proxy(self), self.metadata.all_hosts() * ) */ __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1736, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_1 = __pyx_t_19; __Pyx_INCREF(__pyx_t_1); /* "cassandra/cluster.py":1737 * weakref.proxy(self), self.metadata.all_hosts()) * self.load_balancing_policy.populate( * weakref.proxy(self), self.metadata.all_hosts() # <<<<<<<<<<<<<< * ) * */ __pyx_t_12 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1737, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_proxy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1737, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_12); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_self}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1737, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1737, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_12 = __pyx_t_18; __Pyx_INCREF(__pyx_t_12); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1737, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_3, __pyx_t_5}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_populate, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1736, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1740 * ) * * try: # <<<<<<<<<<<<<< * self.control_connection.connect() * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); /*try:*/ { /* "cassandra/cluster.py":1741 * * try: * self.control_connection.connect() # <<<<<<<<<<<<<< * * # we set all contact points up for connecting, but we won't infer state after this */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1741, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_19 = __pyx_t_5; __Pyx_INCREF(__pyx_t_19); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_19, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_connect, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1744 * * # we set all contact points up for connecting, but we won't infer state after this * for endpoint in self.endpoints_resolved: # <<<<<<<<<<<<<< * h = self.metadata.get_host(endpoint) * if h and self.profile_manager.distance(h) == HostDistance.IGNORED: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_endpoints_resolved); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1744, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0; __pyx_t_14 = NULL; } else { __pyx_t_13 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1744, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1744, __pyx_L24_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_5))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1744, __pyx_L24_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_13; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1744, __pyx_L24_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_13); #endif ++__pyx_t_13; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1744, __pyx_L24_error) } else { __pyx_t_4 = __pyx_t_14(__pyx_t_5); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1744, __pyx_L24_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_endpoint, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1745 * # we set all contact points up for connecting, but we won't infer state after this * for endpoint in self.endpoints_resolved: * h = self.metadata.get_host(endpoint) # <<<<<<<<<<<<<< * if h and self.profile_manager.distance(h) == HostDistance.IGNORED: * h.is_up = None */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_19 = __pyx_t_3; __Pyx_INCREF(__pyx_t_19); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_endpoint}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_h, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1746 * for endpoint in self.endpoints_resolved: * h = self.metadata.get_host(endpoint) * if h and self.profile_manager.distance(h) == HostDistance.IGNORED: # <<<<<<<<<<<<<< * h.is_up = None * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_h); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1746, __pyx_L24_error) if (__pyx_t_10) { } else { __pyx_t_11 = __pyx_t_10; goto __pyx_L33_bool_binop_done; } __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1746, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = __pyx_t_19; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_h}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1746, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_19 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_19); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1746, __pyx_L24_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1746, __pyx_L24_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_11 = __pyx_t_10; __pyx_L33_bool_binop_done:; if (__pyx_t_11) { /* "cassandra/cluster.py":1747 * h = self.metadata.get_host(endpoint) * if h and self.profile_manager.distance(h) == HostDistance.IGNORED: * h.is_up = None # <<<<<<<<<<<<<< * * log.debug("Control connection created") */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_h, __pyx_mstate_global->__pyx_n_u_is_up, Py_None) < (0)) __PYX_ERR(0, 1747, __pyx_L24_error) /* "cassandra/cluster.py":1746 * for endpoint in self.endpoints_resolved: * h = self.metadata.get_host(endpoint) * if h and self.profile_manager.distance(h) == HostDistance.IGNORED: # <<<<<<<<<<<<<< * h.is_up = None * */ } /* "cassandra/cluster.py":1744 * * # we set all contact points up for connecting, but we won't infer state after this * for endpoint in self.endpoints_resolved: # <<<<<<<<<<<<<< * h = self.metadata.get_host(endpoint) * if h and self.profile_manager.distance(h) == HostDistance.IGNORED: */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1749 * h.is_up = None * * log.debug("Control connection created") # <<<<<<<<<<<<<< * except Exception: * log.exception("Control connection failed to connect, " */ __pyx_t_19 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1749, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_19); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_mstate_global->__pyx_kp_u_Control_connection_created}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1749, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1740 * ) * * try: # <<<<<<<<<<<<<< * self.control_connection.connect() * */ } __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; goto __pyx_L29_try_end; __pyx_L24_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 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; /* "cassandra/cluster.py":1750 * * log.debug("Control connection created") * except Exception: # <<<<<<<<<<<<<< * log.exception("Control connection failed to connect, " * "shutting down Cluster:") */ __pyx_t_23 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_23) { __Pyx_AddTraceback("cassandra.cluster.Cluster.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_19) < 0) __PYX_ERR(0, 1750, __pyx_L26_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_19); /* "cassandra/cluster.py":1751 * log.debug("Control connection created") * except Exception: * log.exception("Control connection failed to connect, " # <<<<<<<<<<<<<< * "shutting down Cluster:") * self.shutdown() */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1751, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1751, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Control_connection_failed_to_con}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1751, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1753 * log.exception("Control connection failed to connect, " * "shutting down Cluster:") * self.shutdown() # <<<<<<<<<<<<<< * raise * */ __pyx_t_12 = __pyx_v_self; __Pyx_INCREF(__pyx_t_12); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1753, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1754 * "shutting down Cluster:") * self.shutdown() * raise # <<<<<<<<<<<<<< * * self.profile_manager.check_supported() # todo: rename this method */ __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_19); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_19 = 0; __PYX_ERR(0, 1754, __pyx_L26_except_error) } goto __pyx_L26_except_error; /* "cassandra/cluster.py":1740 * ) * * try: # <<<<<<<<<<<<<< * self.control_connection.connect() * */ __pyx_L26_except_error:; __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); goto __pyx_L7_error; __pyx_L29_try_end:; } /* "cassandra/cluster.py":1756 * raise * * self.profile_manager.check_supported() # todo: rename this method # <<<<<<<<<<<<<< * * if self.idle_heartbeat_interval: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1756, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_19 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_check_supported, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1756, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_19); } __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "cassandra/cluster.py":1758 * self.profile_manager.check_supported() # todo: rename this method * * if self.idle_heartbeat_interval: # <<<<<<<<<<<<<< * self._idle_heartbeat = ConnectionHeartbeat( * self.idle_heartbeat_interval, */ __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_interval); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1758, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_19); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1758, __pyx_L7_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (__pyx_t_11) { /* "cassandra/cluster.py":1759 * * if self.idle_heartbeat_interval: * self._idle_heartbeat = ConnectionHeartbeat( # <<<<<<<<<<<<<< * self.idle_heartbeat_interval, * self.get_connection_holders, */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConnectionHeartbeat); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":1760 * if self.idle_heartbeat_interval: * self._idle_heartbeat = ConnectionHeartbeat( * self.idle_heartbeat_interval, # <<<<<<<<<<<<<< * self.get_connection_holders, * timeout=self.idle_heartbeat_timeout */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_interval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); /* "cassandra/cluster.py":1761 * self._idle_heartbeat = ConnectionHeartbeat( * self.idle_heartbeat_interval, * self.get_connection_holders, # <<<<<<<<<<<<<< * timeout=self.idle_heartbeat_timeout * ) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_get_connection_holders); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1761, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); /* "cassandra/cluster.py":1762 * self.idle_heartbeat_interval, * self.get_connection_holders, * timeout=self.idle_heartbeat_timeout # <<<<<<<<<<<<<< * ) * self._is_setup = True */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_t_3, __pyx_t_12}; __pyx_t_18 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1759, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_18); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_1, __pyx_t_18, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 1759, __pyx_L7_error) __pyx_t_19 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_18); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1759, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_19); } /* "cassandra/cluster.py":1759 * * if self.idle_heartbeat_interval: * self._idle_heartbeat = ConnectionHeartbeat( # <<<<<<<<<<<<<< * self.idle_heartbeat_interval, * self.get_connection_holders, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat, __pyx_t_19) < (0)) __PYX_ERR(0, 1759, __pyx_L7_error) __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; /* "cassandra/cluster.py":1758 * self.profile_manager.check_supported() # todo: rename this method * * if self.idle_heartbeat_interval: # <<<<<<<<<<<<<< * self._idle_heartbeat = ConnectionHeartbeat( * self.idle_heartbeat_interval, */ } /* "cassandra/cluster.py":1764 * timeout=self.idle_heartbeat_timeout * ) * self._is_setup = True # <<<<<<<<<<<<<< * * session = self._new_session(keyspace) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_setup, Py_True) < (0)) __PYX_ERR(0, 1764, __pyx_L7_error) /* "cassandra/cluster.py":1722 * raise DriverException("Cluster is already shut down") * * if not self._is_setup: # <<<<<<<<<<<<<< * log.debug("Connecting to cluster, contact points: %s; protocol version: %s", * self.contact_points, self.protocol_version) */ } /* "cassandra/cluster.py":1718 * successful connection is established. Remaining pools are added asynchronously. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * raise DriverException("Cluster is already shut down") */ } __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_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 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("cassandra.cluster.Cluster.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_19, &__pyx_t_4, &__pyx_t_18) < 0) __PYX_ERR(0, 1718, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_1 = PyTuple_Pack(3, __pyx_t_19, __pyx_t_4, __pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 1718, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_22); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_22); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 1718, __pyx_L9_except_error) __pyx_t_10 = (!__pyx_t_11); if (unlikely(__pyx_t_10)) { __Pyx_GIVEREF(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestoreWithState(__pyx_t_19, __pyx_t_4, __pyx_t_18); __pyx_t_19 = 0; __pyx_t_4 = 0; __pyx_t_18 = 0; __PYX_ERR(0, 1718, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L42; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L42:; } /* "cassandra/cluster.py":1766 * self._is_setup = True * * session = self._new_session(keyspace) # <<<<<<<<<<<<<< * if wait_for_all_pools: * wait_futures(session._initial_connect_futures) */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_keyspace}; __pyx_t_18 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new_session, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1766, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); } __pyx_v_session = __pyx_t_18; __pyx_t_18 = 0; /* "cassandra/cluster.py":1767 * * session = self._new_session(keyspace) * if wait_for_all_pools: # <<<<<<<<<<<<<< * wait_futures(session._initial_connect_futures) * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_wait_for_all_pools); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1767, __pyx_L1_error) if (__pyx_t_10) { /* "cassandra/cluster.py":1768 * session = self._new_session(keyspace) * if wait_for_all_pools: * wait_futures(session._initial_connect_futures) # <<<<<<<<<<<<<< * * self._set_default_dbaas_consistency(session) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_wait_futures); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_mstate_global->__pyx_n_u_initial_connect_futures); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_19))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_19); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_19); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_19, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_1}; __pyx_t_18 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "cassandra/cluster.py":1767 * * session = self._new_session(keyspace) * if wait_for_all_pools: # <<<<<<<<<<<<<< * wait_futures(session._initial_connect_futures) * */ } /* "cassandra/cluster.py":1770 * wait_futures(session._initial_connect_futures) * * self._set_default_dbaas_consistency(session) # <<<<<<<<<<<<<< * * return session */ __pyx_t_19 = __pyx_v_self; __Pyx_INCREF(__pyx_t_19); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_v_session}; __pyx_t_18 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_default_dbaas_consistency, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "cassandra/cluster.py":1772 * self._set_default_dbaas_consistency(session) * * return session # <<<<<<<<<<<<<< * * def _set_default_dbaas_consistency(self, session): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_session); __pyx_r = __pyx_v_session; goto __pyx_L0; /* "cassandra/cluster.py":1707 * self.protocol_version = new_version * * def connect(self, keyspace=None, wait_for_all_pools=False): # <<<<<<<<<<<<<< * """ * Creates and returns a new :class:`~.Session` object. */ /* function exit code */ __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_12); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("cassandra.cluster.Cluster.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_endpoint); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_new); __Pyx_XDECREF(__pyx_v_listener); __Pyx_XDECREF(__pyx_v_h); __Pyx_XDECREF(__pyx_v_session); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1774 * return session * * def _set_default_dbaas_consistency(self, session): # <<<<<<<<<<<<<< * if session.cluster.metadata.dbaas: * for profile in self.profile_manager.profiles.values(): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_57_set_default_dbaas_consistency(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_57_set_default_dbaas_consistency = {"_set_default_dbaas_consistency", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_57_set_default_dbaas_consistency, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_57_set_default_dbaas_consistency(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_session = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_default_dbaas_consistency (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_session,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1774, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1774, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_default_dbaas_consistency", 0) < (0)) __PYX_ERR(0, 1774, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_default_dbaas_consistency", 1, 2, 2, i); __PYX_ERR(0, 1774, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1774, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1774, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_session = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_default_dbaas_consistency", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1774, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._set_default_dbaas_consistency", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_56_set_default_dbaas_consistency(__pyx_self, __pyx_v_self, __pyx_v_session); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_56_set_default_dbaas_consistency(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_session) { PyObject *__pyx_v_profile = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_default_dbaas_consistency", 0); /* "cassandra/cluster.py":1775 * * def _set_default_dbaas_consistency(self, session): * if session.cluster.metadata.dbaas: # <<<<<<<<<<<<<< * for profile in self.profile_manager.profiles.values(): * if not profile._consistency_level_explicit: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __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_mstate_global->__pyx_n_u_dbaas); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":1776 * def _set_default_dbaas_consistency(self, session): * if session.cluster.metadata.dbaas: * for profile in self.profile_manager.profiles.values(): # <<<<<<<<<<<<<< * if not profile._consistency_level_explicit: * profile.consistency_level = ConsistencyLevel.LOCAL_QUORUM */ __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_7 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); __PYX_ERR(0, 1776, __pyx_L1_error) } __pyx_t_2 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_mstate_global->__pyx_n_u_values, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, NULL, &__pyx_t_2, NULL, __pyx_t_6); if (unlikely(__pyx_t_8 == 0)) break; if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1776, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_profile, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1777 * if session.cluster.metadata.dbaas: * for profile in self.profile_manager.profiles.values(): * if not profile._consistency_level_explicit: # <<<<<<<<<<<<<< * profile.consistency_level = ConsistencyLevel.LOCAL_QUORUM * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_profile, __pyx_mstate_global->__pyx_n_u_consistency_level_explicit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1777, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (!__pyx_t_3); if (__pyx_t_9) { /* "cassandra/cluster.py":1778 * for profile in self.profile_manager.profiles.values(): * if not profile._consistency_level_explicit: * profile.consistency_level = ConsistencyLevel.LOCAL_QUORUM # <<<<<<<<<<<<<< * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOCAL_QUORUM); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_profile, __pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_7) < (0)) __PYX_ERR(0, 1778, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1777 * if session.cluster.metadata.dbaas: * for profile in self.profile_manager.profiles.values(): * if not profile._consistency_level_explicit: # <<<<<<<<<<<<<< * profile.consistency_level = ConsistencyLevel.LOCAL_QUORUM * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM */ } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1779 * if not profile._consistency_level_explicit: * profile.consistency_level = ConsistencyLevel.LOCAL_QUORUM * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM # <<<<<<<<<<<<<< * * def get_connection_holders(self): */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LOCAL_QUORUM); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_session, __pyx_mstate_global->__pyx_n_u_default_consistency_level, __pyx_t_7) < (0)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":1775 * * def _set_default_dbaas_consistency(self, session): * if session.cluster.metadata.dbaas: # <<<<<<<<<<<<<< * for profile in self.profile_manager.profiles.values(): * if not profile._consistency_level_explicit: */ } /* "cassandra/cluster.py":1774 * return session * * def _set_default_dbaas_consistency(self, session): # <<<<<<<<<<<<<< * if session.cluster.metadata.dbaas: * for profile in self.profile_manager.profiles.values(): */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster.Cluster._set_default_dbaas_consistency", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_profile); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1781 * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM * * def get_connection_holders(self): # <<<<<<<<<<<<<< * holders = [] * for s in tuple(self.sessions): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_59get_connection_holders(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_59get_connection_holders = {"get_connection_holders", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_59get_connection_holders, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_59get_connection_holders(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_connection_holders (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1781, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1781, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_connection_holders", 0) < (0)) __PYX_ERR(0, 1781, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_connection_holders", 1, 1, 1, i); __PYX_ERR(0, 1781, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1781, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_connection_holders", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1781, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.get_connection_holders", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_58get_connection_holders(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_58get_connection_holders(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_holders = NULL; PyObject *__pyx_v_s = 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 = NULL; size_t __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_connection_holders", 0); /* "cassandra/cluster.py":1782 * * def get_connection_holders(self): * holders = [] # <<<<<<<<<<<<<< * for s in tuple(self.sessions): * holders.extend(s.get_pools()) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_holders = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1783 * def get_connection_holders(self): * holders = [] * for s in tuple(self.sessions): # <<<<<<<<<<<<<< * holders.extend(s.get_pools()) * holders.append(self.control_connection) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1783, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); #endif ++__pyx_t_3; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1784 * holders = [] * for s in tuple(self.sessions): * holders.extend(s.get_pools()) # <<<<<<<<<<<<<< * holders.append(self.control_connection) * return holders */ __pyx_t_4 = __pyx_v_s; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_pools, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_6 = __Pyx_PyList_Extend(__pyx_v_holders, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1784, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1783 * def get_connection_holders(self): * holders = [] * for s in tuple(self.sessions): # <<<<<<<<<<<<<< * holders.extend(s.get_pools()) * holders.append(self.control_connection) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1785 * for s in tuple(self.sessions): * holders.extend(s.get_pools()) * holders.append(self.control_connection) # <<<<<<<<<<<<<< * return holders * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_holders, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1785, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1786 * holders.extend(s.get_pools()) * holders.append(self.control_connection) * return holders # <<<<<<<<<<<<<< * * def shutdown(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_holders); __pyx_r = __pyx_v_holders; goto __pyx_L0; /* "cassandra/cluster.py":1781 * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM * * def get_connection_holders(self): # <<<<<<<<<<<<<< * holders = [] * for s in tuple(self.sessions): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cassandra.cluster.Cluster.get_connection_holders", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_holders); __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1788 * return holders * * def shutdown(self): # <<<<<<<<<<<<<< * """ * Closes all sessions and connection associated with this Cluster. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_61shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_60shutdown, "\n Closes all sessions and connection associated with this Cluster.\n To ensure all connections are properly closed, **you should always\n call shutdown() on a Cluster instance when you are done with it**.\n\n Once shutdown, a Cluster should not be used for any purpose.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_61shutdown = {"shutdown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_61shutdown, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_60shutdown}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_61shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1788, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1788, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "shutdown", 0) < (0)) __PYX_ERR(0, 1788, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, i); __PYX_ERR(0, 1788, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1788, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1788, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_60shutdown(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_60shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_session = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shutdown", 0); /* "cassandra/cluster.py":1796 * Once shutdown, a Cluster should not be used for any purpose. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1796, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":1797 * """ * with self._lock: * if self.is_shutdown: # <<<<<<<<<<<<<< * return * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1797, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1797, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { /* "cassandra/cluster.py":1798 * with self._lock: * if self.is_shutdown: * return # <<<<<<<<<<<<<< * else: * self.is_shutdown = True */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; /* "cassandra/cluster.py":1797 * """ * with self._lock: * if self.is_shutdown: # <<<<<<<<<<<<<< * return * else: */ } /* "cassandra/cluster.py":1800 * return * else: * self.is_shutdown = True # <<<<<<<<<<<<<< * * if self._idle_heartbeat: */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown, Py_True) < (0)) __PYX_ERR(0, 1800, __pyx_L7_error) } /* "cassandra/cluster.py":1796 * Once shutdown, a Cluster should not be used for any purpose. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ } __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_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("cassandra.cluster.Cluster.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 1796, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1796, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1796, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10 < (0)) __PYX_ERR(0, 1796, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_10); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 1796, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L11_try_return:; __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_return; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_9 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L17; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":1802 * self.is_shutdown = True * * if self._idle_heartbeat: # <<<<<<<<<<<<<< * self._idle_heartbeat.stop() * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1802, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":1803 * * if self._idle_heartbeat: * self._idle_heartbeat.stop() # <<<<<<<<<<<<<< * * self.scheduler.shutdown() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_idle_heartbeat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_stop, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1802 * self.is_shutdown = True * * if self._idle_heartbeat: # <<<<<<<<<<<<<< * self._idle_heartbeat.stop() * */ } /* "cassandra/cluster.py":1805 * self._idle_heartbeat.stop() * * self.scheduler.shutdown() # <<<<<<<<<<<<<< * * self.control_connection.shutdown() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1807 * self.scheduler.shutdown() * * self.control_connection.shutdown() # <<<<<<<<<<<<<< * * for session in tuple(self.sessions): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1809 * self.control_connection.shutdown() * * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.shutdown() * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1809, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_13)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_13); #endif ++__pyx_t_13; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1810 * * for session in tuple(self.sessions): * session.shutdown() # <<<<<<<<<<<<<< * * self.executor.shutdown() */ __pyx_t_3 = __pyx_v_session; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1809 * self.control_connection.shutdown() * * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.shutdown() * */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1812 * session.shutdown() * * self.executor.shutdown() # <<<<<<<<<<<<<< * * _discard_cluster_shutdown(self) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_executor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1812, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1814 * self.executor.shutdown() * * _discard_cluster_shutdown(self) # <<<<<<<<<<<<<< * * def __enter__(self): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_discard_cluster_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_self}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1788 * return holders * * def shutdown(self): # <<<<<<<<<<<<<< * """ * Closes all sessions and connection associated with this Cluster. */ /* 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("cassandra.cluster.Cluster.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_session); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1816 * _discard_cluster_shutdown(self) * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_63__enter__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_63__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_63__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_63__enter__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1816, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1816, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__enter__", 0) < (0)) __PYX_ERR(0, 1816, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, i); __PYX_ERR(0, 1816, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1816, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1816, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_62__enter__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_62__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); /* "cassandra/cluster.py":1817 * * def __enter__(self): * return self # <<<<<<<<<<<<<< * * def __exit__(self, *args): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; /* "cassandra/cluster.py":1816 * _discard_cluster_shutdown(self) * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1819 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.shutdown() * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_65__exit__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_65__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_65__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_65__exit__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_args = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1819, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1819, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(0, 1819, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, i); __PYX_ERR(0, 1819, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1819, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 1819, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("cassandra.cluster.Cluster.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_64__exit__(__pyx_self, __pyx_v_self, __pyx_v_args); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_64__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); /* "cassandra/cluster.py":1820 * * def __exit__(self, *args): * self.shutdown() # <<<<<<<<<<<<<< * * def _new_session(self, keyspace): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1819 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.shutdown() * */ /* 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_AddTraceback("cassandra.cluster.Cluster.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1822 * self.shutdown() * * def _new_session(self, keyspace): # <<<<<<<<<<<<<< * session = Session(self, self.metadata.all_hosts(), keyspace) * self._session_register_user_types(session) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_67_new_session(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_67_new_session = {"_new_session", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_67_new_session, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_67_new_session(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_new_session (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1822, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1822, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1822, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_new_session", 0) < (0)) __PYX_ERR(0, 1822, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_new_session", 1, 2, 2, i); __PYX_ERR(0, 1822, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1822, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1822, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_new_session", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1822, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._new_session", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_66_new_session(__pyx_self, __pyx_v_self, __pyx_v_keyspace); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_66_new_session(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace) { PyObject *__pyx_v_session = 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; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_new_session", 0); /* "cassandra/cluster.py":1823 * * def _new_session(self, keyspace): * session = Session(self, self.metadata.all_hosts(), keyspace) # <<<<<<<<<<<<<< * self._session_register_user_types(session) * self.sessions.add(session) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_self, __pyx_t_4, __pyx_v_keyspace}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_session = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":1824 * def _new_session(self, keyspace): * session = Session(self, self.metadata.all_hosts(), keyspace) * self._session_register_user_types(session) # <<<<<<<<<<<<<< * self.sessions.add(session) * return session */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_session}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_session_register_user_types, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1825 * session = Session(self, self.metadata.all_hosts(), keyspace) * self._session_register_user_types(session) * self.sessions.add(session) # <<<<<<<<<<<<<< * return session * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_session}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1826 * self._session_register_user_types(session) * self.sessions.add(session) * return session # <<<<<<<<<<<<<< * * def _session_register_user_types(self, session): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_session); __pyx_r = __pyx_v_session; goto __pyx_L0; /* "cassandra/cluster.py":1822 * self.shutdown() * * def _new_session(self, keyspace): # <<<<<<<<<<<<<< * session = Session(self, self.metadata.all_hosts(), keyspace) * self._session_register_user_types(session) */ /* 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("cassandra.cluster.Cluster._new_session", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_session); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1828 * return session * * def _session_register_user_types(self, session): # <<<<<<<<<<<<<< * for keyspace, type_map in self._user_types.items(): * for udt_name, klass in type_map.items(): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_69_session_register_user_types(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_69_session_register_user_types = {"_session_register_user_types", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_69_session_register_user_types, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_69_session_register_user_types(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_session = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_session_register_user_types (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_session,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1828, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1828, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1828, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_session_register_user_types", 0) < (0)) __PYX_ERR(0, 1828, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_session_register_user_types", 1, 2, 2, i); __PYX_ERR(0, 1828, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1828, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1828, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_session = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_session_register_user_types", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1828, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._session_register_user_types", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_68_session_register_user_types(__pyx_self, __pyx_v_self, __pyx_v_session); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_68_session_register_user_types(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_session) { PyObject *__pyx_v_keyspace = NULL; PyObject *__pyx_v_type_map = NULL; PyObject *__pyx_v_udt_name = NULL; PyObject *__pyx_v_klass = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; size_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_session_register_user_types", 0); /* "cassandra/cluster.py":1829 * * def _session_register_user_types(self, session): * for keyspace, type_map in self._user_types.items(): # <<<<<<<<<<<<<< * for udt_name, klass in type_map.items(): * session.user_type_registered(keyspace, udt_name, klass) */ __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_user_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_t_5 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 1829, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_keyspace, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_type_map, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1830 * def _session_register_user_types(self, session): * for keyspace, type_map in self._user_types.items(): * for udt_name, klass in type_map.items(): # <<<<<<<<<<<<<< * session.user_type_registered(keyspace, udt_name, klass) * */ __pyx_t_8 = 0; if (unlikely(__pyx_v_type_map == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 1830, __pyx_L1_error) } __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_type_map, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_9), (&__pyx_t_7)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; while (1) { __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_9, &__pyx_t_8, &__pyx_t_6, &__pyx_t_10, NULL, __pyx_t_7); if (unlikely(__pyx_t_11 == 0)) break; if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_udt_name, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_klass, __pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":1831 * for keyspace, type_map in self._user_types.items(): * for udt_name, klass in type_map.items(): * session.user_type_registered(keyspace, udt_name, klass) # <<<<<<<<<<<<<< * * def _cleanup_failed_on_up_handling(self, host): */ __pyx_t_6 = __pyx_v_session; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_keyspace, __pyx_v_udt_name, __pyx_v_klass}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_user_type_registered, __pyx_callargs+__pyx_t_12, (4-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1828 * return session * * def _session_register_user_types(self, session): # <<<<<<<<<<<<<< * for keyspace, type_map in self._user_types.items(): * for udt_name, klass in type_map.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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("cassandra.cluster.Cluster._session_register_user_types", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_keyspace); __Pyx_XDECREF(__pyx_v_type_map); __Pyx_XDECREF(__pyx_v_udt_name); __Pyx_XDECREF(__pyx_v_klass); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1833 * session.user_type_registered(keyspace, udt_name, klass) * * def _cleanup_failed_on_up_handling(self, host): # <<<<<<<<<<<<<< * self.profile_manager.on_down(host) * self.control_connection.on_down(host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_71_cleanup_failed_on_up_handling(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_71_cleanup_failed_on_up_handling = {"_cleanup_failed_on_up_handling", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_71_cleanup_failed_on_up_handling, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_71_cleanup_failed_on_up_handling(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cleanup_failed_on_up_handling (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1833, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1833, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1833, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_cleanup_failed_on_up_handling", 0) < (0)) __PYX_ERR(0, 1833, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_cleanup_failed_on_up_handling", 1, 2, 2, i); __PYX_ERR(0, 1833, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1833, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1833, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_cleanup_failed_on_up_handling", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1833, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._cleanup_failed_on_up_handling", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_70_cleanup_failed_on_up_handling(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_70_cleanup_failed_on_up_handling(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_session = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_cleanup_failed_on_up_handling", 0); /* "cassandra/cluster.py":1834 * * def _cleanup_failed_on_up_handling(self, host): * self.profile_manager.on_down(host) # <<<<<<<<<<<<<< * self.control_connection.on_down(host) * for session in tuple(self.sessions): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1835 * def _cleanup_failed_on_up_handling(self, host): * self.profile_manager.on_down(host) * self.control_connection.on_down(host) # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * session.remove_pool(host) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1836 * self.profile_manager.on_down(host) * self.control_connection.on_down(host) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.remove_pool(host) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1836, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); #endif ++__pyx_t_5; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1837 * self.control_connection.on_down(host) * for session in tuple(self.sessions): * session.remove_pool(host) # <<<<<<<<<<<<<< * * self._start_reconnector(host, is_host_addition=False) */ __pyx_t_3 = __pyx_v_session; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_pool, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1836 * self.profile_manager.on_down(host) * self.control_connection.on_down(host) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.remove_pool(host) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1839 * session.remove_pool(host) * * self._start_reconnector(host, is_host_addition=False) # <<<<<<<<<<<<<< * * def _on_up_future_completed(self, host, futures, results, lock, finished_future): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_host}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_False, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1839, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_start_reconnector, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1833 * session.user_type_registered(keyspace, udt_name, klass) * * def _cleanup_failed_on_up_handling(self, host): # <<<<<<<<<<<<<< * self.profile_manager.on_down(host) * self.control_connection.on_down(host) */ /* 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("cassandra.cluster.Cluster._cleanup_failed_on_up_handling", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_session); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1841 * self._start_reconnector(host, is_host_addition=False) * * def _on_up_future_completed(self, host, futures, results, lock, finished_future): # <<<<<<<<<<<<<< * with lock: * futures.discard(finished_future) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_73_on_up_future_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_73_on_up_future_completed = {"_on_up_future_completed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_73_on_up_future_completed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_73_on_up_future_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_futures = 0; PyObject *__pyx_v_results = 0; PyObject *__pyx_v_lock = 0; PyObject *__pyx_v_finished_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_on_up_future_completed (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_futures,&__pyx_mstate_global->__pyx_n_u_results,&__pyx_mstate_global->__pyx_n_u_lock_2,&__pyx_mstate_global->__pyx_n_u_finished_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1841, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1841, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1841, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1841, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1841, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1841, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1841, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_on_up_future_completed", 0) < (0)) __PYX_ERR(0, 1841, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_on_up_future_completed", 1, 6, 6, i); __PYX_ERR(0, 1841, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 6)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1841, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1841, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1841, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1841, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 1841, __pyx_L3_error) values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 1841, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_futures = values[2]; __pyx_v_results = values[3]; __pyx_v_lock = values[4]; __pyx_v_finished_future = values[5]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_on_up_future_completed", 1, 6, 6, __pyx_nargs); __PYX_ERR(0, 1841, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_72_on_up_future_completed(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_futures, __pyx_v_results, __pyx_v_lock, __pyx_v_finished_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_72_on_up_future_completed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_futures, PyObject *__pyx_v_results, PyObject *__pyx_v_lock, PyObject *__pyx_v_finished_future) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_v_listener = NULL; PyObject *__pyx_v_session = NULL; PyObject *__pyx_9genexpr11__pyx_v_f = 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; size_t __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; int __pyx_t_12; int __pyx_t_13; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; int __pyx_t_22; PyObject *__pyx_t_23 = NULL; int __pyx_t_24; Py_ssize_t __pyx_t_25; PyObject *(*__pyx_t_26)(PyObject *); PyObject *__pyx_t_27 = NULL; char const *__pyx_t_28; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_on_up_future_completed", 0); /* "cassandra/cluster.py":1842 * * def _on_up_future_completed(self, host, futures, results, lock, finished_future): * with lock: # <<<<<<<<<<<<<< * futures.discard(finished_future) * */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_v_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_v_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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:*/ { /* "cassandra/cluster.py":1843 * def _on_up_future_completed(self, host, futures, results, lock, finished_future): * with lock: * futures.discard(finished_future) # <<<<<<<<<<<<<< * * try: */ __pyx_t_4 = __pyx_v_futures; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_finished_future}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_discard, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1843, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1845 * futures.discard(finished_future) * * try: # <<<<<<<<<<<<<< * results.append(finished_future.result()) * except Exception as exc: */ { __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:*/ { /* "cassandra/cluster.py":1846 * * try: * results.append(finished_future.result()) # <<<<<<<<<<<<<< * except Exception as exc: * results.append(exc) */ __pyx_t_4 = __pyx_v_finished_future; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_results, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1846, __pyx_L13_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1845 * futures.discard(finished_future) * * try: # <<<<<<<<<<<<<< * results.append(finished_future.result()) * except Exception as exc: */ } __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_L18_try_end; __pyx_L13_error:; __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; /* "cassandra/cluster.py":1847 * try: * results.append(finished_future.result()) * except Exception as exc: # <<<<<<<<<<<<<< * results.append(exc) * */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_13) { __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1847, __pyx_L15_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":1848 * results.append(finished_future.result()) * except Exception as exc: * results.append(exc) # <<<<<<<<<<<<<< * * if futures: */ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_results, __pyx_v_exc); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1848, __pyx_L24_error) } /* "cassandra/cluster.py":1847 * try: * results.append(finished_future.result()) * except Exception as exc: # <<<<<<<<<<<<<< * results.append(exc) * */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L25; } __pyx_L24_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L15_except_error; } __pyx_L25:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L14_exception_handled; } goto __pyx_L15_except_error; /* "cassandra/cluster.py":1845 * futures.discard(finished_future) * * try: # <<<<<<<<<<<<<< * results.append(finished_future.result()) * except Exception as exc: */ __pyx_L15_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_L7_error; __pyx_L14_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_L18_try_end:; } /* "cassandra/cluster.py":1850 * results.append(exc) * * if futures: # <<<<<<<<<<<<<< * return * */ __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_v_futures); if (unlikely((__pyx_t_22 < 0))) __PYX_ERR(0, 1850, __pyx_L7_error) if (__pyx_t_22) { /* "cassandra/cluster.py":1851 * * if futures: * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; /* "cassandra/cluster.py":1850 * results.append(exc) * * if futures: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":1842 * * def _on_up_future_completed(self, host, futures, results, lock, finished_future): * with lock: # <<<<<<<<<<<<<< * futures.discard(finished_future) * */ } __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_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1842, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __pyx_t_23 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1842, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_23, NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1842, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_22 < (0)) __PYX_ERR(0, 1842, __pyx_L9_except_error) __pyx_t_24 = (!__pyx_t_22); if (unlikely(__pyx_t_24)) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_4, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1842, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_L11_try_return:; __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_L4_return; __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_1) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1842, __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_1) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1842, __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_L34; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L1_error; __pyx_L34:; } /* "cassandra/cluster.py":1853 * return * * try: # <<<<<<<<<<<<<< * # all futures have completed at this point * for exc in [f for f in results if isinstance(f, Exception)]: */ /*try:*/ { /* "cassandra/cluster.py":1855 * try: * # all futures have completed at this point * for exc in [f for f in results if isinstance(f, Exception)]: # <<<<<<<<<<<<<< * log.error("Unexpected failure while marking node %s up:", host, exc_info=exc) * self._cleanup_failed_on_up_handling(host) */ { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_results)) || PyTuple_CheckExact(__pyx_v_results)) { __pyx_t_4 = __pyx_v_results; __Pyx_INCREF(__pyx_t_4); __pyx_t_25 = 0; __pyx_t_26 = NULL; } else { __pyx_t_25 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_results); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1855, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_26 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1855, __pyx_L42_error) } for (;;) { if (likely(!__pyx_t_26)) { if (likely(PyList_CheckExact(__pyx_t_4))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1855, __pyx_L42_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } __pyx_t_3 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_25, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_25; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1855, __pyx_L42_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_25)); #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_25); #endif ++__pyx_t_25; } if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L42_error) } else { __pyx_t_3 = __pyx_t_26(__pyx_t_4); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1855, __pyx_L42_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_f, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_24 = __Pyx_PyException_Check(__pyx_9genexpr11__pyx_v_f); if (__pyx_t_24) { if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr11__pyx_v_f))) __PYX_ERR(0, 1855, __pyx_L42_error) } } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_f); __pyx_9genexpr11__pyx_v_f = 0; goto __pyx_L47_exit_scope; __pyx_L42_error:; __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_f); __pyx_9genexpr11__pyx_v_f = 0; goto __pyx_L36_error; __pyx_L47_exit_scope:; } /* exit inner scope */ __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1855, __pyx_L36_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_25, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_25; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_exc, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1856 * # all futures have completed at this point * for exc in [f for f in results if isinstance(f, Exception)]: * log.error("Unexpected failure while marking node %s up:", host, exc_info=exc) # <<<<<<<<<<<<<< * self._cleanup_failed_on_up_handling(host) * return */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1856, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1856, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_27))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_27); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_27); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_27, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unexpected_failure_while_marking, __pyx_v_host}; __pyx_t_23 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1856, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_23); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, __pyx_v_exc, __pyx_t_23, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 1856, __pyx_L36_error) __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_27, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_23); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1857 * for exc in [f for f in results if isinstance(f, Exception)]: * log.error("Unexpected failure while marking node %s up:", host, exc_info=exc) * self._cleanup_failed_on_up_handling(host) # <<<<<<<<<<<<<< * return * */ __pyx_t_27 = __pyx_v_self; __Pyx_INCREF(__pyx_t_27); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_27, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cleanup_failed_on_up_handling, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":1858 * log.error("Unexpected failure while marking node %s up:", host, exc_info=exc) * self._cleanup_failed_on_up_handling(host) * return # <<<<<<<<<<<<<< * * if not all(results): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L35_return; /* "cassandra/cluster.py":1855 * try: * # all futures have completed at this point * for exc in [f for f in results if isinstance(f, Exception)]: # <<<<<<<<<<<<<< * log.error("Unexpected failure while marking node %s up:", host, exc_info=exc) * self._cleanup_failed_on_up_handling(host) */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1860 * return * * if not all(results): # <<<<<<<<<<<<<< * log.debug("Connection pool could not be created, not marking node %s up", host) * self._cleanup_failed_on_up_handling(host) */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_results}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_all, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 1860, __pyx_L36_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_22 = (!__pyx_t_24); if (__pyx_t_22) { /* "cassandra/cluster.py":1861 * * if not all(results): * log.debug("Connection pool could not be created, not marking node %s up", host) # <<<<<<<<<<<<<< * self._cleanup_failed_on_up_handling(host) * return */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1861, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1861, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_23))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_23); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_23); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_23, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Connection_pool_could_not_be_cre, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_23, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1861, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1862 * if not all(results): * log.debug("Connection pool could not be created, not marking node %s up", host) * self._cleanup_failed_on_up_handling(host) # <<<<<<<<<<<<<< * return * */ __pyx_t_23 = __pyx_v_self; __Pyx_INCREF(__pyx_t_23); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cleanup_failed_on_up_handling, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1863 * log.debug("Connection pool could not be created, not marking node %s up", host) * self._cleanup_failed_on_up_handling(host) * return # <<<<<<<<<<<<<< * * log.info("Connection pools established for node %s", host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L35_return; /* "cassandra/cluster.py":1860 * return * * if not all(results): # <<<<<<<<<<<<<< * log.debug("Connection pool could not be created, not marking node %s up", host) * self._cleanup_failed_on_up_handling(host) */ } /* "cassandra/cluster.py":1865 * return * * log.info("Connection pools established for node %s", host) # <<<<<<<<<<<<<< * # mark the host as up and notify all listeners * host.set_up() */ __pyx_t_23 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1865, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_27); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_27))) { __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_27); assert(__pyx_t_23); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_27); __Pyx_INCREF(__pyx_t_23); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_27, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_23, __pyx_mstate_global->__pyx_kp_u_Connection_pools_established_for, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_27, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1865, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1867 * log.info("Connection pools established for node %s", host) * # mark the host as up and notify all listeners * host.set_up() # <<<<<<<<<<<<<< * for listener in self.listeners: * listener.on_up(host) */ __pyx_t_27 = __pyx_v_host; __Pyx_INCREF(__pyx_t_27); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_27, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_up, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1867, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1868 * # mark the host as up and notify all listeners * host.set_up() * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_up(host) * finally: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1868, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_27 = __pyx_t_4; __Pyx_INCREF(__pyx_t_27); __pyx_t_25 = 0; __pyx_t_26 = NULL; } else { __pyx_t_25 = -1; __pyx_t_27 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1868, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_26 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_27); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1868, __pyx_L36_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { if (likely(!__pyx_t_26)) { if (likely(PyList_CheckExact(__pyx_t_27))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_27); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1868, __pyx_L36_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_27, __pyx_t_25, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_25; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_27); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1868, __pyx_L36_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_27, __pyx_t_25)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_27, __pyx_t_25); #endif ++__pyx_t_25; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1868, __pyx_L36_error) } else { __pyx_t_4 = __pyx_t_26(__pyx_t_27); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 1868, __pyx_L36_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_listener, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1869 * host.set_up() * for listener in self.listeners: * listener.on_up(host) # <<<<<<<<<<<<<< * finally: * with host.lock: */ __pyx_t_23 = __pyx_v_listener; __Pyx_INCREF(__pyx_t_23); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_23, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_up, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1869, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1868 * # mark the host as up and notify all listeners * host.set_up() * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_up(host) * finally: */ } __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; } /* "cassandra/cluster.py":1871 * listener.on_up(host) * finally: * with host.lock: # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * */ /*finally:*/ { /*normal exit:*/{ /*with:*/ { __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_23 = NULL; __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_23); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_23); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_23, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":1872 * finally: * with host.lock: * host._currently_handling_node_up = False # <<<<<<<<<<<<<< * * # see if there are any pools to add or remove now that the host is marked up */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up, Py_False) < (0)) __PYX_ERR(0, 1872, __pyx_L57_error) /* "cassandra/cluster.py":1871 * listener.on_up(host) * finally: * with host.lock: # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L62_try_end; __pyx_L57_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_27, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1871, __pyx_L59_except_error) __Pyx_XGOTREF(__pyx_t_27); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __pyx_t_23 = PyTuple_Pack(3, __pyx_t_27, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1871, __pyx_L59_except_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_23, NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1871, __pyx_L59_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_22 < (0)) __PYX_ERR(0, 1871, __pyx_L59_except_error) __pyx_t_24 = (!__pyx_t_22); if (unlikely(__pyx_t_24)) { __Pyx_GIVEREF(__pyx_t_27); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_27, __pyx_t_4, __pyx_t_2); __pyx_t_27 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 1871, __pyx_L59_except_error) } __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L58_exception_handled; } __pyx_L59_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); goto __pyx_L1_error; __pyx_L58_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); __pyx_L62_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_1) { __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L56; } __pyx_L56:; } goto __pyx_L66; __pyx_L53_error:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L1_error; __pyx_L66:; } goto __pyx_L37; } __pyx_L36_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_11, &__pyx_t_10); if ( unlikely(__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __pyx_t_14 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_28 = __pyx_filename; { /*with:*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1871, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_27 = NULL; __pyx_t_23 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1871, __pyx_L69_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_23))) { __pyx_t_27 = PyMethod_GET_SELF(__pyx_t_23); assert(__pyx_t_27); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_23); __Pyx_INCREF(__pyx_t_27); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_23, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_27, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_23, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L69_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { /* "cassandra/cluster.py":1872 * finally: * with host.lock: * host._currently_handling_node_up = False # <<<<<<<<<<<<<< * * # see if there are any pools to add or remove now that the host is marked up */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up, Py_False) < (0)) __PYX_ERR(0, 1872, __pyx_L73_error) /* "cassandra/cluster.py":1871 * listener.on_up(host) * finally: * with host.lock: # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * */ } __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L78_try_end; __pyx_L73_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_23) < 0) __PYX_ERR(0, 1871, __pyx_L75_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_23); __pyx_t_27 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_23); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1871, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_27, NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1871, __pyx_L75_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_24 < (0)) __PYX_ERR(0, 1871, __pyx_L75_except_error) __pyx_t_22 = (!__pyx_t_24); if (unlikely(__pyx_t_22)) { __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_23); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_23 = 0; __PYX_ERR(0, 1871, __pyx_L75_except_error) } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; goto __pyx_L74_exception_handled; } __pyx_L75_except_error:; __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); goto __pyx_L68_error; __pyx_L74_exception_handled:; __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); __pyx_L78_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_9) { __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1871, __pyx_L68_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; } goto __pyx_L72; } __pyx_L72:; } goto __pyx_L82; __pyx_L69_error:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L68_error; __pyx_L82:; } } __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_11, __pyx_t_10); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestore(__pyx_t_1, __pyx_t_6, __pyx_t_7); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_28; goto __pyx_L1_error; __pyx_L68_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_11, __pyx_t_10); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; goto __pyx_L1_error; } __pyx_L35_return: { __pyx_t_10 = __pyx_r; __pyx_r = 0; /*with:*/ { __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = NULL; __pyx_t_27 = __Pyx_PyObject_LookupSpecial(__pyx_t_23, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1871, __pyx_L83_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_27))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_27); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_27); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_27, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_27, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L83_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":1872 * finally: * with host.lock: * host._currently_handling_node_up = False # <<<<<<<<<<<<<< * * # see if there are any pools to add or remove now that the host is marked up */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up, Py_False) < (0)) __PYX_ERR(0, 1872, __pyx_L87_error) /* "cassandra/cluster.py":1871 * listener.on_up(host) * finally: * with host.lock: # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L92_try_end; __pyx_L87_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_23, &__pyx_t_4, &__pyx_t_27) < 0) __PYX_ERR(0, 1871, __pyx_L89_except_error) __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_27); __pyx_t_2 = PyTuple_Pack(3, __pyx_t_23, __pyx_t_4, __pyx_t_27); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L89_except_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L89_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_22 < (0)) __PYX_ERR(0, 1871, __pyx_L89_except_error) __pyx_t_24 = (!__pyx_t_22); if (unlikely(__pyx_t_24)) { __Pyx_GIVEREF(__pyx_t_23); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_27); __Pyx_ErrRestoreWithState(__pyx_t_23, __pyx_t_4, __pyx_t_27); __pyx_t_23 = 0; __pyx_t_4 = 0; __pyx_t_27 = 0; __PYX_ERR(0, 1871, __pyx_L89_except_error) } __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; goto __pyx_L88_exception_handled; } __pyx_L89_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); goto __pyx_L1_error; __pyx_L88_exception_handled:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); __pyx_L92_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_11) { __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L86; } __pyx_L86:; } goto __pyx_L96; __pyx_L83_error:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L1_error; __pyx_L96:; } __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; } __pyx_L37:; } /* "cassandra/cluster.py":1875 * * # see if there are any pools to add or remove now that the host is marked up * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.update_created_pools() * */ __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 1875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_27); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; __pyx_t_27 = __pyx_t_4; __Pyx_INCREF(__pyx_t_27); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_27); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1875, __pyx_L1_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_27, __pyx_t_25)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_27, __pyx_t_25); #endif ++__pyx_t_25; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1876 * # see if there are any pools to add or remove now that the host is marked up * for session in tuple(self.sessions): * session.update_created_pools() # <<<<<<<<<<<<<< * * def on_up(self, host): */ __pyx_t_23 = __pyx_v_session; __Pyx_INCREF(__pyx_t_23); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_23, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_created_pools, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1875 * * # see if there are any pools to add or remove now that the host is marked up * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.update_created_pools() * */ } __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; /* "cassandra/cluster.py":1841 * self._start_reconnector(host, is_host_addition=False) * * def _on_up_future_completed(self, host, futures, results, lock, finished_future): # <<<<<<<<<<<<<< * with lock: * futures.discard(finished_future) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_27); __Pyx_AddTraceback("cassandra.cluster.Cluster._on_up_future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_listener); __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1878 * session.update_created_pools() * * def on_up(self, host): # <<<<<<<<<<<<<< * """ * Intended for internal use only. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_75on_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_74on_up, "\n Intended for internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_75on_up = {"on_up", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_75on_up, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_74on_up}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_75on_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_up (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1878, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1878, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1878, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_up", 0) < (0)) __PYX_ERR(0, 1878, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_up", 1, 2, 2, i); __PYX_ERR(0, 1878, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1878, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1878, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_up", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1878, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_74on_up(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_74on_up(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { int __pyx_v_have_future; PyObject *__pyx_v_futures = NULL; PyObject *__pyx_v_reconnector = NULL; PyObject *__pyx_v_session = NULL; PyObject *__pyx_v_futures_lock = NULL; PyObject *__pyx_v_futures_results = NULL; PyObject *__pyx_v_callback = NULL; PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __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; Py_ssize_t __pyx_t_13; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; int __pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; Py_ssize_t __pyx_t_22; int __pyx_t_23; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_up", 0); /* "cassandra/cluster.py":1882 * Intended for internal use only. * """ * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __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(0, 1882, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":1883 * """ * if self.is_shutdown: * return # <<<<<<<<<<<<<< * * log.debug("Waiting to acquire lock for handling up status of node %s", host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":1882 * Intended for internal use only. * """ * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":1885 * return * * log.debug("Waiting to acquire lock for handling up status of node %s", host) # <<<<<<<<<<<<<< * with host.lock: * if host._currently_handling_node_up: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Waiting_to_acquire_lock_for_hand, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1886 * * log.debug("Waiting to acquire lock for handling up status of node %s", host) * with host.lock: # <<<<<<<<<<<<<< * if host._currently_handling_node_up: * log.debug("Another thread is already handling up status of node %s", host) */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = NULL; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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:*/ { /* "cassandra/cluster.py":1887 * log.debug("Waiting to acquire lock for handling up status of node %s", host) * with host.lock: * if host._currently_handling_node_up: # <<<<<<<<<<<<<< * log.debug("Another thread is already handling up status of node %s", host) * return */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1887, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":1888 * with host.lock: * if host._currently_handling_node_up: * log.debug("Another thread is already handling up status of node %s", host) # <<<<<<<<<<<<<< * return * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1888, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Another_thread_is_already_handli, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1889 * if host._currently_handling_node_up: * log.debug("Another thread is already handling up status of node %s", host) * return # <<<<<<<<<<<<<< * * if host.is_up: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L12_try_return; /* "cassandra/cluster.py":1887 * log.debug("Waiting to acquire lock for handling up status of node %s", host) * with host.lock: * if host._currently_handling_node_up: # <<<<<<<<<<<<<< * log.debug("Another thread is already handling up status of node %s", host) * return */ } /* "cassandra/cluster.py":1891 * return * * if host.is_up: # <<<<<<<<<<<<<< * log.debug("Host %s was already marked up", host) * return */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1891, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":1892 * * if host.is_up: * log.debug("Host %s was already marked up", host) # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Host_s_was_already_marked_up, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1892, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1893 * if host.is_up: * log.debug("Host %s was already marked up", host) * return # <<<<<<<<<<<<<< * * host._currently_handling_node_up = True */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L12_try_return; /* "cassandra/cluster.py":1891 * return * * if host.is_up: # <<<<<<<<<<<<<< * log.debug("Host %s was already marked up", host) * return */ } /* "cassandra/cluster.py":1895 * return * * host._currently_handling_node_up = True # <<<<<<<<<<<<<< * log.debug("Starting to handle up status of node %s", host) * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up, Py_True) < (0)) __PYX_ERR(0, 1895, __pyx_L8_error) /* "cassandra/cluster.py":1886 * * log.debug("Waiting to acquire lock for handling up status of node %s", host) * with host.lock: # <<<<<<<<<<<<<< * if host._currently_handling_node_up: * log.debug("Another thread is already handling up status of node %s", host) */ } __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_L13_try_end; __pyx_L8_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("cassandra.cluster.Cluster.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 1886, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1886, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_2 < (0)) __PYX_ERR(0, 1886, __pyx_L10_except_error) __pyx_t_12 = (!__pyx_t_2); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_4, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 1886, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_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_L12_try_return:; __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_L5_return; __pyx_L9_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_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_7) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L7; } __pyx_L5_return: { __pyx_t_10 = __pyx_r; __pyx_r = 0; if (__pyx_t_7) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; } __pyx_L7:; } goto __pyx_L19; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L1_error; __pyx_L19:; } /* "cassandra/cluster.py":1896 * * host._currently_handling_node_up = True * log.debug("Starting to handle up status of node %s", host) # <<<<<<<<<<<<<< * * have_future = False */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Starting_to_handle_up_status_of, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1898 * log.debug("Starting to handle up status of node %s", host) * * have_future = False # <<<<<<<<<<<<<< * futures = set() * try: */ __pyx_v_have_future = 0; /* "cassandra/cluster.py":1899 * * have_future = False * futures = set() # <<<<<<<<<<<<<< * try: * log.info("Host %s may be up; will prepare queries and open connection pool", host) */ __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_futures = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1900 * have_future = False * futures = set() * try: # <<<<<<<<<<<<<< * log.info("Host %s may be up; will prepare queries and open connection pool", host) * */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":1901 * futures = set() * try: * log.info("Host %s may be up; will prepare queries and open connection pool", host) # <<<<<<<<<<<<<< * * reconnector = host.get_and_set_reconnection_handler(None) */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Host_s_may_be_up_will_prepare_qu, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1903 * log.info("Host %s may be up; will prepare queries and open connection pool", host) * * reconnector = host.get_and_set_reconnection_handler(None) # <<<<<<<<<<<<<< * if reconnector: * log.debug("Now that host %s is up, cancelling the reconnection handler", host) */ __pyx_t_1 = __pyx_v_host; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, Py_None}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_and_set_reconnection_handler, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1903, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_reconnector = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":1904 * * reconnector = host.get_and_set_reconnection_handler(None) * if reconnector: # <<<<<<<<<<<<<< * log.debug("Now that host %s is up, cancelling the reconnection handler", host) * reconnector.cancel() */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_reconnector); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1904, __pyx_L20_error) if (__pyx_t_12) { /* "cassandra/cluster.py":1905 * reconnector = host.get_and_set_reconnection_handler(None) * if reconnector: * log.debug("Now that host %s is up, cancelling the reconnection handler", host) # <<<<<<<<<<<<<< * reconnector.cancel() * */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1905, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1905, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Now_that_host_s_is_up_cancelling, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1905, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1906 * if reconnector: * log.debug("Now that host %s is up, cancelling the reconnection handler", host) * reconnector.cancel() # <<<<<<<<<<<<<< * * if self.profile_manager.distance(host) != HostDistance.IGNORED: */ __pyx_t_4 = __pyx_v_reconnector; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1904 * * reconnector = host.get_and_set_reconnection_handler(None) * if reconnector: # <<<<<<<<<<<<<< * log.debug("Now that host %s is up, cancelling the reconnection handler", host) * reconnector.cancel() */ } /* "cassandra/cluster.py":1908 * reconnector.cancel() * * if self.profile_manager.distance(host) != HostDistance.IGNORED: # <<<<<<<<<<<<<< * self._prepare_all_queries(host) * log.debug("Done preparing all queries for host %s, ", host) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1908, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1908, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1908, __pyx_L20_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1908, __pyx_L20_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":1909 * * if self.profile_manager.distance(host) != HostDistance.IGNORED: * self._prepare_all_queries(host) # <<<<<<<<<<<<<< * log.debug("Done preparing all queries for host %s, ", host) * */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_prepare_all_queries, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1909, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1910 * if self.profile_manager.distance(host) != HostDistance.IGNORED: * self._prepare_all_queries(host) * log.debug("Done preparing all queries for host %s, ", host) # <<<<<<<<<<<<<< * * for session in tuple(self.sessions): */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1910, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Done_preparing_all_queries_for_h, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1908 * reconnector.cancel() * * if self.profile_manager.distance(host) != HostDistance.IGNORED: # <<<<<<<<<<<<<< * self._prepare_all_queries(host) * log.debug("Done preparing all queries for host %s, ", host) */ } /* "cassandra/cluster.py":1912 * log.debug("Done preparing all queries for host %s, ", host) * * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.remove_pool(host) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1912, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1912, __pyx_L20_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); #endif ++__pyx_t_13; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1912, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1913 * * for session in tuple(self.sessions): * session.remove_pool(host) # <<<<<<<<<<<<<< * * log.debug("Signalling to load balancing policies that host %s is up", host) */ __pyx_t_4 = __pyx_v_session; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_pool, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1913, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1912 * log.debug("Done preparing all queries for host %s, ", host) * * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.remove_pool(host) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1915 * session.remove_pool(host) * * log.debug("Signalling to load balancing policies that host %s is up", host) # <<<<<<<<<<<<<< * self.profile_manager.on_up(host) * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Signalling_to_load_balancing_pol, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1916 * * log.debug("Signalling to load balancing policies that host %s is up", host) * self.profile_manager.on_up(host) # <<<<<<<<<<<<<< * * log.debug("Signalling to control connection that host %s is up", host) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1916, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_up, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1918 * self.profile_manager.on_up(host) * * log.debug("Signalling to control connection that host %s is up", host) # <<<<<<<<<<<<<< * self.control_connection.on_up(host) * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1918, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1918, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Signalling_to_control_connection, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1918, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1919 * * log.debug("Signalling to control connection that host %s is up", host) * self.control_connection.on_up(host) # <<<<<<<<<<<<<< * * log.debug("Attempting to open new connection pools for host %s", host) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1919, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_up, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1921 * self.control_connection.on_up(host) * * log.debug("Attempting to open new connection pools for host %s", host) # <<<<<<<<<<<<<< * futures_lock = Lock() * futures_results = [] */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1921, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1921, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Attempting_to_open_new_connectio, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1922 * * log.debug("Attempting to open new connection pools for host %s", host) * futures_lock = Lock() # <<<<<<<<<<<<<< * futures_results = [] * callback = partial(self._on_up_future_completed, host, futures, futures_results, futures_lock) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1922, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_futures_lock = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":1923 * log.debug("Attempting to open new connection pools for host %s", host) * futures_lock = Lock() * futures_results = [] # <<<<<<<<<<<<<< * callback = partial(self._on_up_future_completed, host, futures, futures_results, futures_lock) * for session in tuple(self.sessions): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_futures_results = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1924 * futures_lock = Lock() * futures_results = [] * callback = partial(self._on_up_future_completed, host, futures, futures_results, futures_lock) # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=False) */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_up_future_completed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_t_4, __pyx_v_host, __pyx_v_futures, __pyx_v_futures_results, __pyx_v_futures_lock}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_callback = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":1925 * futures_results = [] * callback = partial(self._on_up_future_completed, host, futures, futures_results, futures_lock) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * future = session.add_or_renew_pool(host, is_host_addition=False) * if future is not None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1925, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1925, __pyx_L20_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13)); #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); #endif ++__pyx_t_13; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1925, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1926 * callback = partial(self._on_up_future_completed, host, futures, futures_results, futures_lock) * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=False) # <<<<<<<<<<<<<< * if future is not None: * have_future = True */ __pyx_t_4 = __pyx_v_session; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_host}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1926, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_False, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 1926, __pyx_L20_error) __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_add_or_renew_pool, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1927 * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=False) * if future is not None: # <<<<<<<<<<<<<< * have_future = True * future.add_done_callback(callback) */ __pyx_t_12 = (__pyx_v_future != Py_None); if (__pyx_t_12) { /* "cassandra/cluster.py":1928 * future = session.add_or_renew_pool(host, is_host_addition=False) * if future is not None: * have_future = True # <<<<<<<<<<<<<< * future.add_done_callback(callback) * futures.add(future) */ __pyx_v_have_future = 1; /* "cassandra/cluster.py":1929 * if future is not None: * have_future = True * future.add_done_callback(callback) # <<<<<<<<<<<<<< * futures.add(future) * except Exception: */ __pyx_t_5 = __pyx_v_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_callback}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_done_callback, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1930 * have_future = True * future.add_done_callback(callback) * futures.add(future) # <<<<<<<<<<<<<< * except Exception: * log.exception("Unexpected failure handling node %s being marked up:", host) */ __pyx_t_14 = PySet_Add(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1930, __pyx_L20_error) /* "cassandra/cluster.py":1927 * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=False) * if future is not None: # <<<<<<<<<<<<<< * have_future = True * future.add_done_callback(callback) */ } /* "cassandra/cluster.py":1925 * futures_results = [] * callback = partial(self._on_up_future_completed, host, futures, futures_results, futures_lock) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * future = session.add_or_renew_pool(host, is_host_addition=False) * if future is not None: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1900 * have_future = False * futures = set() * try: # <<<<<<<<<<<<<< * log.info("Host %s may be up; will prepare queries and open connection pool", host) * */ } /* "cassandra/cluster.py":1942 * raise * else: * if not have_future: # <<<<<<<<<<<<<< * with host.lock: * host.set_up() */ /*else:*/ { __pyx_t_12 = (!__pyx_v_have_future); if (__pyx_t_12) { /* "cassandra/cluster.py":1943 * else: * if not have_future: * with host.lock: # <<<<<<<<<<<<<< * host.set_up() * host._currently_handling_node_up = False */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1943, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = NULL; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1943, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 1943, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_3); } __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_11, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { /* "cassandra/cluster.py":1944 * if not have_future: * with host.lock: * host.set_up() # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * */ __pyx_t_3 = __pyx_v_host; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_up, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L40_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":1945 * with host.lock: * host.set_up() * host._currently_handling_node_up = False # <<<<<<<<<<<<<< * * # for testing purposes */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up, Py_False) < (0)) __PYX_ERR(0, 1945, __pyx_L40_error) /* "cassandra/cluster.py":1943 * else: * if not have_future: * with host.lock: # <<<<<<<<<<<<<< * host.set_up() * host._currently_handling_node_up = False */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L45_try_end; __pyx_L40_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("cassandra.cluster.Cluster.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(0, 1943, __pyx_L42_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__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(0, 1943, __pyx_L42_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1943, __pyx_L42_except_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_17); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_12 < (0)) __PYX_ERR(0, 1943, __pyx_L42_except_error) __pyx_t_2 = (!__pyx_t_12); if (unlikely(__pyx_t_2)) { __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(0, 1943, __pyx_L42_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_L41_exception_handled; } __pyx_L42_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_15, __pyx_t_16); goto __pyx_L22_except_error; __pyx_L41_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_15, __pyx_t_16); __pyx_L45_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_8) { __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1943, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } goto __pyx_L39; } __pyx_L39:; } goto __pyx_L49; __pyx_L36_error:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L22_except_error; __pyx_L49:; } /* "cassandra/cluster.py":1942 * raise * else: * if not have_future: # <<<<<<<<<<<<<< * with host.lock: * host.set_up() */ } } __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_try_end; __pyx_L20_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; /* "cassandra/cluster.py":1931 * future.add_done_callback(callback) * futures.add(future) * except Exception: # <<<<<<<<<<<<<< * log.exception("Unexpected failure handling node %s being marked up:", host) * for future in futures: */ __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_18) { __Pyx_AddTraceback("cassandra.cluster.Cluster.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 1931, __pyx_L22_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); /* "cassandra/cluster.py":1932 * futures.add(future) * except Exception: * log.exception("Unexpected failure handling node %s being marked up:", host) # <<<<<<<<<<<<<< * for future in futures: * future.cancel() */ __pyx_t_19 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1932, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1932, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_21))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_21); assert(__pyx_t_19); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_21, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_19, __pyx_mstate_global->__pyx_kp_u_Unexpected_failure_handling_node, __pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1932, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1933 * except Exception: * log.exception("Unexpected failure handling node %s being marked up:", host) * for future in futures: # <<<<<<<<<<<<<< * future.cancel() * */ __pyx_t_13 = 0; __pyx_t_21 = __Pyx_set_iterator(__pyx_v_futures, 1, (&__pyx_t_22), (&__pyx_t_18)); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1933, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_21; __pyx_t_21 = 0; while (1) { __pyx_t_23 = __Pyx_set_iter_next(__pyx_t_5, __pyx_t_22, &__pyx_t_13, &__pyx_t_21, __pyx_t_18); if (unlikely(__pyx_t_23 == 0)) break; if (unlikely(__pyx_t_23 == -1)) __PYX_ERR(0, 1933, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_21); __pyx_t_21 = 0; /* "cassandra/cluster.py":1934 * log.exception("Unexpected failure handling node %s being marked up:", host) * for future in futures: * future.cancel() # <<<<<<<<<<<<<< * * self._cleanup_failed_on_up_handling(host) */ __pyx_t_19 = __pyx_v_future; __Pyx_INCREF(__pyx_t_19); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_19, NULL}; __pyx_t_21 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1934, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_21); } __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1936 * future.cancel() * * self._cleanup_failed_on_up_handling(host) # <<<<<<<<<<<<<< * * with host.lock: */ __pyx_t_21 = __pyx_v_self; __Pyx_INCREF(__pyx_t_21); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_21, __pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cleanup_failed_on_up_handling, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1936, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1938 * self._cleanup_failed_on_up_handling(host) * * with host.lock: # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * raise */ /*with:*/ { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1938, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1938, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_19 = NULL; __pyx_t_20 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1938, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_20))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_20); assert(__pyx_t_19); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_20); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_20, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_19, NULL}; __pyx_t_21 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_20, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1938, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_21); } __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_11); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { /* "cassandra/cluster.py":1939 * * with host.lock: * host._currently_handling_node_up = False # <<<<<<<<<<<<<< * raise * else: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_currently_handling_node_up, Py_False) < (0)) __PYX_ERR(0, 1939, __pyx_L60_error) /* "cassandra/cluster.py":1938 * self._cleanup_failed_on_up_handling(host) * * with host.lock: # <<<<<<<<<<<<<< * host._currently_handling_node_up = False * raise */ } __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L67_try_end; __pyx_L60_error:; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_21, &__pyx_t_20) < 0) __PYX_ERR(0, 1938, __pyx_L62_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __pyx_t_19 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_21, __pyx_t_20); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1938, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_19, NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1938, __pyx_L62_except_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_17); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_2 < (0)) __PYX_ERR(0, 1938, __pyx_L62_except_error) __pyx_t_12 = (!__pyx_t_2); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_21, __pyx_t_20); __pyx_t_5 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __PYX_ERR(0, 1938, __pyx_L62_except_error) } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; goto __pyx_L61_exception_handled; } __pyx_L62_except_error:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_11); goto __pyx_L22_except_error; __pyx_L61_exception_handled:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_11); __pyx_L67_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_8) { __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1938, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } goto __pyx_L59; } __pyx_L59:; } goto __pyx_L71; __pyx_L54_error:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L22_except_error; __pyx_L71:; } /* "cassandra/cluster.py":1940 * with host.lock: * host._currently_handling_node_up = False * raise # <<<<<<<<<<<<<< * else: * if not have_future: */ __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(0, 1940, __pyx_L22_except_error) } goto __pyx_L22_except_error; /* "cassandra/cluster.py":1900 * have_future = False * futures = set() * try: # <<<<<<<<<<<<<< * log.info("Host %s may be up; will prepare queries and open connection pool", host) * */ __pyx_L22_except_error:; __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_10, __pyx_t_9); goto __pyx_L1_error; __pyx_L25_try_end:; } /* "cassandra/cluster.py":1948 * * # for testing purposes * return futures # <<<<<<<<<<<<<< * * def _start_reconnector(self, host, is_host_addition): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_futures); __pyx_r = __pyx_v_futures; goto __pyx_L0; /* "cassandra/cluster.py":1878 * session.update_created_pools() * * def on_up(self, host): # <<<<<<<<<<<<<< * """ * Intended for internal use only. */ /* function exit code */ __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_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_XDECREF(__pyx_t_21); __Pyx_AddTraceback("cassandra.cluster.Cluster.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_futures); __Pyx_XDECREF(__pyx_v_reconnector); __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v_futures_lock); __Pyx_XDECREF(__pyx_v_futures_results); __Pyx_XDECREF(__pyx_v_callback); __Pyx_XDECREF(__pyx_v_future); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1950 * return futures * * def _start_reconnector(self, host, is_host_addition): # <<<<<<<<<<<<<< * if self.profile_manager.distance(host) == HostDistance.IGNORED: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_77_start_reconnector(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_77_start_reconnector = {"_start_reconnector", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_77_start_reconnector, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_77_start_reconnector(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_is_host_addition = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_start_reconnector (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_is_host_addition,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1950, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1950, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1950, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1950, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_start_reconnector", 0) < (0)) __PYX_ERR(0, 1950, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_start_reconnector", 1, 3, 3, i); __PYX_ERR(0, 1950, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1950, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1950, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1950, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_is_host_addition = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_start_reconnector", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1950, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._start_reconnector", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_76_start_reconnector(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_is_host_addition); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_76_start_reconnector(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_is_host_addition) { PyObject *__pyx_v_schedule = NULL; PyObject *__pyx_v_conn_factory = NULL; PyObject *__pyx_v_reconnector = NULL; PyObject *__pyx_v_old_reconnector = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_start_reconnector", 0); /* "cassandra/cluster.py":1951 * * def _start_reconnector(self, host, is_host_addition): * if self.profile_manager.distance(host) == HostDistance.IGNORED: # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1951, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1951, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":1952 * def _start_reconnector(self, host, is_host_addition): * if self.profile_manager.distance(host) == HostDistance.IGNORED: * return # <<<<<<<<<<<<<< * * schedule = self.reconnection_policy.new_schedule() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":1951 * * def _start_reconnector(self, host, is_host_addition): * if self.profile_manager.distance(host) == HostDistance.IGNORED: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":1954 * return * * schedule = self.reconnection_policy.new_schedule() # <<<<<<<<<<<<<< * * # in order to not hold references to this Cluster open and prevent */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_policy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new_schedule, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_schedule = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":1959 * # proper shutdown when the program ends, we'll just make a closure * # of the current Cluster attributes to create new Connections with * conn_factory = self._make_connection_factory(host) # <<<<<<<<<<<<<< * * reconnector = _HostReconnectionHandler( */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_connection_factory, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_conn_factory = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":1961 * conn_factory = self._make_connection_factory(host) * * reconnector = _HostReconnectionHandler( # <<<<<<<<<<<<<< * host, conn_factory, is_host_addition, self.on_add, self.on_up, * self.scheduler, schedule, host.get_and_set_reconnection_handler, */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HostReconnectionHandler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":1962 * * reconnector = _HostReconnectionHandler( * host, conn_factory, is_host_addition, self.on_add, self.on_up, # <<<<<<<<<<<<<< * self.scheduler, schedule, host.get_and_set_reconnection_handler, * new_handler=None) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_add); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_up); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "cassandra/cluster.py":1963 * reconnector = _HostReconnectionHandler( * host, conn_factory, is_host_addition, self.on_add, self.on_up, * self.scheduler, schedule, host.get_and_set_reconnection_handler, # <<<<<<<<<<<<<< * new_handler=None) * */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_get_and_set_reconnection_handler); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":1964 * host, conn_factory, is_host_addition, self.on_add, self.on_up, * self.scheduler, schedule, host.get_and_set_reconnection_handler, * new_handler=None) # <<<<<<<<<<<<<< * * old_reconnector = host.get_and_set_reconnection_handler(reconnector) */ __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[9 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_host, __pyx_v_conn_factory, __pyx_v_is_host_addition, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_v_schedule, __pyx_t_9}; __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_new_handler, Py_None, __pyx_t_10, __pyx_callargs+9, 0) < (0)) __PYX_ERR(0, 1961, __pyx_L1_error) __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (9-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_reconnector = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":1966 * new_handler=None) * * old_reconnector = host.get_and_set_reconnection_handler(reconnector) # <<<<<<<<<<<<<< * if old_reconnector: * log.debug("Old host reconnector found for %s, cancelling", host) */ __pyx_t_2 = __pyx_v_host; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_reconnector}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_and_set_reconnection_handler, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_old_reconnector = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":1967 * * old_reconnector = host.get_and_set_reconnection_handler(reconnector) * if old_reconnector: # <<<<<<<<<<<<<< * log.debug("Old host reconnector found for %s, cancelling", host) * old_reconnector.cancel() */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_old_reconnector); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1967, __pyx_L1_error) if (__pyx_t_5) { /* "cassandra/cluster.py":1968 * old_reconnector = host.get_and_set_reconnection_handler(reconnector) * if old_reconnector: * log.debug("Old host reconnector found for %s, cancelling", host) # <<<<<<<<<<<<<< * old_reconnector.cancel() * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Old_host_reconnector_found_for_s, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1969 * if old_reconnector: * log.debug("Old host reconnector found for %s, cancelling", host) * old_reconnector.cancel() # <<<<<<<<<<<<<< * * log.debug("Starting reconnector for host %s", host) */ __pyx_t_9 = __pyx_v_old_reconnector; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1967 * * old_reconnector = host.get_and_set_reconnection_handler(reconnector) * if old_reconnector: # <<<<<<<<<<<<<< * log.debug("Old host reconnector found for %s, cancelling", host) * old_reconnector.cancel() */ } /* "cassandra/cluster.py":1971 * old_reconnector.cancel() * * log.debug("Starting reconnector for host %s", host) # <<<<<<<<<<<<<< * reconnector.start() * */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Starting_reconnector_for_host_s, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1972 * * log.debug("Starting reconnector for host %s", host) * reconnector.start() # <<<<<<<<<<<<<< * * @run_in_executor */ __pyx_t_10 = __pyx_v_reconnector; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":1950 * return futures * * def _start_reconnector(self, host, is_host_addition): # <<<<<<<<<<<<<< * if self.profile_manager.distance(host) == HostDistance.IGNORED: * return */ /* 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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("cassandra.cluster.Cluster._start_reconnector", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_schedule); __Pyx_XDECREF(__pyx_v_conn_factory); __Pyx_XDECREF(__pyx_v_reconnector); __Pyx_XDECREF(__pyx_v_old_reconnector); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":1974 * reconnector.start() * * @run_in_executor # <<<<<<<<<<<<<< * def on_down(self, host, is_host_addition, expect_host_to_be_down=False): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_79on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_78on_down, "\n Intended for internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_79on_down = {"on_down", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_79on_down, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_78on_down}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_79on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_is_host_addition = 0; PyObject *__pyx_v_expect_host_to_be_down = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_down (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_is_host_addition,&__pyx_mstate_global->__pyx_n_u_expect_host_to_be_down,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 1974, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1974, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1974, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1974, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1974, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_down", 0) < (0)) __PYX_ERR(0, 1974, __pyx_L3_error) /* "cassandra/cluster.py":1975 * * @run_in_executor * def on_down(self, host, is_host_addition, expect_host_to_be_down=False): # <<<<<<<<<<<<<< * """ * Intended for internal use only. */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_down", 0, 3, 4, i); __PYX_ERR(0, 1974, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 1974, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 1974, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 1974, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 1974, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_is_host_addition = values[2]; __pyx_v_expect_host_to_be_down = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_down", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1974, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_78on_down(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_is_host_addition, __pyx_v_expect_host_to_be_down); /* "cassandra/cluster.py":1974 * reconnector.start() * * @run_in_executor # <<<<<<<<<<<<<< * def on_down(self, host, is_host_addition, expect_host_to_be_down=False): * """ */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_78on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_is_host_addition, PyObject *__pyx_v_expect_host_to_be_down) { PyObject *__pyx_v_was_up = NULL; PyObject *__pyx_v_connected = NULL; PyObject *__pyx_v_session = NULL; PyObject *__pyx_v_pool_states = NULL; PyObject *__pyx_v_pool_state = NULL; PyObject *__pyx_v_listener = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; Py_ssize_t __pyx_t_12; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_down", 0); /* "cassandra/cluster.py":1979 * Intended for internal use only. * """ * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1979, __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(0, 1979, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":1980 * """ * if self.is_shutdown: * return # <<<<<<<<<<<<<< * * with host.lock: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":1979 * Intended for internal use only. * """ * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":1982 * return * * with host.lock: # <<<<<<<<<<<<<< * was_up = host.is_up * */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1982, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1982, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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:*/ { /* "cassandra/cluster.py":1983 * * with host.lock: * was_up = host.is_up # <<<<<<<<<<<<<< * * # ignore down signals if we have open pools to the host */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_was_up = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":1987 * # ignore down signals if we have open pools to the host * # this is to avoid closing pools when a control connection host became isolated * if self._discount_down_events and self.profile_manager.distance(host) != HostDistance.IGNORED: # <<<<<<<<<<<<<< * connected = False * for session in tuple(self.sessions): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_discount_down_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; goto __pyx_L15_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1987, __pyx_L8_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __pyx_t_11; __pyx_L15_bool_binop_done:; if (__pyx_t_2) { /* "cassandra/cluster.py":1988 * # this is to avoid closing pools when a control connection host became isolated * if self._discount_down_events and self.profile_manager.distance(host) != HostDistance.IGNORED: * connected = False # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * pool_states = session.get_pool_state() */ __Pyx_INCREF(Py_False); __pyx_v_connected = Py_False; /* "cassandra/cluster.py":1989 * if self._discount_down_events and self.profile_manager.distance(host) != HostDistance.IGNORED: * connected = False * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * pool_states = session.get_pool_state() * pool_state = pool_states.get(host) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1989, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1989, __pyx_L8_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); #endif ++__pyx_t_12; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1989, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1990 * connected = False * for session in tuple(self.sessions): * pool_states = session.get_pool_state() # <<<<<<<<<<<<<< * pool_state = pool_states.get(host) * if pool_state: */ __pyx_t_1 = __pyx_v_session; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_pool_state, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1990, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_pool_states, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1991 * for session in tuple(self.sessions): * pool_states = session.get_pool_state() * pool_state = pool_states.get(host) # <<<<<<<<<<<<<< * if pool_state: * connected |= pool_state['open_count'] > 0 */ __pyx_t_1 = __pyx_v_pool_states; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1991, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_pool_state, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1992 * pool_states = session.get_pool_state() * pool_state = pool_states.get(host) * if pool_state: # <<<<<<<<<<<<<< * connected |= pool_state['open_count'] > 0 * if connected: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_pool_state); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1992, __pyx_L8_error) if (__pyx_t_2) { /* "cassandra/cluster.py":1993 * pool_state = pool_states.get(host) * if pool_state: * connected |= pool_state['open_count'] > 0 # <<<<<<<<<<<<<< * if connected: * return */ __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_pool_state, __pyx_mstate_global->__pyx_n_u_open_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1993, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1993, __pyx_L8_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyNumber_InPlaceOr(__pyx_v_connected, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1993, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_connected, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":1992 * pool_states = session.get_pool_state() * pool_state = pool_states.get(host) * if pool_state: # <<<<<<<<<<<<<< * connected |= pool_state['open_count'] > 0 * if connected: */ } /* "cassandra/cluster.py":1989 * if self._discount_down_events and self.profile_manager.distance(host) != HostDistance.IGNORED: * connected = False * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * pool_states = session.get_pool_state() * pool_state = pool_states.get(host) */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1994 * if pool_state: * connected |= pool_state['open_count'] > 0 * if connected: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_connected); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1994, __pyx_L8_error) if (__pyx_t_2) { /* "cassandra/cluster.py":1995 * connected |= pool_state['open_count'] > 0 * if connected: * return # <<<<<<<<<<<<<< * * host.set_down() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L12_try_return; /* "cassandra/cluster.py":1994 * if pool_state: * connected |= pool_state['open_count'] > 0 * if connected: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":1987 * # ignore down signals if we have open pools to the host * # this is to avoid closing pools when a control connection host became isolated * if self._discount_down_events and self.profile_manager.distance(host) != HostDistance.IGNORED: # <<<<<<<<<<<<<< * connected = False * for session in tuple(self.sessions): */ } /* "cassandra/cluster.py":1997 * return * * host.set_down() # <<<<<<<<<<<<<< * if (not was_up and not expect_host_to_be_down) or host.is_currently_reconnecting(): * return */ __pyx_t_4 = __pyx_v_host; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_down, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1997, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":1998 * * host.set_down() * if (not was_up and not expect_host_to_be_down) or host.is_currently_reconnecting(): # <<<<<<<<<<<<<< * return * */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_was_up); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1998, __pyx_L8_error) __pyx_t_13 = (!__pyx_t_11); if (!__pyx_t_13) { goto __pyx_L24_next_or; } else { } __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_expect_host_to_be_down); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1998, __pyx_L8_error) __pyx_t_11 = (!__pyx_t_13); if (!__pyx_t_11) { } else { __pyx_t_2 = __pyx_t_11; goto __pyx_L23_bool_binop_done; } __pyx_L24_next_or:; __pyx_t_4 = __pyx_v_host; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_currently_reconnecting, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1998, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 1998, __pyx_L8_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __pyx_t_11; __pyx_L23_bool_binop_done:; if (__pyx_t_2) { /* "cassandra/cluster.py":1999 * host.set_down() * if (not was_up and not expect_host_to_be_down) or host.is_currently_reconnecting(): * return # <<<<<<<<<<<<<< * * log.warning("Host %s has been marked down", host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L12_try_return; /* "cassandra/cluster.py":1998 * * host.set_down() * if (not was_up and not expect_host_to_be_down) or host.is_currently_reconnecting(): # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":1982 * return * * with host.lock: # <<<<<<<<<<<<<< * was_up = host.is_up * */ } __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_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 1982, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1982, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1982, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_2 < (0)) __PYX_ERR(0, 1982, __pyx_L10_except_error) __pyx_t_11 = (!__pyx_t_2); if (unlikely(__pyx_t_11)) { __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_4, __pyx_t_1); __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0; __PYX_ERR(0, 1982, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_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_L12_try_return:; __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_L5_return; __pyx_L9_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_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L7; } __pyx_L5_return: { __pyx_t_10 = __pyx_r; __pyx_r = 0; if (__pyx_t_3) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; } __pyx_L7:; } goto __pyx_L29; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L29:; } /* "cassandra/cluster.py":2001 * return * * log.warning("Host %s has been marked down", host) # <<<<<<<<<<<<<< * * self.profile_manager.on_down(host) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Host_s_has_been_marked_down, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2003 * log.warning("Host %s has been marked down", host) * * self.profile_manager.on_down(host) # <<<<<<<<<<<<<< * self.control_connection.on_down(host) * for session in tuple(self.sessions): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2004 * * self.profile_manager.on_down(host) * self.control_connection.on_down(host) # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * session.on_down(host) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2005 * self.profile_manager.on_down(host) * self.control_connection.on_down(host) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.on_down(host) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2005, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_12)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_12); #endif ++__pyx_t_12; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2005, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2006 * self.control_connection.on_down(host) * for session in tuple(self.sessions): * session.on_down(host) # <<<<<<<<<<<<<< * * for listener in self.listeners: */ __pyx_t_4 = __pyx_v_session; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2005 * self.profile_manager.on_down(host) * self.control_connection.on_down(host) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.on_down(host) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2008 * session.on_down(host) * * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_down(host) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_12 = 0; __pyx_t_15 = NULL; } else { __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2008, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_15)) { if (likely(PyList_CheckExact(__pyx_t_5))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2008, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_12; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2008, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_12); #endif ++__pyx_t_12; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2008, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_15(__pyx_t_5); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2008, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_listener, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2009 * * for listener in self.listeners: * listener.on_down(host) # <<<<<<<<<<<<<< * * self._start_reconnector(host, is_host_addition) */ __pyx_t_4 = __pyx_v_listener; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2008 * session.on_down(host) * * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_down(host) * */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2011 * listener.on_down(host) * * self._start_reconnector(host, is_host_addition) # <<<<<<<<<<<<<< * * def on_add(self, host, refresh_nodes=True): */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_host, __pyx_v_is_host_addition}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_reconnector, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":1974 * reconnector.start() * * @run_in_executor # <<<<<<<<<<<<<< * def on_down(self, host, is_host_addition, expect_host_to_be_down=False): * """ */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.Cluster.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_was_up); __Pyx_XDECREF(__pyx_v_connected); __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v_pool_states); __Pyx_XDECREF(__pyx_v_pool_state); __Pyx_XDECREF(__pyx_v_listener); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2013 * self._start_reconnector(host, is_host_addition) * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_81on_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_81on_add = {"on_add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_81on_add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_81on_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_refresh_nodes = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_add (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_refresh_nodes,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2013, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2013, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2013, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2013, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_add", 0) < (0)) __PYX_ERR(0, 2013, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_add", 0, 2, 3, i); __PYX_ERR(0, 2013, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2013, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2013, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2013, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_refresh_nodes = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_add", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2013, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.on_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_80on_add(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_refresh_nodes); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2037 * futures = set() * * def future_completed(future): # <<<<<<<<<<<<<< * with futures_lock: * futures.discard(future) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_6on_add_1future_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_6on_add_1future_completed = {"future_completed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_6on_add_1future_completed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_6on_add_1future_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("future_completed (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2037, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2037, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "future_completed", 0) < (0)) __PYX_ERR(0, 2037, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("future_completed", 1, 1, 1, i); __PYX_ERR(0, 2037, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2037, __pyx_L3_error) } __pyx_v_future = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("future_completed", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2037, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.on_add.future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_6on_add_future_completed(__pyx_self, __pyx_v_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_6on_add_future_completed(PyObject *__pyx_self, PyObject *__pyx_v_future) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *__pyx_cur_scope; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *__pyx_outer_scope; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_9genexpr12__pyx_v_f = 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; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; int __pyx_t_22; PyObject *__pyx_t_23 = NULL; int __pyx_t_24; Py_ssize_t __pyx_t_25; PyObject *__pyx_t_26 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("future_completed", 0); __pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "cassandra/cluster.py":2038 * * def future_completed(future): * with futures_lock: # <<<<<<<<<<<<<< * futures.discard(future) * */ /*with:*/ { if (unlikely(!__pyx_cur_scope->__pyx_v_futures_lock)) { __Pyx_RaiseClosureNameError("futures_lock"); __PYX_ERR(0, 2038, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_cur_scope->__pyx_v_futures_lock, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_cur_scope->__pyx_v_futures_lock, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2038, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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:*/ { /* "cassandra/cluster.py":2039 * def future_completed(future): * with futures_lock: * futures.discard(future) # <<<<<<<<<<<<<< * * try: */ if (unlikely(!__pyx_cur_scope->__pyx_v_futures)) { __Pyx_RaiseClosureNameError("futures"); __PYX_ERR(0, 2039, __pyx_L7_error) } if (unlikely(__pyx_cur_scope->__pyx_v_futures == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "discard"); __PYX_ERR(0, 2039, __pyx_L7_error) } __pyx_t_9 = __Pyx_PySet_Discard(__pyx_cur_scope->__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2039, __pyx_L7_error) /* "cassandra/cluster.py":2041 * futures.discard(future) * * try: # <<<<<<<<<<<<<< * futures_results.append(future.result()) * except Exception as exc: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { /* "cassandra/cluster.py":2042 * * try: * futures_results.append(future.result()) # <<<<<<<<<<<<<< * except Exception as exc: * futures_results.append(exc) */ if (unlikely(!__pyx_cur_scope->__pyx_v_futures_results)) { __Pyx_RaiseClosureNameError("futures_results"); __PYX_ERR(0, 2042, __pyx_L13_error) } if (unlikely(__pyx_cur_scope->__pyx_v_futures_results == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 2042, __pyx_L13_error) } __pyx_t_4 = __pyx_v_future; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_9 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_futures_results, __pyx_t_2); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2042, __pyx_L13_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2041 * futures.discard(future) * * try: # <<<<<<<<<<<<<< * futures_results.append(future.result()) * except Exception as exc: */ } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L18_try_end; __pyx_L13_error:; __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; /* "cassandra/cluster.py":2043 * try: * futures_results.append(future.result()) * except Exception as exc: # <<<<<<<<<<<<<< * futures_results.append(exc) * */ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_13) { __Pyx_AddTraceback("cassandra.cluster.Cluster.on_add.future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 2043, __pyx_L15_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":2044 * futures_results.append(future.result()) * except Exception as exc: * futures_results.append(exc) # <<<<<<<<<<<<<< * * if futures: */ if (unlikely(!__pyx_cur_scope->__pyx_v_futures_results)) { __Pyx_RaiseClosureNameError("futures_results"); __PYX_ERR(0, 2044, __pyx_L24_error) } if (unlikely(__pyx_cur_scope->__pyx_v_futures_results == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 2044, __pyx_L24_error) } __pyx_t_9 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_futures_results, __pyx_v_exc); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2044, __pyx_L24_error) } /* "cassandra/cluster.py":2043 * try: * futures_results.append(future.result()) * except Exception as exc: # <<<<<<<<<<<<<< * futures_results.append(exc) * */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L25; } __pyx_L24_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_13 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L15_except_error; } __pyx_L25:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L14_exception_handled; } goto __pyx_L15_except_error; /* "cassandra/cluster.py":2041 * futures.discard(future) * * try: # <<<<<<<<<<<<<< * futures_results.append(future.result()) * except Exception as exc: */ __pyx_L15_except_error:; __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); goto __pyx_L7_error; __pyx_L14_exception_handled:; __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_L18_try_end:; } /* "cassandra/cluster.py":2046 * futures_results.append(exc) * * if futures: # <<<<<<<<<<<<<< * return * */ if (unlikely(!__pyx_cur_scope->__pyx_v_futures)) { __Pyx_RaiseClosureNameError("futures"); __PYX_ERR(0, 2046, __pyx_L7_error) } if (__pyx_cur_scope->__pyx_v_futures == Py_None) __pyx_t_22 = 0; else { Py_ssize_t __pyx_temp = __Pyx_PySet_GET_SIZE(__pyx_cur_scope->__pyx_v_futures); if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 2046, __pyx_L7_error) __pyx_t_22 = (__pyx_temp != 0); } if (__pyx_t_22) { /* "cassandra/cluster.py":2047 * * if futures: * return # <<<<<<<<<<<<<< * * log.debug('All futures have completed for added host %s', host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; /* "cassandra/cluster.py":2046 * futures_results.append(exc) * * if futures: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":2038 * * def future_completed(future): * with futures_lock: # <<<<<<<<<<<<<< * futures.discard(future) * */ } __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_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Cluster.on_add.future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 2038, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __pyx_t_23 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2038, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_23, NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2038, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_22 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_22 < (0)) __PYX_ERR(0, 2038, __pyx_L9_except_error) __pyx_t_24 = (!__pyx_t_22); if (unlikely(__pyx_t_24)) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_4, __pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 2038, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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_L11_try_return:; __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_L4_return; __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_1) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2038, __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_1) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2038, __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_L34; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L1_error; __pyx_L34:; } /* "cassandra/cluster.py":2049 * return * * log.debug('All futures have completed for added host %s', host) # <<<<<<<<<<<<<< * * for exc in [f for f in futures_results if isinstance(f, Exception)]: */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 2049, __pyx_L1_error) } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_23))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_23); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_23); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_23, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_All_futures_have_completed_for_a, __pyx_cur_scope->__pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_23, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2051 * log.debug('All futures have completed for added host %s', host) * * for exc in [f for f in futures_results if isinstance(f, Exception)]: # <<<<<<<<<<<<<< * log.error("Unexpected failure while adding node %s, will not mark up:", host, exc_info=exc) * return */ { /* enter inner scope */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(!__pyx_cur_scope->__pyx_v_futures_results)) { __Pyx_RaiseClosureNameError("futures_results"); __PYX_ERR(0, 2051, __pyx_L39_error) } if (unlikely(__pyx_cur_scope->__pyx_v_futures_results == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 2051, __pyx_L39_error) } __pyx_t_23 = __pyx_cur_scope->__pyx_v_futures_results; __Pyx_INCREF(__pyx_t_23); __pyx_t_25 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_23); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2051, __pyx_L39_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_23, __pyx_t_25, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_25; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2051, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_f, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_24 = __Pyx_PyException_Check(__pyx_9genexpr12__pyx_v_f); if (__pyx_t_24) { if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr12__pyx_v_f))) __PYX_ERR(0, 2051, __pyx_L39_error) } } __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_f); __pyx_9genexpr12__pyx_v_f = 0; goto __pyx_L44_exit_scope; __pyx_L39_error:; __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_f); __pyx_9genexpr12__pyx_v_f = 0; goto __pyx_L1_error; __pyx_L44_exit_scope:; } /* exit inner scope */ __pyx_t_23 = __pyx_t_2; __Pyx_INCREF(__pyx_t_23); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_23); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2051, __pyx_L1_error) #endif if (__pyx_t_25 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_23, __pyx_t_25, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_25; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_exc, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2052 * * for exc in [f for f in futures_results if isinstance(f, Exception)]: * log.error("Unexpected failure while adding node %s, will not mark up:", host, exc_info=exc) # <<<<<<<<<<<<<< * return * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 2052, __pyx_L1_error) } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_26))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_26); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_26); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_26, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Unexpected_failure_while_adding, __pyx_cur_scope->__pyx_v_host}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, __pyx_v_exc, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 2052, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_26, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2053 * for exc in [f for f in futures_results if isinstance(f, Exception)]: * log.error("Unexpected failure while adding node %s, will not mark up:", host, exc_info=exc) * return # <<<<<<<<<<<<<< * * if not all(futures_results): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2051 * log.debug('All futures have completed for added host %s', host) * * for exc in [f for f in futures_results if isinstance(f, Exception)]: # <<<<<<<<<<<<<< * log.error("Unexpected failure while adding node %s, will not mark up:", host, exc_info=exc) * return */ } __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; /* "cassandra/cluster.py":2055 * return * * if not all(futures_results): # <<<<<<<<<<<<<< * log.warning("Connection pool could not be created, not marking node %s up", host) * return */ __pyx_t_2 = NULL; if (unlikely(!__pyx_cur_scope->__pyx_v_futures_results)) { __Pyx_RaiseClosureNameError("futures_results"); __PYX_ERR(0, 2055, __pyx_L1_error) } __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_futures_results}; __pyx_t_23 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_all, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); } __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 2055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __pyx_t_22 = (!__pyx_t_24); if (__pyx_t_22) { /* "cassandra/cluster.py":2056 * * if not all(futures_results): * log.warning("Connection pool could not be created, not marking node %s up", host) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_26, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_26); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; if (unlikely(!__pyx_cur_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 2056, __pyx_L1_error) } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Connection_pool_could_not_be_cre, __pyx_cur_scope->__pyx_v_host}; __pyx_t_23 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); } __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; /* "cassandra/cluster.py":2057 * if not all(futures_results): * log.warning("Connection pool could not be created, not marking node %s up", host) * return # <<<<<<<<<<<<<< * * self._finalize_add(host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2055 * return * * if not all(futures_results): # <<<<<<<<<<<<<< * log.warning("Connection pool could not be created, not marking node %s up", host) * return */ } /* "cassandra/cluster.py":2059 * return * * self._finalize_add(host) # <<<<<<<<<<<<<< * * have_future = False */ if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2059, __pyx_L1_error) } __pyx_t_3 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_3); if (unlikely(!__pyx_cur_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 2059, __pyx_L1_error) } __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_host}; __pyx_t_23 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize_add, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); } __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; /* "cassandra/cluster.py":2037 * futures = set() * * def future_completed(future): # <<<<<<<<<<<<<< * with futures_lock: * futures.discard(future) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_23); __Pyx_XDECREF(__pyx_t_26); __Pyx_AddTraceback("cassandra.cluster.Cluster.on_add.future_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_f); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2013 * self._start_reconnector(host, is_host_addition) * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_80on_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_refresh_nodes) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *__pyx_cur_scope; PyObject *__pyx_v_distance = NULL; PyObject *__pyx_v_future_completed = 0; int __pyx_v_have_future; PyObject *__pyx_v_session = NULL; PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_add", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_5_on_add(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 2013, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_host = __pyx_v_host; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); /* "cassandra/cluster.py":2014 * * def on_add(self, host, refresh_nodes=True): * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __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(0, 2014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":2015 * def on_add(self, host, refresh_nodes=True): * if self.is_shutdown: * return # <<<<<<<<<<<<<< * * log.debug("Handling new host %r and notifying listeners", host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2014 * * def on_add(self, host, refresh_nodes=True): * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":2017 * return * * log.debug("Handling new host %r and notifying listeners", host) # <<<<<<<<<<<<<< * * distance = self.profile_manager.distance(host) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Handling_new_host_r_and_notifyin, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2019 * log.debug("Handling new host %r and notifying listeners", host) * * distance = self.profile_manager.distance(host) # <<<<<<<<<<<<<< * if distance != HostDistance.IGNORED: * self._prepare_all_queries(host) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_distance = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2020 * * distance = self.profile_manager.distance(host) * if distance != HostDistance.IGNORED: # <<<<<<<<<<<<<< * self._prepare_all_queries(host) * log.debug("Done preparing queries for new host %r", host) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_distance, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2020, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2020, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":2021 * distance = self.profile_manager.distance(host) * if distance != HostDistance.IGNORED: * self._prepare_all_queries(host) # <<<<<<<<<<<<<< * log.debug("Done preparing queries for new host %r", host) * */ __pyx_t_3 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_prepare_all_queries, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2022 * if distance != HostDistance.IGNORED: * self._prepare_all_queries(host) * log.debug("Done preparing queries for new host %r", host) # <<<<<<<<<<<<<< * * self.profile_manager.on_add(host) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Done_preparing_queries_for_new_h, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2020 * * distance = self.profile_manager.distance(host) * if distance != HostDistance.IGNORED: # <<<<<<<<<<<<<< * self._prepare_all_queries(host) * log.debug("Done preparing queries for new host %r", host) */ } /* "cassandra/cluster.py":2024 * log.debug("Done preparing queries for new host %r", host) * * self.profile_manager.on_add(host) # <<<<<<<<<<<<<< * self.control_connection.on_add(host, refresh_nodes) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2025 * * self.profile_manager.on_add(host) * self.control_connection.on_add(host, refresh_nodes) # <<<<<<<<<<<<<< * * if distance == HostDistance.IGNORED: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_host, __pyx_v_refresh_nodes}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_add, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2027 * self.control_connection.on_add(host, refresh_nodes) * * if distance == HostDistance.IGNORED: # <<<<<<<<<<<<<< * log.debug("Not adding connection pool for new host %r because the " * "load balancing policy has marked it as IGNORED", host) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_distance, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2027, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2027, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":2028 * * if distance == HostDistance.IGNORED: * log.debug("Not adding connection pool for new host %r because the " # <<<<<<<<<<<<<< * "load balancing policy has marked it as IGNORED", host) * self._finalize_add(host, set_up=False) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2029 * if distance == HostDistance.IGNORED: * log.debug("Not adding connection pool for new host %r because the " * "load balancing policy has marked it as IGNORED", host) # <<<<<<<<<<<<<< * self._finalize_add(host, set_up=False) * return */ __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Not_adding_connection_pool_for_n, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2030 * log.debug("Not adding connection pool for new host %r because the " * "load balancing policy has marked it as IGNORED", host) * self._finalize_add(host, set_up=False) # <<<<<<<<<<<<<< * return * */ __pyx_t_5 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_host}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_set_up, Py_False, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2030, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __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(0, 2030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2031 * "load balancing policy has marked it as IGNORED", host) * self._finalize_add(host, set_up=False) * return # <<<<<<<<<<<<<< * * futures_lock = Lock() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2027 * self.control_connection.on_add(host, refresh_nodes) * * if distance == HostDistance.IGNORED: # <<<<<<<<<<<<<< * log.debug("Not adding connection pool for new host %r because the " * "load balancing policy has marked it as IGNORED", host) */ } /* "cassandra/cluster.py":2033 * return * * futures_lock = Lock() # <<<<<<<<<<<<<< * futures_results = [] * futures = set() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_futures_lock = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2034 * * futures_lock = Lock() * futures_results = [] # <<<<<<<<<<<<<< * futures = set() * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_futures_results = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2035 * futures_lock = Lock() * futures_results = [] * futures = set() # <<<<<<<<<<<<<< * * def future_completed(future): */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_futures = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2037 * futures = set() * * def future_completed(future): # <<<<<<<<<<<<<< * with futures_lock: * futures.discard(future) */ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_6on_add_1future_completed, 0, __pyx_mstate_global->__pyx_n_u_Cluster_on_add_locals_future_com, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_future_completed = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2061 * self._finalize_add(host) * * have_future = False # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=True) */ __pyx_v_have_future = 0; /* "cassandra/cluster.py":2062 * * have_future = False * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * future = session.add_or_renew_pool(host, is_host_addition=True) * if future is not None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2062, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); #endif ++__pyx_t_7; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2062, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2063 * have_future = False * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=True) # <<<<<<<<<<<<<< * if future is not None: * have_future = True */ __pyx_t_4 = __pyx_v_session; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_host}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_True, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2063, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_add_or_renew_pool, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __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_5)) __PYX_ERR(0, 2063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2064 * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=True) * if future is not None: # <<<<<<<<<<<<<< * have_future = True * futures.add(future) */ __pyx_t_2 = (__pyx_v_future != Py_None); if (__pyx_t_2) { /* "cassandra/cluster.py":2065 * future = session.add_or_renew_pool(host, is_host_addition=True) * if future is not None: * have_future = True # <<<<<<<<<<<<<< * futures.add(future) * future.add_done_callback(future_completed) */ __pyx_v_have_future = 1; /* "cassandra/cluster.py":2066 * if future is not None: * have_future = True * futures.add(future) # <<<<<<<<<<<<<< * future.add_done_callback(future_completed) * */ __pyx_t_8 = PySet_Add(__pyx_cur_scope->__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 2066, __pyx_L1_error) /* "cassandra/cluster.py":2067 * have_future = True * futures.add(future) * future.add_done_callback(future_completed) # <<<<<<<<<<<<<< * * if not have_future: */ __pyx_t_3 = __pyx_v_future; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_future_completed}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_done_callback, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2064 * for session in tuple(self.sessions): * future = session.add_or_renew_pool(host, is_host_addition=True) * if future is not None: # <<<<<<<<<<<<<< * have_future = True * futures.add(future) */ } /* "cassandra/cluster.py":2062 * * have_future = False * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * future = session.add_or_renew_pool(host, is_host_addition=True) * if future is not None: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2069 * future.add_done_callback(future_completed) * * if not have_future: # <<<<<<<<<<<<<< * self._finalize_add(host) * */ __pyx_t_2 = (!__pyx_v_have_future); if (__pyx_t_2) { /* "cassandra/cluster.py":2070 * * if not have_future: * self._finalize_add(host) # <<<<<<<<<<<<<< * * def _finalize_add(self, host, set_up=True): */ __pyx_t_5 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finalize_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2069 * future.add_done_callback(future_completed) * * if not have_future: # <<<<<<<<<<<<<< * self._finalize_add(host) * */ } /* "cassandra/cluster.py":2013 * self._start_reconnector(host, is_host_addition) * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ /* 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("cassandra.cluster.Cluster.on_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_distance); __Pyx_XDECREF(__pyx_v_future_completed); __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v_future); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2072 * self._finalize_add(host) * * def _finalize_add(self, host, set_up=True): # <<<<<<<<<<<<<< * if set_up: * host.set_up() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_83_finalize_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_83_finalize_add = {"_finalize_add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_83_finalize_add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_83_finalize_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_set_up = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_finalize_add (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_set_up,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2072, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2072, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2072, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2072, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_finalize_add", 0) < (0)) __PYX_ERR(0, 2072, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_finalize_add", 0, 2, 3, i); __PYX_ERR(0, 2072, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2072, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2072, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2072, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_set_up = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_finalize_add", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2072, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._finalize_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_82_finalize_add(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_set_up); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_82_finalize_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_set_up) { PyObject *__pyx_v_listener = NULL; PyObject *__pyx_v_session = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_finalize_add", 0); /* "cassandra/cluster.py":2073 * * def _finalize_add(self, host, set_up=True): * if set_up: # <<<<<<<<<<<<<< * host.set_up() * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_set_up); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2073, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2074 * def _finalize_add(self, host, set_up=True): * if set_up: * host.set_up() # <<<<<<<<<<<<<< * * for listener in self.listeners: */ __pyx_t_3 = __pyx_v_host; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_up, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2073 * * def _finalize_add(self, host, set_up=True): * if set_up: # <<<<<<<<<<<<<< * host.set_up() * */ } /* "cassandra/cluster.py":2076 * host.set_up() * * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_add(host) * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __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_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2076, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2076, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2076, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); #endif ++__pyx_t_5; } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2076, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_listener, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2077 * * for listener in self.listeners: * listener.on_add(host) # <<<<<<<<<<<<<< * * # see if there are any pools to add or remove now that the host is marked up */ __pyx_t_7 = __pyx_v_listener; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_add, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2076 * host.set_up() * * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_add(host) * */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2080 * * # see if there are any pools to add or remove now that the host is marked up * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.update_created_pools() * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2080, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); #endif ++__pyx_t_5; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2081 * # see if there are any pools to add or remove now that the host is marked up * for session in tuple(self.sessions): * session.update_created_pools() # <<<<<<<<<<<<<< * * def on_remove(self, host): */ __pyx_t_7 = __pyx_v_session; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_created_pools, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2080 * * # see if there are any pools to add or remove now that the host is marked up * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.update_created_pools() * */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2072 * self._finalize_add(host) * * def _finalize_add(self, host, set_up=True): # <<<<<<<<<<<<<< * if set_up: * host.set_up() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.Cluster._finalize_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_listener); __Pyx_XDECREF(__pyx_v_session); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2083 * session.update_created_pools() * * def on_remove(self, host): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_85on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_85on_remove = {"on_remove", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_85on_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_85on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_remove (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2083, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2083, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2083, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_remove", 0) < (0)) __PYX_ERR(0, 2083, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, i); __PYX_ERR(0, 2083, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2083, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2083, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2083, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_84on_remove(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_84on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_session = NULL; PyObject *__pyx_v_listener = NULL; PyObject *__pyx_v_reconnection_handler = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_remove", 0); /* "cassandra/cluster.py":2084 * * def on_remove(self, host): * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __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(0, 2084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":2085 * def on_remove(self, host): * if self.is_shutdown: * return # <<<<<<<<<<<<<< * * log.debug("Removing host %s", host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2084 * * def on_remove(self, host): * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":2087 * return * * log.debug("Removing host %s", host) # <<<<<<<<<<<<<< * host.set_down() * self.profile_manager.on_remove(host) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Removing_host_s, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2088 * * log.debug("Removing host %s", host) * host.set_down() # <<<<<<<<<<<<<< * self.profile_manager.on_remove(host) * for session in tuple(self.sessions): */ __pyx_t_5 = __pyx_v_host; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_down, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2089 * log.debug("Removing host %s", host) * host.set_down() * self.profile_manager.on_remove(host) # <<<<<<<<<<<<<< * for session in tuple(self.sessions): * session.on_remove(host) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2090 * host.set_down() * self.profile_manager.on_remove(host) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.on_remove(host) * for listener in self.listeners: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2090, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7)); #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); #endif ++__pyx_t_7; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2091 * self.profile_manager.on_remove(host) * for session in tuple(self.sessions): * session.on_remove(host) # <<<<<<<<<<<<<< * for listener in self.listeners: * listener.on_remove(host) */ __pyx_t_5 = __pyx_v_session; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2090 * host.set_down() * self.profile_manager.on_remove(host) * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * session.on_remove(host) * for listener in self.listeners: */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2092 * for session in tuple(self.sessions): * session.on_remove(host) * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_remove(host) * self.control_connection.on_remove(host) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); 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_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2092, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2092, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2092, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); #endif ++__pyx_t_7; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2092, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2092, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_listener, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2093 * session.on_remove(host) * for listener in self.listeners: * listener.on_remove(host) # <<<<<<<<<<<<<< * self.control_connection.on_remove(host) * */ __pyx_t_5 = __pyx_v_listener; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2092 * for session in tuple(self.sessions): * session.on_remove(host) * for listener in self.listeners: # <<<<<<<<<<<<<< * listener.on_remove(host) * self.control_connection.on_remove(host) */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2094 * for listener in self.listeners: * listener.on_remove(host) * self.control_connection.on_remove(host) # <<<<<<<<<<<<<< * * reconnection_handler = host.get_and_set_reconnection_handler(None) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2096 * self.control_connection.on_remove(host) * * reconnection_handler = host.get_and_set_reconnection_handler(None) # <<<<<<<<<<<<<< * if reconnection_handler: * reconnection_handler.cancel() */ __pyx_t_5 = __pyx_v_host; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, Py_None}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_and_set_reconnection_handler, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2096, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_reconnection_handler = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2097 * * reconnection_handler = host.get_and_set_reconnection_handler(None) * if reconnection_handler: # <<<<<<<<<<<<<< * reconnection_handler.cancel() * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_reconnection_handler); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2097, __pyx_L1_error) if (__pyx_t_2) { /* "cassandra/cluster.py":2098 * reconnection_handler = host.get_and_set_reconnection_handler(None) * if reconnection_handler: * reconnection_handler.cancel() # <<<<<<<<<<<<<< * * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): */ __pyx_t_5 = __pyx_v_reconnection_handler; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2097 * * reconnection_handler = host.get_and_set_reconnection_handler(None) * if reconnection_handler: # <<<<<<<<<<<<<< * reconnection_handler.cancel() * */ } /* "cassandra/cluster.py":2083 * session.update_created_pools() * * def on_remove(self, host): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ /* 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("cassandra.cluster.Cluster.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v_listener); __Pyx_XDECREF(__pyx_v_reconnection_handler); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2100 * reconnection_handler.cancel() * * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): # <<<<<<<<<<<<<< * is_down = host.signal_connection_failure(connection_exc) * if is_down: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_87signal_connection_failure(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_87signal_connection_failure = {"signal_connection_failure", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_87signal_connection_failure, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_87signal_connection_failure(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_connection_exc = 0; PyObject *__pyx_v_is_host_addition = 0; PyObject *__pyx_v_expect_host_to_be_down = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("signal_connection_failure (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_connection_exc,&__pyx_mstate_global->__pyx_n_u_is_host_addition,&__pyx_mstate_global->__pyx_n_u_expect_host_to_be_down,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2100, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "signal_connection_failure", 0) < (0)) __PYX_ERR(0, 2100, __pyx_L3_error) if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("signal_connection_failure", 0, 4, 5, i); __PYX_ERR(0, 2100, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2100, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2100, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2100, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2100, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_connection_exc = values[2]; __pyx_v_is_host_addition = values[3]; __pyx_v_expect_host_to_be_down = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("signal_connection_failure", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 2100, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.signal_connection_failure", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_86signal_connection_failure(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_connection_exc, __pyx_v_is_host_addition, __pyx_v_expect_host_to_be_down); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_86signal_connection_failure(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_connection_exc, PyObject *__pyx_v_is_host_addition, PyObject *__pyx_v_expect_host_to_be_down) { PyObject *__pyx_v_is_down = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("signal_connection_failure", 0); /* "cassandra/cluster.py":2101 * * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): * is_down = host.signal_connection_failure(connection_exc) # <<<<<<<<<<<<<< * if is_down: * self.on_down(host, is_host_addition, expect_host_to_be_down) */ __pyx_t_2 = __pyx_v_host; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_connection_exc}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_connection_failure, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_is_down = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2102 * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): * is_down = host.signal_connection_failure(connection_exc) * if is_down: # <<<<<<<<<<<<<< * self.on_down(host, is_host_addition, expect_host_to_be_down) * return is_down */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_is_down); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2102, __pyx_L1_error) if (__pyx_t_4) { /* "cassandra/cluster.py":2103 * is_down = host.signal_connection_failure(connection_exc) * if is_down: * self.on_down(host, is_host_addition, expect_host_to_be_down) # <<<<<<<<<<<<<< * return is_down * */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_host, __pyx_v_is_host_addition, __pyx_v_expect_host_to_be_down}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_3, (4-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2102 * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): * is_down = host.signal_connection_failure(connection_exc) * if is_down: # <<<<<<<<<<<<<< * self.on_down(host, is_host_addition, expect_host_to_be_down) * return is_down */ } /* "cassandra/cluster.py":2104 * if is_down: * self.on_down(host, is_host_addition, expect_host_to_be_down) * return is_down # <<<<<<<<<<<<<< * * def add_host(self, endpoint, datacenter=None, rack=None, signal=True, refresh_nodes=True): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_is_down); __pyx_r = __pyx_v_is_down; goto __pyx_L0; /* "cassandra/cluster.py":2100 * reconnection_handler.cancel() * * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): # <<<<<<<<<<<<<< * is_down = host.signal_connection_failure(connection_exc) * if is_down: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Cluster.signal_connection_failure", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_is_down); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2106 * return is_down * * def add_host(self, endpoint, datacenter=None, rack=None, signal=True, refresh_nodes=True): # <<<<<<<<<<<<<< * """ * Called when adding initial contact points and when the control */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_89add_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_88add_host, "\n Called when adding initial contact points and when the control\n connection subsequently discovers a new node.\n Returns a Host instance, and a flag indicating whether it was new in\n the metadata.\n Intended for internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_89add_host = {"add_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_89add_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_88add_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_89add_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_endpoint = 0; PyObject *__pyx_v_datacenter = 0; PyObject *__pyx_v_rack = 0; PyObject *__pyx_v_signal = 0; PyObject *__pyx_v_refresh_nodes = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_endpoint,&__pyx_mstate_global->__pyx_n_u_datacenter,&__pyx_mstate_global->__pyx_n_u_rack,&__pyx_mstate_global->__pyx_n_u_signal,&__pyx_mstate_global->__pyx_n_u_refresh_nodes,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2106, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_host", 0) < (0)) __PYX_ERR(0, 2106, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_host", 0, 2, 6, i); __PYX_ERR(0, 2106, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2106, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2106, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2106, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); } __pyx_v_self = values[0]; __pyx_v_endpoint = values[1]; __pyx_v_datacenter = values[2]; __pyx_v_rack = values[3]; __pyx_v_signal = values[4]; __pyx_v_refresh_nodes = values[5]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_host", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 2106, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.add_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_88add_host(__pyx_self, __pyx_v_self, __pyx_v_endpoint, __pyx_v_datacenter, __pyx_v_rack, __pyx_v_signal, __pyx_v_refresh_nodes); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_88add_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_endpoint, PyObject *__pyx_v_datacenter, PyObject *__pyx_v_rack, PyObject *__pyx_v_signal, PyObject *__pyx_v_refresh_nodes) { PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_new = 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; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_host", 0); /* "cassandra/cluster.py":2114 * Intended for internal use only. * """ * host, new = self.metadata.add_or_return_host(Host(endpoint, self.conviction_policy_factory, datacenter, rack)) # <<<<<<<<<<<<<< * if new and signal: * log.info("New Cassandra host %r discovered", host) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Host); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_conviction_policy_factory); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_5, __pyx_v_endpoint, __pyx_t_7, __pyx_v_datacenter, __pyx_v_rack}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_or_return_host, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error) __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(0, 2114, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); } #else __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __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_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_2), 2) < (0)) __PYX_ERR(0, 2114, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 2114, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_host = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_new = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":2115 * """ * host, new = self.metadata.add_or_return_host(Host(endpoint, self.conviction_policy_factory, datacenter, rack)) * if new and signal: # <<<<<<<<<<<<<< * log.info("New Cassandra host %r discovered", host) * self.on_add(host, refresh_nodes) */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_new); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2115, __pyx_L1_error) if (__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L6_bool_binop_done; } __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_signal); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2115, __pyx_L1_error) __pyx_t_10 = __pyx_t_11; __pyx_L6_bool_binop_done:; if (__pyx_t_10) { /* "cassandra/cluster.py":2116 * host, new = self.metadata.add_or_return_host(Host(endpoint, self.conviction_policy_factory, datacenter, rack)) * if new and signal: * log.info("New Cassandra host %r discovered", host) # <<<<<<<<<<<<<< * self.on_add(host, refresh_nodes) * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_New_Cassandra_host_r_discovered, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2117 * if new and signal: * log.info("New Cassandra host %r discovered", host) * self.on_add(host, refresh_nodes) # <<<<<<<<<<<<<< * * return host, new */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_host, __pyx_v_refresh_nodes}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_add, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2115 * """ * host, new = self.metadata.add_or_return_host(Host(endpoint, self.conviction_policy_factory, datacenter, rack)) * if new and signal: # <<<<<<<<<<<<<< * log.info("New Cassandra host %r discovered", host) * self.on_add(host, refresh_nodes) */ } /* "cassandra/cluster.py":2119 * self.on_add(host, refresh_nodes) * * return host, new # <<<<<<<<<<<<<< * * def remove_host(self, host): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_host); __Pyx_GIVEREF(__pyx_v_host); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_host) != (0)) __PYX_ERR(0, 2119, __pyx_L1_error); __Pyx_INCREF(__pyx_v_new); __Pyx_GIVEREF(__pyx_v_new); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_new) != (0)) __PYX_ERR(0, 2119, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2106 * return is_down * * def add_host(self, endpoint, datacenter=None, rack=None, signal=True, refresh_nodes=True): # <<<<<<<<<<<<<< * """ * Called when adding initial contact points and when the control */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster.Cluster.add_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_new); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2121 * return host, new * * def remove_host(self, host): # <<<<<<<<<<<<<< * """ * Called when the control connection observes that a node has left the */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_91remove_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_90remove_host, "\n Called when the control connection observes that a node has left the\n ring. Intended for internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_91remove_host = {"remove_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_91remove_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_90remove_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_91remove_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2121, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2121, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2121, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove_host", 0) < (0)) __PYX_ERR(0, 2121, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_host", 1, 2, 2, i); __PYX_ERR(0, 2121, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2121, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2121, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_host", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2121, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.remove_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_90remove_host(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_90remove_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { 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; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_host", 0); /* "cassandra/cluster.py":2126 * ring. Intended for internal use only. * """ * if host and self.metadata.remove_host(host): # <<<<<<<<<<<<<< * log.info("Cassandra host %s removed", host) * self.on_remove(host) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_host); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2126, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2126, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":2127 * """ * if host and self.metadata.remove_host(host): * log.info("Cassandra host %s removed", host) # <<<<<<<<<<<<<< * self.on_remove(host) * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Cassandra_host_s_removed, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2128 * if host and self.metadata.remove_host(host): * log.info("Cassandra host %s removed", host) * self.on_remove(host) # <<<<<<<<<<<<<< * * def register_listener(self, listener): */ __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2126 * ring. Intended for internal use only. * """ * if host and self.metadata.remove_host(host): # <<<<<<<<<<<<<< * log.info("Cassandra host %s removed", host) * self.on_remove(host) */ } /* "cassandra/cluster.py":2121 * return host, new * * def remove_host(self, host): # <<<<<<<<<<<<<< * """ * Called when the control connection observes that a node has left the */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); 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_7); __Pyx_AddTraceback("cassandra.cluster.Cluster.remove_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2130 * self.on_remove(host) * * def register_listener(self, listener): # <<<<<<<<<<<<<< * """ * Adds a :class:`cassandra.policies.HostStateListener` subclass instance to */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_93register_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_92register_listener, "\n Adds a :class:`cassandra.policies.HostStateListener` subclass instance to\n the list of listeners to be notified when a host is added, removed,\n marked up, or marked down.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_93register_listener = {"register_listener", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_93register_listener, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_92register_listener}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_93register_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_listener = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("register_listener (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_listener,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2130, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2130, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2130, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "register_listener", 0) < (0)) __PYX_ERR(0, 2130, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("register_listener", 1, 2, 2, i); __PYX_ERR(0, 2130, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2130, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2130, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_listener = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("register_listener", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2130, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.register_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_92register_listener(__pyx_self, __pyx_v_self, __pyx_v_listener); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_92register_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_listener) { 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; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("register_listener", 0); /* "cassandra/cluster.py":2136 * marked up, or marked down. * """ * with self._listener_lock: # <<<<<<<<<<<<<< * self._listeners.add(listener) * */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listener_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2136, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2136, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":2137 * """ * with self._listener_lock: * self._listeners.add(listener) # <<<<<<<<<<<<<< * * def unregister_listener(self, listener): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2137, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_listener}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2136 * marked up, or marked down. * """ * with self._listener_lock: # <<<<<<<<<<<<<< * self._listeners.add(listener) * */ } __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_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("cassandra.cluster.Cluster.register_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 2136, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2136, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2136, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 2136, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 2136, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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:; } /* "cassandra/cluster.py":2130 * self.on_remove(host) * * def register_listener(self, listener): # <<<<<<<<<<<<<< * """ * Adds a :class:`cassandra.policies.HostStateListener` subclass instance to */ /* 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("cassandra.cluster.Cluster.register_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2139 * self._listeners.add(listener) * * def unregister_listener(self, listener): # <<<<<<<<<<<<<< * """ Removes a registered listener. """ * with self._listener_lock: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_95unregister_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_94unregister_listener, " Removes a registered listener. "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_95unregister_listener = {"unregister_listener", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_95unregister_listener, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_94unregister_listener}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_95unregister_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_listener = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unregister_listener (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_listener,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2139, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2139, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2139, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "unregister_listener", 0) < (0)) __PYX_ERR(0, 2139, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("unregister_listener", 1, 2, 2, i); __PYX_ERR(0, 2139, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2139, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2139, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_listener = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("unregister_listener", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2139, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.unregister_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_94unregister_listener(__pyx_self, __pyx_v_self, __pyx_v_listener); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_94unregister_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_listener) { 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; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unregister_listener", 0); /* "cassandra/cluster.py":2141 * def unregister_listener(self, listener): * """ Removes a registered listener. """ * with self._listener_lock: # <<<<<<<<<<<<<< * self._listeners.remove(listener) * */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listener_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":2142 * """ Removes a registered listener. """ * with self._listener_lock: * self._listeners.remove(listener) # <<<<<<<<<<<<<< * * @property */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_listener}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2142, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2141 * def unregister_listener(self, listener): * """ Removes a registered listener. """ * with self._listener_lock: # <<<<<<<<<<<<<< * self._listeners.remove(listener) * */ } __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_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("cassandra.cluster.Cluster.unregister_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 2141, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2141, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2141, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 2141, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 2141, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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:; } /* "cassandra/cluster.py":2139 * self._listeners.add(listener) * * def unregister_listener(self, listener): # <<<<<<<<<<<<<< * """ Removes a registered listener. """ * with self._listener_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("cassandra.cluster.Cluster.unregister_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2144 * self._listeners.remove(listener) * * @property # <<<<<<<<<<<<<< * def listeners(self): * with self._listener_lock: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_97listeners(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_97listeners = {"listeners", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_97listeners, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_97listeners(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("listeners (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2144, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2144, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "listeners", 0) < (0)) __PYX_ERR(0, 2144, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("listeners", 1, 1, 1, i); __PYX_ERR(0, 2144, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2144, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("listeners", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2144, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.listeners", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_96listeners(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_96listeners(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("listeners", 0); /* "cassandra/cluster.py":2146 * @property * def listeners(self): * with self._listener_lock: # <<<<<<<<<<<<<< * return self._listeners.copy() * */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listener_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2146, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2146, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":2147 * def listeners(self): * with self._listener_lock: * return self._listeners.copy() # <<<<<<<<<<<<<< * * def _ensure_core_connections(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_listeners); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2147, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_copy, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2147, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_try_return; /* "cassandra/cluster.py":2146 * @property * def listeners(self): * with self._listener_lock: # <<<<<<<<<<<<<< * return self._listeners.copy() * */ } __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("cassandra.cluster.Cluster.listeners", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 2146, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2146, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2146, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 2146, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 2146, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L11_try_return:; __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_return; __pyx_L8_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); } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_9 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "cassandra/cluster.py":2144 * self._listeners.remove(listener) * * @property # <<<<<<<<<<<<<< * def listeners(self): * with self._listener_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("cassandra.cluster.Cluster.listeners", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2149 * return self._listeners.copy() * * def _ensure_core_connections(self): # <<<<<<<<<<<<<< * """ * If any host has fewer than the configured number of core connections */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_99_ensure_core_connections(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_98_ensure_core_connections, "\n If any host has fewer than the configured number of core connections\n open, attempt to open connections until that number is met.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_99_ensure_core_connections = {"_ensure_core_connections", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_99_ensure_core_connections, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_98_ensure_core_connections}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_99_ensure_core_connections(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ensure_core_connections (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2149, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2149, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_ensure_core_connections", 0) < (0)) __PYX_ERR(0, 2149, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_ensure_core_connections", 1, 1, 1, i); __PYX_ERR(0, 2149, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2149, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_ensure_core_connections", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2149, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._ensure_core_connections", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_98_ensure_core_connections(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_98_ensure_core_connections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_session = NULL; PyObject *__pyx_v_pool = 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 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_core_connections", 0); /* "cassandra/cluster.py":2154 * open, attempt to open connections until that number is met. * """ * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * for pool in tuple(session._pools.values()): * pool.ensure_core_connections() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_sessions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2154, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); #endif ++__pyx_t_3; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_session, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2155 * """ * for session in tuple(self.sessions): * for pool in tuple(session._pools.values()): # <<<<<<<<<<<<<< * pool.ensure_core_connections() * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2155, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); #endif ++__pyx_t_7; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pool, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2156 * for session in tuple(self.sessions): * for pool in tuple(session._pools.values()): * pool.ensure_core_connections() # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_t_4 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_core_connections_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2155 * """ * for session in tuple(self.sessions): * for pool in tuple(session._pools.values()): # <<<<<<<<<<<<<< * pool.ensure_core_connections() * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2154 * open, attempt to open connections until that number is met. * """ * for session in tuple(self.sessions): # <<<<<<<<<<<<<< * for pool in tuple(session._pools.values()): * pool.ensure_core_connections() */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2149 * return self._listeners.copy() * * def _ensure_core_connections(self): # <<<<<<<<<<<<<< * """ * If any host has fewer than the configured number of core connections */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Cluster._ensure_core_connections", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v_pool); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2158 * pool.ensure_core_connections() * * @staticmethod # <<<<<<<<<<<<<< * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_101_validate_refresh_schema(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_101_validate_refresh_schema = {"_validate_refresh_schema", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_101_validate_refresh_schema, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_101_validate_refresh_schema(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_usertype = 0; PyObject *__pyx_v_function = 0; PyObject *__pyx_v_aggregate = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_validate_refresh_schema (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_table,&__pyx_mstate_global->__pyx_n_u_usertype,&__pyx_mstate_global->__pyx_n_u_function,&__pyx_mstate_global->__pyx_n_u_aggregate,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2158, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2158, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2158, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2158, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2158, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2158, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_validate_refresh_schema", 0) < (0)) __PYX_ERR(0, 2158, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_validate_refresh_schema", 1, 5, 5, i); __PYX_ERR(0, 2158, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2158, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2158, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2158, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2158, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2158, __pyx_L3_error) } __pyx_v_keyspace = values[0]; __pyx_v_table = values[1]; __pyx_v_usertype = values[2]; __pyx_v_function = values[3]; __pyx_v_aggregate = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_validate_refresh_schema", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 2158, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._validate_refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_100_validate_refresh_schema(__pyx_self, __pyx_v_keyspace, __pyx_v_table, __pyx_v_usertype, __pyx_v_function, __pyx_v_aggregate); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":2163 * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: # <<<<<<<<<<<<<< * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_6_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 2163, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_2generator3, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Cluster__validate_refresh_schema, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.Cluster._validate_refresh_schema.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 2163, __pyx_L1_error) } if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 2163, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2163, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_e); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2163, __pyx_L1_error) if (__pyx_t_4) { __Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); __pyx_r = __pyx_mstate_global->__pyx_int_1; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L7_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2163, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* 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); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2158 * pool.ensure_core_connections() * * @staticmethod # <<<<<<<<<<<<<< * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_100_validate_refresh_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_table, PyObject *__pyx_v_usertype, PyObject *__pyx_v_function, PyObject *__pyx_v_aggregate) { PyObject *__pyx_gb_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_2generator3 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_validate_refresh_schema", 0); /* "cassandra/cluster.py":2160 * @staticmethod * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): # <<<<<<<<<<<<<< * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") */ __pyx_t_2 = NULL; __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_table); __Pyx_GIVEREF(__pyx_v_table); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_table) != (0)) __PYX_ERR(0, 2160, __pyx_L1_error); __Pyx_INCREF(__pyx_v_usertype); __Pyx_GIVEREF(__pyx_v_usertype); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_usertype) != (0)) __PYX_ERR(0, 2160, __pyx_L1_error); __Pyx_INCREF(__pyx_v_function); __Pyx_GIVEREF(__pyx_v_function); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_function) != (0)) __PYX_ERR(0, 2160, __pyx_L1_error); __Pyx_INCREF(__pyx_v_aggregate); __Pyx_GIVEREF(__pyx_v_aggregate); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_aggregate) != (0)) __PYX_ERR(0, 2160, __pyx_L1_error); __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_any, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":2161 * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): * if not keyspace: # <<<<<<<<<<<<<< * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_keyspace); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2161, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_5); if (unlikely(__pyx_t_6)) { /* "cassandra/cluster.py":2162 * if any((table, usertype, function, aggregate)): * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") # <<<<<<<<<<<<<< * if sum(1 for e in (table, usertype, function) if e) > 1: * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_keyspace_is_required_to_refresh}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __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(0, 2162, __pyx_L1_error) /* "cassandra/cluster.py":2161 * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): * if not keyspace: # <<<<<<<<<<<<<< * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: */ } /* "cassandra/cluster.py":2163 * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: # <<<<<<<<<<<<<< * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * */ __pyx_t_3 = NULL; __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_table); __Pyx_GIVEREF(__pyx_v_table); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_table) != (0)) __PYX_ERR(0, 2163, __pyx_L1_error); __Pyx_INCREF(__pyx_v_usertype); __Pyx_GIVEREF(__pyx_v_usertype); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_usertype) != (0)) __PYX_ERR(0, 2163, __pyx_L1_error); __Pyx_INCREF(__pyx_v_function); __Pyx_GIVEREF(__pyx_v_function); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_function) != (0)) __PYX_ERR(0, 2163, __pyx_L1_error); __pyx_t_7 = __pyx_pf_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_genexpr(NULL, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_sum, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_t_6)) { /* "cassandra/cluster.py":2164 * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_t_1 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_table_usertype_function_aggrega}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_Raise(__pyx_t_7, 0, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __PYX_ERR(0, 2164, __pyx_L1_error) /* "cassandra/cluster.py":2163 * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") * if sum(1 for e in (table, usertype, function) if e) > 1: # <<<<<<<<<<<<<< * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * */ } /* "cassandra/cluster.py":2160 * @staticmethod * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): # <<<<<<<<<<<<<< * if not keyspace: * raise ValueError("keyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}") */ } /* "cassandra/cluster.py":2158 * pool.ensure_core_connections() * * @staticmethod # <<<<<<<<<<<<<< * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster.Cluster._validate_refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_7Cluster_24_validate_refresh_schema_2generator3); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2166 * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * * @staticmethod # <<<<<<<<<<<<<< * def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregate): * if aggregate: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_103_target_type_from_refresh_args(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_103_target_type_from_refresh_args = {"_target_type_from_refresh_args", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_103_target_type_from_refresh_args, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_103_target_type_from_refresh_args(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_usertype = 0; PyObject *__pyx_v_function = 0; PyObject *__pyx_v_aggregate = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_target_type_from_refresh_args (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_table,&__pyx_mstate_global->__pyx_n_u_usertype,&__pyx_mstate_global->__pyx_n_u_function,&__pyx_mstate_global->__pyx_n_u_aggregate,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2166, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2166, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2166, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2166, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2166, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2166, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_target_type_from_refresh_args", 0) < (0)) __PYX_ERR(0, 2166, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_target_type_from_refresh_args", 1, 5, 5, i); __PYX_ERR(0, 2166, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2166, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2166, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2166, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2166, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2166, __pyx_L3_error) } __pyx_v_keyspace = values[0]; __pyx_v_table = values[1]; __pyx_v_usertype = values[2]; __pyx_v_function = values[3]; __pyx_v_aggregate = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_target_type_from_refresh_args", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 2166, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._target_type_from_refresh_args", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_102_target_type_from_refresh_args(__pyx_self, __pyx_v_keyspace, __pyx_v_table, __pyx_v_usertype, __pyx_v_function, __pyx_v_aggregate); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_102_target_type_from_refresh_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_table, PyObject *__pyx_v_usertype, PyObject *__pyx_v_function, PyObject *__pyx_v_aggregate) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_target_type_from_refresh_args", 0); /* "cassandra/cluster.py":2168 * @staticmethod * def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregate): * if aggregate: # <<<<<<<<<<<<<< * return SchemaTargetType.AGGREGATE * elif function: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_aggregate); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2168, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2169 * def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregate): * if aggregate: * return SchemaTargetType.AGGREGATE # <<<<<<<<<<<<<< * elif function: * return SchemaTargetType.FUNCTION */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_AGGREGATE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2168 * @staticmethod * def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregate): * if aggregate: # <<<<<<<<<<<<<< * return SchemaTargetType.AGGREGATE * elif function: */ } /* "cassandra/cluster.py":2170 * if aggregate: * return SchemaTargetType.AGGREGATE * elif function: # <<<<<<<<<<<<<< * return SchemaTargetType.FUNCTION * elif usertype: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_function); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2170, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2171 * return SchemaTargetType.AGGREGATE * elif function: * return SchemaTargetType.FUNCTION # <<<<<<<<<<<<<< * elif usertype: * return SchemaTargetType.TYPE */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_FUNCTION); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __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; /* "cassandra/cluster.py":2170 * if aggregate: * return SchemaTargetType.AGGREGATE * elif function: # <<<<<<<<<<<<<< * return SchemaTargetType.FUNCTION * elif usertype: */ } /* "cassandra/cluster.py":2172 * elif function: * return SchemaTargetType.FUNCTION * elif usertype: # <<<<<<<<<<<<<< * return SchemaTargetType.TYPE * elif table: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_usertype); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2172, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2173 * return SchemaTargetType.FUNCTION * elif usertype: * return SchemaTargetType.TYPE # <<<<<<<<<<<<<< * elif table: * return SchemaTargetType.TABLE */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TYPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2172 * elif function: * return SchemaTargetType.FUNCTION * elif usertype: # <<<<<<<<<<<<<< * return SchemaTargetType.TYPE * elif table: */ } /* "cassandra/cluster.py":2174 * elif usertype: * return SchemaTargetType.TYPE * elif table: # <<<<<<<<<<<<<< * return SchemaTargetType.TABLE * elif keyspace: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_table); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2174, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2175 * return SchemaTargetType.TYPE * elif table: * return SchemaTargetType.TABLE # <<<<<<<<<<<<<< * elif keyspace: * return SchemaTargetType.KEYSPACE */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_TABLE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2175, __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; /* "cassandra/cluster.py":2174 * elif usertype: * return SchemaTargetType.TYPE * elif table: # <<<<<<<<<<<<<< * return SchemaTargetType.TABLE * elif keyspace: */ } /* "cassandra/cluster.py":2176 * elif table: * return SchemaTargetType.TABLE * elif keyspace: # <<<<<<<<<<<<<< * return SchemaTargetType.KEYSPACE * return None */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_keyspace); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2176, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2177 * return SchemaTargetType.TABLE * elif keyspace: * return SchemaTargetType.KEYSPACE # <<<<<<<<<<<<<< * return None * */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KEYSPACE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2176 * elif table: * return SchemaTargetType.TABLE * elif keyspace: # <<<<<<<<<<<<<< * return SchemaTargetType.KEYSPACE * return None */ } /* "cassandra/cluster.py":2178 * elif keyspace: * return SchemaTargetType.KEYSPACE * return None # <<<<<<<<<<<<<< * * def get_control_connection_host(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2166 * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * * @staticmethod # <<<<<<<<<<<<<< * def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregate): * if aggregate: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Cluster._target_type_from_refresh_args", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2180 * return None * * def get_control_connection_host(self): # <<<<<<<<<<<<<< * """ * Returns the control connection host metadata. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_105get_control_connection_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_104get_control_connection_host, "\n Returns the control connection host metadata.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_105get_control_connection_host = {"get_control_connection_host", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_105get_control_connection_host, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_104get_control_connection_host}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_105get_control_connection_host(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_control_connection_host (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2180, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2180, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_control_connection_host", 0) < (0)) __PYX_ERR(0, 2180, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_control_connection_host", 1, 1, 1, i); __PYX_ERR(0, 2180, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2180, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_control_connection_host", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2180, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.get_control_connection_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_104get_control_connection_host(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_104get_control_connection_host(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_connection = NULL; PyObject *__pyx_v_endpoint = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_control_connection_host", 0); /* "cassandra/cluster.py":2184 * Returns the control connection host metadata. * """ * connection = self.control_connection._connection # <<<<<<<<<<<<<< * endpoint = connection.endpoint if connection else None * return self.metadata.get_host(endpoint) if endpoint else None */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_connection = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":2185 * """ * connection = self.control_connection._connection * endpoint = connection.endpoint if connection else None # <<<<<<<<<<<<<< * return self.metadata.get_host(endpoint) if endpoint else None * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_connection); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2185, __pyx_L1_error) if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_2 = Py_None; } __pyx_v_endpoint = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":2186 * connection = self.control_connection._connection * endpoint = connection.endpoint if connection else None * return self.metadata.get_host(endpoint) if endpoint else None # <<<<<<<<<<<<<< * * def refresh_schema_metadata(self, max_schema_agreement_wait=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_endpoint); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2186, __pyx_L1_error) if (__pyx_t_3) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_endpoint}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_2 = Py_None; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2180 * return None * * def get_control_connection_host(self): # <<<<<<<<<<<<<< * """ * Returns the control connection host metadata. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.get_control_connection_host", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_connection); __Pyx_XDECREF(__pyx_v_endpoint); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2188 * return self.metadata.get_host(endpoint) if endpoint else None * * def refresh_schema_metadata(self, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh all schema metadata. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_107refresh_schema_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_106refresh_schema_metadata, "\n Synchronously refresh all schema metadata.\n\n By default, the timeout for this operation is governed by :attr:`~.Cluster.max_schema_agreement_wait`\n and :attr:`~.Cluster.control_connection_timeout`.\n\n Passing max_schema_agreement_wait here overrides :attr:`~.Cluster.max_schema_agreement_wait`.\n\n Setting max_schema_agreement_wait <= 0 will bypass schema agreement and refresh schema immediately.\n\n An Exception is raised if schema refresh fails for any reason.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_107refresh_schema_metadata = {"refresh_schema_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_107refresh_schema_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_106refresh_schema_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_107refresh_schema_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_schema_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2188, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2188, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2188, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_schema_metadata", 0) < (0)) __PYX_ERR(0, 2188, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_schema_metadata", 0, 1, 2, i); __PYX_ERR(0, 2188, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2188, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2188, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_max_schema_agreement_wait = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_schema_metadata", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2188, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_schema_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_106refresh_schema_metadata(__pyx_self, __pyx_v_self, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_106refresh_schema_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_schema_agreement_wait) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_schema_metadata", 0); /* "cassandra/cluster.py":2201 * An Exception is raised if schema refresh fails for any reason. * """ * if not self.control_connection.refresh_schema(schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("Schema metadata was not refreshed. See log for details.") * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2201, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2201, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (!__pyx_t_6); if (unlikely(__pyx_t_7)) { /* "cassandra/cluster.py":2202 * """ * if not self.control_connection.refresh_schema(schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Schema metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_keyspace_metadata(self, keyspace, max_schema_agreement_wait=None): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Schema_metadata_was_not_refreshe}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __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(0, 2202, __pyx_L1_error) /* "cassandra/cluster.py":2201 * An Exception is raised if schema refresh fails for any reason. * """ * if not self.control_connection.refresh_schema(schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("Schema metadata was not refreshed. See log for details.") * */ } /* "cassandra/cluster.py":2188 * return self.metadata.get_host(endpoint) if endpoint else None * * def refresh_schema_metadata(self, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh all schema metadata. */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_schema_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2204 * raise DriverException("Schema metadata was not refreshed. See log for details.") * * def refresh_keyspace_metadata(self, keyspace, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh keyspace metadata. This applies to keyspace-level information such as replication */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_109refresh_keyspace_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_108refresh_keyspace_metadata, "\n Synchronously refresh keyspace metadata. This applies to keyspace-level information such as replication\n and durability settings. It does not refresh tables, types, etc. contained in the keyspace.\n\n See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_109refresh_keyspace_metadata = {"refresh_keyspace_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_109refresh_keyspace_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_108refresh_keyspace_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_109refresh_keyspace_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_keyspace_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2204, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2204, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2204, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2204, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_keyspace_metadata", 0) < (0)) __PYX_ERR(0, 2204, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_keyspace_metadata", 0, 2, 3, i); __PYX_ERR(0, 2204, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2204, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2204, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2204, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_max_schema_agreement_wait = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_keyspace_metadata", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 2204, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_keyspace_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_108refresh_keyspace_metadata(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_108refresh_keyspace_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_max_schema_agreement_wait) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_keyspace_metadata", 0); /* "cassandra/cluster.py":2211 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.KEYSPACE, keyspace=keyspace, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Keyspace metadata was not refreshed. See log for details.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_KEYSPACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2212 * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.KEYSPACE, keyspace=keyspace, * schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("Keyspace metadata was not refreshed. See log for details.") * */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target_type, __pyx_t_5, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2211, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2211, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2211, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2211, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":2211 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.KEYSPACE, keyspace=keyspace, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Keyspace metadata was not refreshed. See log for details.") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (!__pyx_t_7); if (unlikely(__pyx_t_8)) { /* "cassandra/cluster.py":2213 * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.KEYSPACE, keyspace=keyspace, * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Keyspace metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_table_metadata(self, keyspace, table, max_schema_agreement_wait=None): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Keyspace_metadata_was_not_refres}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2213, __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(0, 2213, __pyx_L1_error) /* "cassandra/cluster.py":2211 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.KEYSPACE, keyspace=keyspace, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Keyspace metadata was not refreshed. See log for details.") */ } /* "cassandra/cluster.py":2204 * raise DriverException("Schema metadata was not refreshed. See log for details.") * * def refresh_keyspace_metadata(self, keyspace, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh keyspace metadata. This applies to keyspace-level information such as replication */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_keyspace_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2215 * raise DriverException("Keyspace metadata was not refreshed. See log for details.") * * def refresh_table_metadata(self, keyspace, table, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh table metadata. This applies to a table, and any triggers or indexes attached */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_111refresh_table_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_110refresh_table_metadata, "\n Synchronously refresh table metadata. This applies to a table, and any triggers or indexes attached\n to the table.\n\n See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_111refresh_table_metadata = {"refresh_table_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_111refresh_table_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_110refresh_table_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_111refresh_table_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_table = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_table_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_table,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2215, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_table_metadata", 0) < (0)) __PYX_ERR(0, 2215, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_table_metadata", 0, 3, 4, i); __PYX_ERR(0, 2215, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2215, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2215, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2215, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2215, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_table = values[2]; __pyx_v_max_schema_agreement_wait = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_table_metadata", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 2215, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_table_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_110refresh_table_metadata(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_table, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_110refresh_table_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_table, PyObject *__pyx_v_max_schema_agreement_wait) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_table_metadata", 0); /* "cassandra/cluster.py":2222 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=table, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Table metadata was not refreshed. See log for details.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TABLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2223 * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=table, * schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("Table metadata was not refreshed. See log for details.") * */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target_type, __pyx_t_5, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2222, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2222, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_table, __pyx_v_table, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2222, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2222, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_4, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 2222, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":2222 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=table, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Table metadata was not refreshed. See log for details.") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (!__pyx_t_7); if (unlikely(__pyx_t_8)) { /* "cassandra/cluster.py":2224 * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=table, * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Table metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_materialized_view_metadata(self, keyspace, view, max_schema_agreement_wait=None): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Table_metadata_was_not_refreshed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2224, __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(0, 2224, __pyx_L1_error) /* "cassandra/cluster.py":2222 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=table, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("Table metadata was not refreshed. See log for details.") */ } /* "cassandra/cluster.py":2215 * raise DriverException("Keyspace metadata was not refreshed. See log for details.") * * def refresh_table_metadata(self, keyspace, table, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh table metadata. This applies to a table, and any triggers or indexes attached */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_table_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2226 * raise DriverException("Table metadata was not refreshed. See log for details.") * * def refresh_materialized_view_metadata(self, keyspace, view, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh materialized view metadata. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_113refresh_materialized_view_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_112refresh_materialized_view_metadata, "\n Synchronously refresh materialized view metadata.\n\n See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_113refresh_materialized_view_metadata = {"refresh_materialized_view_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_113refresh_materialized_view_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_112refresh_materialized_view_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_113refresh_materialized_view_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_view = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_materialized_view_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_view,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2226, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_materialized_view_metadata", 0) < (0)) __PYX_ERR(0, 2226, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_materialized_view_metadata", 0, 3, 4, i); __PYX_ERR(0, 2226, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2226, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2226, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2226, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_view = values[2]; __pyx_v_max_schema_agreement_wait = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_materialized_view_metadata", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 2226, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_materialized_view_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_112refresh_materialized_view_metadata(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_view, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_112refresh_materialized_view_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_view, PyObject *__pyx_v_max_schema_agreement_wait) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_materialized_view_metadata", 0); /* "cassandra/cluster.py":2232 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=view, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("View metadata was not refreshed. See log for details.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TABLE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2233 * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=view, * schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("View metadata was not refreshed. See log for details.") * */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target_type, __pyx_t_5, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2232, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2232, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_table, __pyx_v_view, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2232, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2232, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_4, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 2232, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":2232 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=view, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("View metadata was not refreshed. See log for details.") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (!__pyx_t_7); if (unlikely(__pyx_t_8)) { /* "cassandra/cluster.py":2234 * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=view, * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("View metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_user_type_metadata(self, keyspace, user_type, max_schema_agreement_wait=None): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_View_metadata_was_not_refreshed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2234, __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(0, 2234, __pyx_L1_error) /* "cassandra/cluster.py":2232 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TABLE, keyspace=keyspace, table=view, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("View metadata was not refreshed. See log for details.") */ } /* "cassandra/cluster.py":2226 * raise DriverException("Table metadata was not refreshed. See log for details.") * * def refresh_materialized_view_metadata(self, keyspace, view, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh materialized view metadata. */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_materialized_view_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2236 * raise DriverException("View metadata was not refreshed. See log for details.") * * def refresh_user_type_metadata(self, keyspace, user_type, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined type metadata. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_115refresh_user_type_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_114refresh_user_type_metadata, "\n Synchronously refresh user defined type metadata.\n\n See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_115refresh_user_type_metadata = {"refresh_user_type_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_115refresh_user_type_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_114refresh_user_type_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_115refresh_user_type_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_user_type = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_user_type_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_user_type,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2236, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2236, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2236, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2236, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2236, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_user_type_metadata", 0) < (0)) __PYX_ERR(0, 2236, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_user_type_metadata", 0, 3, 4, i); __PYX_ERR(0, 2236, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2236, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2236, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2236, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2236, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_user_type = values[2]; __pyx_v_max_schema_agreement_wait = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_user_type_metadata", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 2236, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_user_type_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_114refresh_user_type_metadata(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_user_type, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_114refresh_user_type_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_user_type, PyObject *__pyx_v_max_schema_agreement_wait) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_user_type_metadata", 0); /* "cassandra/cluster.py":2242 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TYPE, keyspace=keyspace, type=user_type, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Type metadata was not refreshed. See log for details.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TYPE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2243 * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TYPE, keyspace=keyspace, type=user_type, * schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("User Type metadata was not refreshed. See log for details.") * */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target_type, __pyx_t_5, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2242, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2242, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_type, __pyx_v_user_type, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2242, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2242, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_4, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 2242, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":2242 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TYPE, keyspace=keyspace, type=user_type, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Type metadata was not refreshed. See log for details.") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (!__pyx_t_7); if (unlikely(__pyx_t_8)) { /* "cassandra/cluster.py":2244 * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TYPE, keyspace=keyspace, type=user_type, * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Type metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_user_function_metadata(self, keyspace, function, max_schema_agreement_wait=None): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_User_Type_metadata_was_not_refre}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2244, __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(0, 2244, __pyx_L1_error) /* "cassandra/cluster.py":2242 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.TYPE, keyspace=keyspace, type=user_type, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Type metadata was not refreshed. See log for details.") */ } /* "cassandra/cluster.py":2236 * raise DriverException("View metadata was not refreshed. See log for details.") * * def refresh_user_type_metadata(self, keyspace, user_type, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined type metadata. */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_user_type_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2246 * raise DriverException("User Type metadata was not refreshed. See log for details.") * * def refresh_user_function_metadata(self, keyspace, function, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined function metadata. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_117refresh_user_function_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_116refresh_user_function_metadata, "\n Synchronously refresh user defined function metadata.\n\n ``function`` is a :class:`cassandra.UserFunctionDescriptor`.\n\n See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_117refresh_user_function_metadata = {"refresh_user_function_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_117refresh_user_function_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_116refresh_user_function_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_117refresh_user_function_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_function = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_user_function_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_function,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2246, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2246, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2246, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2246, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2246, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_user_function_metadata", 0) < (0)) __PYX_ERR(0, 2246, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_user_function_metadata", 0, 3, 4, i); __PYX_ERR(0, 2246, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2246, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2246, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2246, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2246, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_function = values[2]; __pyx_v_max_schema_agreement_wait = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_user_function_metadata", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 2246, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_user_function_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_116refresh_user_function_metadata(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_function, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_116refresh_user_function_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_function, PyObject *__pyx_v_max_schema_agreement_wait) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_user_function_metadata", 0); /* "cassandra/cluster.py":2254 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.FUNCTION, keyspace=keyspace, function=function, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Function metadata was not refreshed. See log for details.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FUNCTION); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2255 * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.FUNCTION, keyspace=keyspace, function=function, * schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("User Function metadata was not refreshed. See log for details.") * */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target_type, __pyx_t_5, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2254, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2254, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_function, __pyx_v_function, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2254, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2254, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_4, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 2254, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":2254 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.FUNCTION, keyspace=keyspace, function=function, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Function metadata was not refreshed. See log for details.") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (!__pyx_t_7); if (unlikely(__pyx_t_8)) { /* "cassandra/cluster.py":2256 * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.FUNCTION, keyspace=keyspace, function=function, * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Function metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_user_aggregate_metadata(self, keyspace, aggregate, max_schema_agreement_wait=None): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_User_Function_metadata_was_not_r}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2256, __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(0, 2256, __pyx_L1_error) /* "cassandra/cluster.py":2254 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.FUNCTION, keyspace=keyspace, function=function, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Function metadata was not refreshed. See log for details.") */ } /* "cassandra/cluster.py":2246 * raise DriverException("User Type metadata was not refreshed. See log for details.") * * def refresh_user_function_metadata(self, keyspace, function, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined function metadata. */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_user_function_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2258 * raise DriverException("User Function metadata was not refreshed. See log for details.") * * def refresh_user_aggregate_metadata(self, keyspace, aggregate, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined aggregate metadata. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_119refresh_user_aggregate_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_118refresh_user_aggregate_metadata, "\n Synchronously refresh user defined aggregate metadata.\n\n ``aggregate`` is a :class:`cassandra.UserAggregateDescriptor`.\n\n See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_119refresh_user_aggregate_metadata = {"refresh_user_aggregate_metadata", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_119refresh_user_aggregate_metadata, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_118refresh_user_aggregate_metadata}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_119refresh_user_aggregate_metadata(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_aggregate = 0; PyObject *__pyx_v_max_schema_agreement_wait = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_user_aggregate_metadata (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_aggregate,&__pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2258, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2258, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2258, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2258, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2258, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_user_aggregate_metadata", 0) < (0)) __PYX_ERR(0, 2258, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_user_aggregate_metadata", 0, 3, 4, i); __PYX_ERR(0, 2258, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2258, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2258, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2258, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2258, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_aggregate = values[2]; __pyx_v_max_schema_agreement_wait = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_user_aggregate_metadata", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 2258, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_user_aggregate_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_118refresh_user_aggregate_metadata(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_aggregate, __pyx_v_max_schema_agreement_wait); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_118refresh_user_aggregate_metadata(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_aggregate, PyObject *__pyx_v_max_schema_agreement_wait) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_user_aggregate_metadata", 0); /* "cassandra/cluster.py":2266 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.AGGREGATE, keyspace=keyspace, aggregate=aggregate, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SchemaTargetType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_AGGREGATE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2267 * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.AGGREGATE, keyspace=keyspace, aggregate=aggregate, * schema_agreement_wait=max_schema_agreement_wait, force=True): # <<<<<<<<<<<<<< * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") * */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_target_type, __pyx_t_5, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2266, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2266, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_aggregate, __pyx_v_aggregate, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2266, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_v_max_schema_agreement_wait, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2266, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force, Py_True, __pyx_t_4, __pyx_callargs+1, 4) < (0)) __PYX_ERR(0, 2266, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":2266 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.AGGREGATE, keyspace=keyspace, aggregate=aggregate, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (!__pyx_t_7); if (unlikely(__pyx_t_8)) { /* "cassandra/cluster.py":2268 * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.AGGREGATE, keyspace=keyspace, aggregate=aggregate, * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def refresh_nodes(self, force_token_rebuild=False): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_User_Aggregate_metadata_was_not}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 2268, __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(0, 2268, __pyx_L1_error) /* "cassandra/cluster.py":2266 * See :meth:`~.Cluster.refresh_schema_metadata` for description of ``max_schema_agreement_wait`` behavior * """ * if not self.control_connection.refresh_schema(target_type=SchemaTargetType.AGGREGATE, keyspace=keyspace, aggregate=aggregate, # <<<<<<<<<<<<<< * schema_agreement_wait=max_schema_agreement_wait, force=True): * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") */ } /* "cassandra/cluster.py":2258 * raise DriverException("User Function metadata was not refreshed. See log for details.") * * def refresh_user_aggregate_metadata(self, keyspace, aggregate, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined aggregate metadata. */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_user_aggregate_metadata", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2270 * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") * * def refresh_nodes(self, force_token_rebuild=False): # <<<<<<<<<<<<<< * """ * Synchronously refresh the node list and token metadata */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_121refresh_nodes(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_120refresh_nodes, "\n Synchronously refresh the node list and token metadata\n\n `force_token_rebuild` can be used to rebuild the token map metadata, even if no new nodes are discovered.\n\n An Exception is raised if node refresh fails for any reason.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_121refresh_nodes = {"refresh_nodes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_121refresh_nodes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_120refresh_nodes}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_121refresh_nodes(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_force_token_rebuild = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_nodes (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_force_token_rebuild,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2270, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2270, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2270, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_nodes", 0) < (0)) __PYX_ERR(0, 2270, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_nodes", 0, 1, 2, i); __PYX_ERR(0, 2270, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2270, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2270, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_force_token_rebuild = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_nodes", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 2270, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.refresh_nodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_120refresh_nodes(__pyx_self, __pyx_v_self, __pyx_v_force_token_rebuild); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_120refresh_nodes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_force_token_rebuild) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_nodes", 0); /* "cassandra/cluster.py":2278 * An Exception is raised if node refresh fails for any reason. * """ * if not self.control_connection.refresh_node_list_and_token_map(force_token_rebuild): # <<<<<<<<<<<<<< * raise DriverException("Node list was not refreshed. See log for details.") * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_force_token_rebuild}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (!__pyx_t_5); if (unlikely(__pyx_t_6)) { /* "cassandra/cluster.py":2279 * """ * if not self.control_connection.refresh_node_list_and_token_map(force_token_rebuild): * raise DriverException("Node list was not refreshed. See log for details.") # <<<<<<<<<<<<<< * * def set_meta_refresh_enabled(self, enabled): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Node_list_was_not_refreshed_See}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2279, __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(0, 2279, __pyx_L1_error) /* "cassandra/cluster.py":2278 * An Exception is raised if node refresh fails for any reason. * """ * if not self.control_connection.refresh_node_list_and_token_map(force_token_rebuild): # <<<<<<<<<<<<<< * raise DriverException("Node list was not refreshed. See log for details.") * */ } /* "cassandra/cluster.py":2270 * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") * * def refresh_nodes(self, force_token_rebuild=False): # <<<<<<<<<<<<<< * """ * Synchronously refresh the node list and token metadata */ /* 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("cassandra.cluster.Cluster.refresh_nodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2281 * raise DriverException("Node list was not refreshed. See log for details.") * * def set_meta_refresh_enabled(self, enabled): # <<<<<<<<<<<<<< * """ * *Deprecated:* set :attr:`~.Cluster.schema_metadata_enabled` :attr:`~.Cluster.token_metadata_enabled` instead */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_123set_meta_refresh_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Cluster_122set_meta_refresh_enabled, "\n *Deprecated:* set :attr:`~.Cluster.schema_metadata_enabled` :attr:`~.Cluster.token_metadata_enabled` instead\n\n Sets a flag to enable (True) or disable (False) all metadata refresh queries.\n This applies to both schema and node topology.\n\n Disabling this is useful to minimize refreshes during multiple changes.\n\n Meta refresh must be enabled for the driver to become aware of any cluster\n topology changes or schema updates.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_123set_meta_refresh_enabled = {"set_meta_refresh_enabled", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_123set_meta_refresh_enabled, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Cluster_122set_meta_refresh_enabled}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_123set_meta_refresh_enabled(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_enabled = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_meta_refresh_enabled (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_enabled,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2281, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2281, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2281, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_meta_refresh_enabled", 0) < (0)) __PYX_ERR(0, 2281, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_meta_refresh_enabled", 1, 2, 2, i); __PYX_ERR(0, 2281, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2281, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2281, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_enabled = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_meta_refresh_enabled", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2281, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.set_meta_refresh_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_122set_meta_refresh_enabled(__pyx_self, __pyx_v_self, __pyx_v_enabled); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_122set_meta_refresh_enabled(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_enabled) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_meta_refresh_enabled", 0); /* "cassandra/cluster.py":2293 * topology changes or schema updates. * """ * warn("Cluster.set_meta_refresh_enabled is deprecated and will be removed in 4.0. Set " # <<<<<<<<<<<<<< * "Cluster.schema_metadata_enabled and Cluster.token_metadata_enabled instead.", DeprecationWarning) * self.schema_metadata_enabled = enabled */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "cassandra/cluster.py":2294 * """ * warn("Cluster.set_meta_refresh_enabled is deprecated and will be removed in 4.0. Set " * "Cluster.schema_metadata_enabled and Cluster.token_metadata_enabled instead.", DeprecationWarning) # <<<<<<<<<<<<<< * self.schema_metadata_enabled = enabled * self.token_metadata_enabled = enabled */ __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Cluster_set_meta_refresh_enabled, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2295 * warn("Cluster.set_meta_refresh_enabled is deprecated and will be removed in 4.0. Set " * "Cluster.schema_metadata_enabled and Cluster.token_metadata_enabled instead.", DeprecationWarning) * self.schema_metadata_enabled = enabled # <<<<<<<<<<<<<< * self.token_metadata_enabled = enabled * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_metadata_enabled, __pyx_v_enabled) < (0)) __PYX_ERR(0, 2295, __pyx_L1_error) /* "cassandra/cluster.py":2296 * "Cluster.schema_metadata_enabled and Cluster.token_metadata_enabled instead.", DeprecationWarning) * self.schema_metadata_enabled = enabled * self.token_metadata_enabled = enabled # <<<<<<<<<<<<<< * * @classmethod */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_metadata_enabled, __pyx_v_enabled) < (0)) __PYX_ERR(0, 2296, __pyx_L1_error) /* "cassandra/cluster.py":2281 * raise DriverException("Node list was not refreshed. See log for details.") * * def set_meta_refresh_enabled(self, enabled): # <<<<<<<<<<<<<< * """ * *Deprecated:* set :attr:`~.Cluster.schema_metadata_enabled` :attr:`~.Cluster.token_metadata_enabled` instead */ /* 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("cassandra.cluster.Cluster.set_meta_refresh_enabled", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2298 * self.token_metadata_enabled = enabled * * @classmethod # <<<<<<<<<<<<<< * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_125_send_chunks(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_125_send_chunks = {"_send_chunks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_125_send_chunks, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_125_send_chunks(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_cls = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_chunks = 0; PyObject *__pyx_v_set_keyspace = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_send_chunks (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_chunks,&__pyx_mstate_global->__pyx_n_u_set_keyspace,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2298, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_send_chunks", 0) < (0)) __PYX_ERR(0, 2298, __pyx_L3_error) /* "cassandra/cluster.py":2299 * * @classmethod * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): # <<<<<<<<<<<<<< * for ks_chunk in chunks: * messages = [PrepareMessage(query=s.query_string, */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_send_chunks", 0, 4, 5, i); __PYX_ERR(0, 2298, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2298, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2298, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2298, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2298, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_cls = values[0]; __pyx_v_connection = values[1]; __pyx_v_host = values[2]; __pyx_v_chunks = values[3]; __pyx_v_set_keyspace = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_send_chunks", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 2298, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._send_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_124_send_chunks(__pyx_self, __pyx_v_cls, __pyx_v_connection, __pyx_v_host, __pyx_v_chunks, __pyx_v_set_keyspace); /* "cassandra/cluster.py":2298 * self.token_metadata_enabled = enabled * * @classmethod # <<<<<<<<<<<<<< * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_124_send_chunks(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_connection, PyObject *__pyx_v_host, PyObject *__pyx_v_chunks, PyObject *__pyx_v_set_keyspace) { PyObject *__pyx_v_ks_chunk = NULL; PyObject *__pyx_v_messages = NULL; PyObject *__pyx_v_responses = NULL; PyObject *__pyx_v_success = NULL; PyObject *__pyx_v_response = NULL; PyObject *__pyx_9genexpr14__pyx_v_s = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); 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 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; size_t __pyx_t_15; PyObject *(*__pyx_t_16)(PyObject *); int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_send_chunks", 0); /* "cassandra/cluster.py":2300 * @classmethod * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: # <<<<<<<<<<<<<< * messages = [PrepareMessage(query=s.query_string, * keyspace=s.keyspace if set_keyspace else None) */ if (likely(PyList_CheckExact(__pyx_v_chunks)) || PyTuple_CheckExact(__pyx_v_chunks)) { __pyx_t_1 = __pyx_v_chunks; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_chunks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2300, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2300, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2300, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2300, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_ks_chunk, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2301 * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: * messages = [PrepareMessage(query=s.query_string, # <<<<<<<<<<<<<< * keyspace=s.keyspace if set_keyspace else None) * for s in ks_chunk] */ { /* enter inner scope */ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2301, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":2303 * messages = [PrepareMessage(query=s.query_string, * keyspace=s.keyspace if set_keyspace else None) * for s in ks_chunk] # <<<<<<<<<<<<<< * # TODO: make this timeout configurable somehow? * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) */ if (likely(PyList_CheckExact(__pyx_v_ks_chunk)) || PyTuple_CheckExact(__pyx_v_ks_chunk)) { __pyx_t_5 = __pyx_v_ks_chunk; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_ks_chunk); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2303, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2303, __pyx_L7_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2303, __pyx_L7_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_5, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2303, __pyx_L7_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6)); #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); #endif ++__pyx_t_6; } if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2303, __pyx_L7_error) } else { __pyx_t_8 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2303, __pyx_L7_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_s, __pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":2301 * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: * messages = [PrepareMessage(query=s.query_string, # <<<<<<<<<<<<<< * keyspace=s.keyspace if set_keyspace else None) * for s in ks_chunk] */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PrepareMessage); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2301, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr14__pyx_v_s, __pyx_mstate_global->__pyx_n_u_query_string); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2301, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":2302 * for ks_chunk in chunks: * messages = [PrepareMessage(query=s.query_string, * keyspace=s.keyspace if set_keyspace else None) # <<<<<<<<<<<<<< * for s in ks_chunk] * # TODO: make this timeout configurable somehow? */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_set_keyspace); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2302, __pyx_L7_error) if (__pyx_t_13) { __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr14__pyx_v_s, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2302, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = __pyx_t_14; __pyx_t_14 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_12 = Py_None; } __pyx_t_15 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_15 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, NULL}; __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2301, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_t_11, __pyx_t_14, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2301, __pyx_L7_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_t_12, __pyx_t_14, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2301, __pyx_L7_error) __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_15, (1-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2301, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); } if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 2301, __pyx_L7_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":2303 * messages = [PrepareMessage(query=s.query_string, * keyspace=s.keyspace if set_keyspace else None) * for s in ks_chunk] # <<<<<<<<<<<<<< * # TODO: make this timeout configurable somehow? * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_s); __pyx_9genexpr14__pyx_v_s = 0; goto __pyx_L11_exit_scope; __pyx_L7_error:; __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_s); __pyx_9genexpr14__pyx_v_s = 0; goto __pyx_L1_error; __pyx_L11_exit_scope:; } /* exit inner scope */ __Pyx_XDECREF_SET(__pyx_v_messages, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "cassandra/cluster.py":2305 * for s in ks_chunk] * # TODO: make this timeout configurable somehow? * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) # <<<<<<<<<<<<<< * for success, response in responses: * if not success: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_wait_for_responses); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PySequence_Tuple(__pyx_v_messages); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_timeout, __pyx_mstate_global->__pyx_float_5_0) < (0)) __PYX_ERR(0, 2305, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_fail_on_error, Py_False) < (0)) __PYX_ERR(0, 2305, __pyx_L1_error) __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_v_responses, __pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2306 * # TODO: make this timeout configurable somehow? * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) * for success, response in responses: # <<<<<<<<<<<<<< * if not success: * log.debug("Got unexpected response when preparing " */ if (likely(PyList_CheckExact(__pyx_v_responses)) || PyTuple_CheckExact(__pyx_v_responses)) { __pyx_t_10 = __pyx_v_responses; __Pyx_INCREF(__pyx_t_10); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { __pyx_t_6 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_responses); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2306, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_10))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2306, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } __pyx_t_8 = __Pyx_PyList_GetItemRefFast(__pyx_t_10, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2306, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_8 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_6)); #else __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_6); #endif ++__pyx_t_6; } if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2306, __pyx_L1_error) } else { __pyx_t_8 = __pyx_t_7(__pyx_t_10); if (unlikely(!__pyx_t_8)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2306, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_8); if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) { PyObject* sequence = __pyx_t_8; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 2306, __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_INCREF(__pyx_t_5); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_4); } else { __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); } #else __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else { Py_ssize_t index = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_14); index = 0; __pyx_t_5 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_16(__pyx_t_14); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_14), 2) < (0)) __PYX_ERR(0, 2306, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L15_unpacking_done; __pyx_L14_unpacking_failed:; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 2306, __pyx_L1_error) __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_success, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_response, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2307 * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) * for success, response in responses: * if not success: # <<<<<<<<<<<<<< * log.debug("Got unexpected response when preparing " * "statement on host %s: %r", host, response) */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_success); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 2307, __pyx_L1_error) __pyx_t_17 = (!__pyx_t_13); if (__pyx_t_17) { /* "cassandra/cluster.py":2308 * for success, response in responses: * if not success: * log.debug("Got unexpected response when preparing " # <<<<<<<<<<<<<< * "statement on host %s: %r", host, response) * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2309 * if not success: * log.debug("Got unexpected response when preparing " * "statement on host %s: %r", host, response) # <<<<<<<<<<<<<< * * def _prepare_all_queries(self, host): */ __pyx_t_15 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_14); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); __pyx_t_15 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Got_unexpected_response_when_pre, __pyx_v_host, __pyx_v_response}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_15, (4-__pyx_t_15) | (__pyx_t_15*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":2307 * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) * for success, response in responses: * if not success: # <<<<<<<<<<<<<< * log.debug("Got unexpected response when preparing " * "statement on host %s: %r", host, response) */ } /* "cassandra/cluster.py":2306 * # TODO: make this timeout configurable somehow? * responses = connection.wait_for_responses(*messages, timeout=5.0, fail_on_error=False) * for success, response in responses: # <<<<<<<<<<<<<< * if not success: * log.debug("Got unexpected response when preparing " */ } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2300 * @classmethod * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: # <<<<<<<<<<<<<< * messages = [PrepareMessage(query=s.query_string, * keyspace=s.keyspace if set_keyspace else None) */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2298 * self.token_metadata_enabled = enabled * * @classmethod # <<<<<<<<<<<<<< * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("cassandra.cluster.Cluster._send_chunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ks_chunk); __Pyx_XDECREF(__pyx_v_messages); __Pyx_XDECREF(__pyx_v_responses); __Pyx_XDECREF(__pyx_v_success); __Pyx_XDECREF(__pyx_v_response); __Pyx_XDECREF(__pyx_9genexpr14__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2311 * "statement on host %s: %r", host, response) * * def _prepare_all_queries(self, host): # <<<<<<<<<<<<<< * if not self._prepared_statements or not self.reprepare_on_up: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_127_prepare_all_queries(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_127_prepare_all_queries = {"_prepare_all_queries", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_127_prepare_all_queries, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_127_prepare_all_queries(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_prepare_all_queries (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2311, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2311, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2311, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_prepare_all_queries", 0) < (0)) __PYX_ERR(0, 2311, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_prepare_all_queries", 1, 2, 2, i); __PYX_ERR(0, 2311, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2311, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2311, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_prepare_all_queries", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2311, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._prepare_all_queries", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_126_prepare_all_queries(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2327 * self._send_chunks(connection, host, chunks, True) * else: * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): # <<<<<<<<<<<<<< * if keyspace is not None: * connection.set_keyspace_blocking(keyspace) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_20_prepare_all_queries_lambda5(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_20_prepare_all_queries_lambda5 = {"lambda5", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_20_prepare_all_queries_lambda5, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_20_prepare_all_queries_lambda5(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_s = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_s,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2327, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2327, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda5", 0) < (0)) __PYX_ERR(0, 2327, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda5", 1, 1, 1, i); __PYX_ERR(0, 2327, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2327, __pyx_L3_error) } __pyx_v_s = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda5", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2327, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster._prepare_all_queries.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_lambda5(__pyx_self, __pyx_v_s); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda5", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __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("cassandra.cluster.Cluster._prepare_all_queries.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2311 * "statement on host %s: %r", host, response) * * def _prepare_all_queries(self, host): # <<<<<<<<<<<<<< * if not self._prepared_statements or not self.reprepare_on_up: * return */ static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_126_prepare_all_queries(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_connection = NULL; PyObject *__pyx_v_statements = NULL; PyObject *__pyx_v_chunks = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_keyspace = NULL; PyObject *__pyx_v_ks_statements = NULL; PyObject *__pyx_v_timeout = NULL; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; PyObject *(*__pyx_t_13)(PyObject *); Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; int __pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *(*__pyx_t_18)(PyObject *); PyObject *(*__pyx_t_19)(PyObject *); int __pyx_t_20; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; char const *__pyx_t_24; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; PyObject *__pyx_t_30 = NULL; char const *__pyx_t_31; char const *__pyx_t_32; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_prepare_all_queries", 0); /* "cassandra/cluster.py":2312 * * def _prepare_all_queries(self, host): * if not self._prepared_statements or not self.reprepare_on_up: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (!__pyx_t_3); if (!__pyx_t_4) { } else { __pyx_t_1 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reprepare_on_up); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2312, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = (!__pyx_t_4); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":2313 * def _prepare_all_queries(self, host): * if not self._prepared_statements or not self.reprepare_on_up: * return # <<<<<<<<<<<<<< * * log.debug("Preparing all known prepared statements against host %s", host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2312 * * def _prepare_all_queries(self, host): * if not self._prepared_statements or not self.reprepare_on_up: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":2315 * return * * log.debug("Preparing all known prepared statements against host %s", host) # <<<<<<<<<<<<<< * connection = None * try: */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Preparing_all_known_prepared_sta, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2316 * * log.debug("Preparing all known prepared statements against host %s", host) * connection = None # <<<<<<<<<<<<<< * try: * connection = self.connection_factory(host.endpoint) */ __Pyx_INCREF(Py_None); __pyx_v_connection = Py_None; /* "cassandra/cluster.py":2317 * log.debug("Preparing all known prepared statements against host %s", host) * connection = None * try: # <<<<<<<<<<<<<< * connection = self.connection_factory(host.endpoint) * statements = list(self._prepared_statements.values()) */ /*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:*/ { /* "cassandra/cluster.py":2318 * connection = None * try: * connection = self.connection_factory(host.endpoint) # <<<<<<<<<<<<<< * statements = list(self._prepared_statements.values()) * if ProtocolVersion.uses_keyspace_flag(self.protocol_version): */ __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2318, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_connection_factory, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2318, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_connection, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2319 * try: * connection = self.connection_factory(host.endpoint) * statements = list(self._prepared_statements.values()) # <<<<<<<<<<<<<< * if ProtocolVersion.uses_keyspace_flag(self.protocol_version): * # V5 protocol and higher, no need to set the keyspace */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statements); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2319, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2319, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_statements = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2320 * connection = self.connection_factory(host.endpoint) * statements = list(self._prepared_statements.values()) * if ProtocolVersion.uses_keyspace_flag(self.protocol_version): # <<<<<<<<<<<<<< * # V5 protocol and higher, no need to set the keyspace * chunks = [] */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2320, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_uses_keyspace_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2320, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2320, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2320, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2320, __pyx_L9_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2322 * if ProtocolVersion.uses_keyspace_flag(self.protocol_version): * # V5 protocol and higher, no need to set the keyspace * chunks = [] # <<<<<<<<<<<<<< * for i in range(0, len(statements), 10): * chunks.append(statements[i:i + 10]) */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2322, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_chunks = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2323 * # V5 protocol and higher, no need to set the keyspace * chunks = [] * for i in range(0, len(statements), 10): # <<<<<<<<<<<<<< * chunks.append(statements[i:i + 10]) * self._send_chunks(connection, host, chunks, True) */ __pyx_t_6 = NULL; __pyx_t_12 = __Pyx_PyList_GET_SIZE(__pyx_v_statements); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2323, __pyx_L9_error) __pyx_t_5 = PyLong_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = 1; { PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_mstate_global->__pyx_int_0, __pyx_t_5, __pyx_mstate_global->__pyx_int_10}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2323, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2323, __pyx_L9_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { { __pyx_t_7 = __pyx_t_13(__pyx_t_5); if (unlikely(!__pyx_t_7)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2323, __pyx_L9_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2324 * chunks = [] * for i in range(0, len(statements), 10): * chunks.append(statements[i:i + 10]) # <<<<<<<<<<<<<< * self._send_chunks(connection, host, chunks, True) * else: */ __Pyx_INCREF(__pyx_v_i); __pyx_t_7 = __pyx_v_i; __pyx_t_1 = (__pyx_t_7 == Py_None); if (__pyx_t_1) { __pyx_t_12 = 0; } else { __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2324, __pyx_L9_error) __pyx_t_12 = __pyx_t_14; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2324, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = (__pyx_t_7 == Py_None); if (__pyx_t_1) { __pyx_t_14 = PY_SSIZE_T_MAX; } else { __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_7); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2324, __pyx_L9_error) __pyx_t_14 = __pyx_t_15; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyList_GetSlice(__pyx_v_statements, __pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2324, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_chunks, __pyx_t_7); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 2324, __pyx_L9_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2325 * for i in range(0, len(statements), 10): * chunks.append(statements[i:i + 10]) * self._send_chunks(connection, host, chunks, True) # <<<<<<<<<<<<<< * else: * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; { PyObject *__pyx_callargs[5] = {__pyx_t_6, __pyx_v_connection, __pyx_v_host, __pyx_v_chunks, Py_True}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_chunks, __pyx_callargs+__pyx_t_8, (5-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2325, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2323 * # V5 protocol and higher, no need to set the keyspace * chunks = [] * for i in range(0, len(statements), 10): # <<<<<<<<<<<<<< * chunks.append(statements[i:i + 10]) * self._send_chunks(connection, host, chunks, True) */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2320 * connection = self.connection_factory(host.endpoint) * statements = list(self._prepared_statements.values()) * if ProtocolVersion.uses_keyspace_flag(self.protocol_version): # <<<<<<<<<<<<<< * # V5 protocol and higher, no need to set the keyspace * chunks = [] */ goto __pyx_L15; } /* "cassandra/cluster.py":2327 * self._send_chunks(connection, host, chunks, True) * else: * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): # <<<<<<<<<<<<<< * if keyspace is not None: * connection.set_keyspace_blocking(keyspace) */ /*else*/ { __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_groupby); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_20_prepare_all_queries_lambda5, 0, __pyx_mstate_global->__pyx_n_u_Cluster__prepare_all_queries_loc, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_statements, __pyx_t_2}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); } if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_14 = 0; __pyx_t_13 = NULL; } else { __pyx_t_14 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2327, __pyx_L9_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_6))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2327, __pyx_L9_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_6, __pyx_t_14, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_14; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2327, __pyx_L9_error) #endif if (__pyx_t_14 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_14)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_14); #endif ++__pyx_t_14; } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2327, __pyx_L9_error) } else { __pyx_t_5 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2327, __pyx_L9_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_5); if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 2327, __pyx_L9_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_XGOTREF(__pyx_t_7); } #else __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_17 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2327, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_18 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_17); index = 0; __pyx_t_2 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_2)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_7 = __pyx_t_18(__pyx_t_17); if (unlikely(!__pyx_t_7)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_17), 2) < (0)) __PYX_ERR(0, 2327, __pyx_L9_error) __pyx_t_18 = NULL; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L22_unpacking_done; __pyx_L21_unpacking_failed:; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_18 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 2327, __pyx_L9_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_keyspace, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_ks_statements, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2328 * else: * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): * if keyspace is not None: # <<<<<<<<<<<<<< * connection.set_keyspace_blocking(keyspace) * */ __pyx_t_1 = (__pyx_v_keyspace != Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":2329 * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): * if keyspace is not None: * connection.set_keyspace_blocking(keyspace) # <<<<<<<<<<<<<< * * # prepare 10 statements at a time */ __pyx_t_7 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_keyspace}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_keyspace_blocking, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2329, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2328 * else: * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): * if keyspace is not None: # <<<<<<<<<<<<<< * connection.set_keyspace_blocking(keyspace) * */ } /* "cassandra/cluster.py":2332 * * # prepare 10 statements at a time * ks_statements = list(ks_statements) # <<<<<<<<<<<<<< * chunks = [] * for i in range(0, len(ks_statements), 10): */ __pyx_t_5 = PySequence_List(__pyx_v_ks_statements); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2332, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_ks_statements, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2333 * # prepare 10 statements at a time * ks_statements = list(ks_statements) * chunks = [] # <<<<<<<<<<<<<< * for i in range(0, len(ks_statements), 10): * chunks.append(ks_statements[i:i + 10]) */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2333, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_chunks, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; /* "cassandra/cluster.py":2334 * ks_statements = list(ks_statements) * chunks = [] * for i in range(0, len(ks_statements), 10): # <<<<<<<<<<<<<< * chunks.append(ks_statements[i:i + 10]) * self._send_chunks(connection, host, chunks) */ __pyx_t_7 = NULL; __pyx_t_12 = PyObject_Length(__pyx_v_ks_statements); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2334, __pyx_L9_error) __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = 1; { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_mstate_global->__pyx_int_0, __pyx_t_2, __pyx_mstate_global->__pyx_int_10}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)(&PyRange_Type), __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2334, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2334, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 2334, __pyx_L9_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { { __pyx_t_5 = __pyx_t_19(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2334, __pyx_L9_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2335 * chunks = [] * for i in range(0, len(ks_statements), 10): * chunks.append(ks_statements[i:i + 10]) # <<<<<<<<<<<<<< * self._send_chunks(connection, host, chunks) * */ __pyx_t_5 = __Pyx_PyLong_AddObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_10, 10, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2335, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_ks_statements, 0, 0, &__pyx_v_i, &__pyx_t_5, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2335, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_chunks, __pyx_t_7); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 2335, __pyx_L9_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2334 * ks_statements = list(ks_statements) * chunks = [] * for i in range(0, len(ks_statements), 10): # <<<<<<<<<<<<<< * chunks.append(ks_statements[i:i + 10]) * self._send_chunks(connection, host, chunks) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2336 * for i in range(0, len(ks_statements), 10): * chunks.append(ks_statements[i:i + 10]) * self._send_chunks(connection, host, chunks) # <<<<<<<<<<<<<< * * log.debug("Done preparing all known prepared statements against host %s", host) */ __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_connection, __pyx_v_host, __pyx_v_chunks}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_chunks, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2336, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2327 * self._send_chunks(connection, host, chunks, True) * else: * for keyspace, ks_statements in groupby(statements, lambda s: s.keyspace): # <<<<<<<<<<<<<< * if keyspace is not None: * connection.set_keyspace_blocking(keyspace) */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L15:; /* "cassandra/cluster.py":2338 * self._send_chunks(connection, host, chunks) * * log.debug("Done preparing all known prepared statements against host %s", host) # <<<<<<<<<<<<<< * except OperationTimedOut as timeout: * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2338, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2338, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Done_preparing_all_known_prepare, __pyx_v_host}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2338, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":2317 * log.debug("Preparing all known prepared statements against host %s", host) * connection = None * try: # <<<<<<<<<<<<<< * connection = self.connection_factory(host.endpoint) * statements = list(self._prepared_statements.values()) */ } __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_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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; /* "cassandra/cluster.py":2339 * * log.debug("Done preparing all known prepared statements against host %s", host) * except OperationTimedOut as timeout: # <<<<<<<<<<<<<< * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) * except (ConnectionException, socket.error) as exc: */ __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_OperationTimedOut); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2339, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_20 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_6, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_2); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_2 = 0; if (__pyx_t_20) { __Pyx_AddTraceback("cassandra.cluster.Cluster._prepare_all_queries", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 2339, __pyx_L11_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_timeout = __pyx_t_5; /*try:*/ { /* "cassandra/cluster.py":2340 * log.debug("Done preparing all known prepared statements against host %s", host) * except OperationTimedOut as timeout: * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) # <<<<<<<<<<<<<< * except (ConnectionException, socket.error) as exc: * log.warning("Error trying to prepare all statements on host %s: %r", host, exc) */ __pyx_t_17 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2340, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_21); __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_21, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2340, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_22))) { __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_22); assert(__pyx_t_17); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_22); __Pyx_INCREF(__pyx_t_17); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_22, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_17, __pyx_mstate_global->__pyx_kp_u_Timed_out_trying_to_prepare_all, __pyx_v_host, __pyx_v_timeout}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2340, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } /* "cassandra/cluster.py":2339 * * log.debug("Done preparing all known prepared statements against host %s", host) * except OperationTimedOut as timeout: # <<<<<<<<<<<<<< * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) * except (ConnectionException, socket.error) as exc: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_timeout); __pyx_v_timeout = 0; goto __pyx_L34; } __pyx_L33_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ExceptionSwap(&__pyx_t_28, &__pyx_t_29, &__pyx_t_30); if ( unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __Pyx_XGOTREF(__pyx_t_27); __Pyx_XGOTREF(__pyx_t_28); __Pyx_XGOTREF(__pyx_t_29); __Pyx_XGOTREF(__pyx_t_30); __pyx_t_20 = __pyx_lineno; __pyx_t_23 = __pyx_clineno; __pyx_t_24 = __pyx_filename; { __Pyx_DECREF(__pyx_v_timeout); __pyx_v_timeout = 0; } __Pyx_XGIVEREF(__pyx_t_28); __Pyx_XGIVEREF(__pyx_t_29); __Pyx_XGIVEREF(__pyx_t_30); __Pyx_ExceptionReset(__pyx_t_28, __pyx_t_29, __pyx_t_30); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_XGIVEREF(__pyx_t_27); __Pyx_ErrRestore(__pyx_t_25, __pyx_t_26, __pyx_t_27); __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0; __pyx_t_30 = 0; __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_23; __pyx_filename = __pyx_t_24; goto __pyx_L11_except_error; } __pyx_L34:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_exception_handled; } /* "cassandra/cluster.py":2341 * except OperationTimedOut as timeout: * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) * except (ConnectionException, socket.error) as exc: # <<<<<<<<<<<<<< * log.warning("Error trying to prepare all statements on host %s: %r", host, exc) * except Exception: */ __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_5, &__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2341, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_socket); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2341, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_22); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2341, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_23 = __Pyx_PyErr_GivenExceptionMatches2(__pyx_t_6, __pyx_t_7, __pyx_t_17); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_ErrRestore(__pyx_t_6, __pyx_t_5, __pyx_t_2); __pyx_t_6 = 0; __pyx_t_5 = 0; __pyx_t_2 = 0; if (__pyx_t_23) { __Pyx_AddTraceback("cassandra.cluster.Cluster._prepare_all_queries", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 2341, __pyx_L11_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_v_exc = __pyx_t_5; /*try:*/ { /* "cassandra/cluster.py":2342 * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) * except (ConnectionException, socket.error) as exc: * log.warning("Error trying to prepare all statements on host %s: %r", host, exc) # <<<<<<<<<<<<<< * except Exception: * log.exception("Error trying to prepare all statements on host %s", host) */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2342, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_22); __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 2342, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_21); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_21))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_21); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_21); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_21, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_Error_trying_to_prepare_all_stat, __pyx_v_host, __pyx_v_exc}; __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_21, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2342, __pyx_L44_error) __Pyx_GOTREF(__pyx_t_17); } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } /* "cassandra/cluster.py":2341 * except OperationTimedOut as timeout: * log.warning("Timed out trying to prepare all statements on host %s: %s", host, timeout) * except (ConnectionException, socket.error) as exc: # <<<<<<<<<<<<<< * log.warning("Error trying to prepare all statements on host %s: %r", host, exc) * except Exception: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L45; } __pyx_L44_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_30 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_26, &__pyx_t_25); if ( unlikely(__Pyx_GetException(&__pyx_t_30, &__pyx_t_29, &__pyx_t_28) < 0)) __Pyx_ErrFetch(&__pyx_t_30, &__pyx_t_29, &__pyx_t_28); __Pyx_XGOTREF(__pyx_t_30); __Pyx_XGOTREF(__pyx_t_29); __Pyx_XGOTREF(__pyx_t_28); __Pyx_XGOTREF(__pyx_t_27); __Pyx_XGOTREF(__pyx_t_26); __Pyx_XGOTREF(__pyx_t_25); __pyx_t_23 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_31 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_27); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_26, __pyx_t_25); __Pyx_XGIVEREF(__pyx_t_30); __Pyx_XGIVEREF(__pyx_t_29); __Pyx_XGIVEREF(__pyx_t_28); __Pyx_ErrRestore(__pyx_t_30, __pyx_t_29, __pyx_t_28); __pyx_t_30 = 0; __pyx_t_29 = 0; __pyx_t_28 = 0; __pyx_t_27 = 0; __pyx_t_26 = 0; __pyx_t_25 = 0; __pyx_lineno = __pyx_t_23; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_31; goto __pyx_L11_except_error; } __pyx_L45:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_exception_handled; } /* "cassandra/cluster.py":2343 * except (ConnectionException, socket.error) as exc: * log.warning("Error trying to prepare all statements on host %s: %r", host, exc) * except Exception: # <<<<<<<<<<<<<< * log.exception("Error trying to prepare all statements on host %s", host) * finally: */ __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_20) { __Pyx_AddTraceback("cassandra.cluster.Cluster._prepare_all_queries", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(0, 2343, __pyx_L11_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_2); /* "cassandra/cluster.py":2344 * log.warning("Error trying to prepare all statements on host %s: %r", host, exc) * except Exception: * log.exception("Error trying to prepare all statements on host %s", host) # <<<<<<<<<<<<<< * finally: * if connection: */ __pyx_t_21 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2344, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 2344, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_22))) { __pyx_t_21 = PyMethod_GET_SELF(__pyx_t_22); assert(__pyx_t_21); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_22); __Pyx_INCREF(__pyx_t_21); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_22, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_21, __pyx_mstate_global->__pyx_kp_u_Error_trying_to_prepare_all_stat_2, __pyx_v_host}; __pyx_t_17 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_22, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2344, __pyx_L11_except_error) __Pyx_GOTREF(__pyx_t_17); } __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10_exception_handled; } goto __pyx_L11_except_error; /* "cassandra/cluster.py":2317 * log.debug("Preparing all known prepared statements against host %s", host) * connection = None * try: # <<<<<<<<<<<<<< * connection = self.connection_factory(host.endpoint) * statements = list(self._prepared_statements.values()) */ __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_L7_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:; } } /* "cassandra/cluster.py":2346 * log.exception("Error trying to prepare all statements on host %s", host) * finally: * if connection: # <<<<<<<<<<<<<< * connection.close() * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_connection); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2346, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2347 * finally: * if connection: * connection.close() # <<<<<<<<<<<<<< * * def add_prepared(self, query_id, prepared_statement): */ __pyx_t_5 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2346 * log.exception("Error trying to prepare all statements on host %s", host) * finally: * if connection: # <<<<<<<<<<<<<< * connection.close() * */ } goto __pyx_L8; } __pyx_L7_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 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; __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); if ( unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __Pyx_XGOTREF(__pyx_t_27); __pyx_t_20 = __pyx_lineno; __pyx_t_23 = __pyx_clineno; __pyx_t_32 = __pyx_filename; { __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_connection); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2346, __pyx_L54_error) if (__pyx_t_1) { /* "cassandra/cluster.py":2347 * finally: * if connection: * connection.close() # <<<<<<<<<<<<<< * * def add_prepared(self, query_id, prepared_statement): */ __pyx_t_5 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2347, __pyx_L54_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2346 * log.exception("Error trying to prepare all statements on host %s", host) * finally: * if connection: # <<<<<<<<<<<<<< * connection.close() * */ } } __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_XGIVEREF(__pyx_t_27); __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27); __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestore(__pyx_t_11, __pyx_t_10, __pyx_t_9); __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_lineno = __pyx_t_20; __pyx_clineno = __pyx_t_23; __pyx_filename = __pyx_t_32; goto __pyx_L1_error; __pyx_L54_error:; __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_XGIVEREF(__pyx_t_27); __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; goto __pyx_L1_error; } __pyx_L8:; } /* "cassandra/cluster.py":2311 * "statement on host %s: %r", host, response) * * def _prepare_all_queries(self, host): # <<<<<<<<<<<<<< * if not self._prepared_statements or not self.reprepare_on_up: * return */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_21); __Pyx_XDECREF(__pyx_t_22); __Pyx_AddTraceback("cassandra.cluster.Cluster._prepare_all_queries", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_connection); __Pyx_XDECREF(__pyx_v_statements); __Pyx_XDECREF(__pyx_v_chunks); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_keyspace); __Pyx_XDECREF(__pyx_v_ks_statements); __Pyx_XDECREF(__pyx_v_timeout); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2349 * connection.close() * * def add_prepared(self, query_id, prepared_statement): # <<<<<<<<<<<<<< * with self._prepared_statement_lock: * self._prepared_statements[query_id] = prepared_statement */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_129add_prepared(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Cluster_129add_prepared = {"add_prepared", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Cluster_129add_prepared, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Cluster_129add_prepared(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query_id = 0; PyObject *__pyx_v_prepared_statement = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_prepared (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query_id,&__pyx_mstate_global->__pyx_n_u_prepared_statement,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2349, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2349, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2349, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2349, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_prepared", 0) < (0)) __PYX_ERR(0, 2349, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_prepared", 1, 3, 3, i); __PYX_ERR(0, 2349, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2349, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2349, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2349, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_query_id = values[1]; __pyx_v_prepared_statement = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_prepared", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2349, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Cluster.add_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Cluster_128add_prepared(__pyx_self, __pyx_v_self, __pyx_v_query_id, __pyx_v_prepared_statement); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Cluster_128add_prepared(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query_id, PyObject *__pyx_v_prepared_statement) { 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; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_prepared", 0); /* "cassandra/cluster.py":2350 * * def add_prepared(self, query_id, prepared_statement): * with self._prepared_statement_lock: # <<<<<<<<<<<<<< * self._prepared_statements[query_id] = prepared_statement * */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2350, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2350, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":2351 * def add_prepared(self, query_id, prepared_statement): * with self._prepared_statement_lock: * self._prepared_statements[query_id] = prepared_statement # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statements); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2351, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_query_id, __pyx_v_prepared_statement) < 0))) __PYX_ERR(0, 2351, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2350 * * def add_prepared(self, query_id, prepared_statement): * with self._prepared_statement_lock: # <<<<<<<<<<<<<< * self._prepared_statements[query_id] = prepared_statement * */ } __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_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("cassandra.cluster.Cluster.add_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 2350, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2350, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2350, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 2350, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 2350, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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:; } /* "cassandra/cluster.py":2349 * connection.close() * * def add_prepared(self, query_id, prepared_statement): # <<<<<<<<<<<<<< * with self._prepared_statement_lock: * self._prepared_statements[query_id] = prepared_statement */ /* 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("cassandra.cluster.Cluster.add_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2380 * * _row_factory = staticmethod(named_tuple_factory) * @property # <<<<<<<<<<<<<< * def row_factory(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_1row_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_row_factory, "\n The format to return row results in. By default, each\n returned row will be a named tuple. You can alternatively\n use any of the following:\n\n - :func:`cassandra.query.tuple_factory` - return a result row as a tuple\n - :func:`cassandra.query.named_tuple_factory` - return a result row as a named tuple\n - :func:`cassandra.query.dict_factory` - return a result row as a dict\n - :func:`cassandra.query.ordered_dict_factory` - return a result row as an OrderedDict\n\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_1row_factory = {"row_factory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_1row_factory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_row_factory}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_1row_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("row_factory (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2380, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2380, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row_factory", 0) < (0)) __PYX_ERR(0, 2380, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row_factory", 1, 1, 1, i); __PYX_ERR(0, 2380, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2380, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("row_factory", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2380, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.row_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_row_factory(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_row_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("row_factory", 0); /* "cassandra/cluster.py":2393 * * """ * return self._row_factory # <<<<<<<<<<<<<< * * @row_factory.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_row_factory_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2380 * * _row_factory = staticmethod(named_tuple_factory) * @property # <<<<<<<<<<<<<< * def row_factory(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Session.row_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2395 * return self._row_factory * * @row_factory.setter # <<<<<<<<<<<<<< * def row_factory(self, rf): * self._validate_set_legacy_config('row_factory', rf) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_3row_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_3row_factory = {"row_factory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_3row_factory, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_3row_factory(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_rf = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("row_factory (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_rf,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2395, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2395, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2395, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "row_factory", 0) < (0)) __PYX_ERR(0, 2395, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("row_factory", 1, 2, 2, i); __PYX_ERR(0, 2395, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2395, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2395, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_rf = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("row_factory", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2395, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.row_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_2row_factory(__pyx_self, __pyx_v_self, __pyx_v_rf); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_2row_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_rf) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("row_factory", 0); /* "cassandra/cluster.py":2397 * @row_factory.setter * def row_factory(self, rf): * self._validate_set_legacy_config('row_factory', rf) # <<<<<<<<<<<<<< * * _default_timeout = 10.0 */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_v_rf}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_set_legacy_config, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2395 * return self._row_factory * * @row_factory.setter # <<<<<<<<<<<<<< * def row_factory(self, rf): * self._validate_set_legacy_config('row_factory', rf) */ /* 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_AddTraceback("cassandra.cluster.Session.row_factory", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2401 * _default_timeout = 10.0 * * @property # <<<<<<<<<<<<<< * def default_timeout(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_5default_timeout(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_4default_timeout, "\n A default timeout, measured in seconds, for queries executed through\n :meth:`.execute()` or :meth:`.execute_async()`. This default may be\n overridden with the `timeout` parameter for either of those methods.\n\n Setting this to :const:`None` will cause no timeouts to be set by default.\n\n Please see :meth:`.ResponseFuture.result` for details on the scope and\n effect of this timeout.\n\n .. versionadded:: 2.0.0\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_5default_timeout = {"default_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_5default_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_4default_timeout}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_5default_timeout(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_timeout (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2401, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2401, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_timeout", 0) < (0)) __PYX_ERR(0, 2401, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_timeout", 1, 1, 1, i); __PYX_ERR(0, 2401, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2401, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_timeout", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2401, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.default_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_4default_timeout(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_4default_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_timeout", 0); /* "cassandra/cluster.py":2415 * .. versionadded:: 2.0.0 * """ * return self._default_timeout # <<<<<<<<<<<<<< * * @default_timeout.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2401 * _default_timeout = 10.0 * * @property # <<<<<<<<<<<<<< * def default_timeout(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Session.default_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2417 * return self._default_timeout * * @default_timeout.setter # <<<<<<<<<<<<<< * def default_timeout(self, timeout): * self._validate_set_legacy_config('default_timeout', timeout) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_7default_timeout(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_7default_timeout = {"default_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_7default_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_7default_timeout(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_timeout = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_timeout (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_timeout,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2417, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2417, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2417, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_timeout", 0) < (0)) __PYX_ERR(0, 2417, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_timeout", 1, 2, 2, i); __PYX_ERR(0, 2417, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2417, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2417, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_timeout = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_timeout", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2417, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.default_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_6default_timeout(__pyx_self, __pyx_v_self, __pyx_v_timeout); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_6default_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_timeout) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_timeout", 0); /* "cassandra/cluster.py":2419 * @default_timeout.setter * def default_timeout(self, timeout): * self._validate_set_legacy_config('default_timeout', timeout) # <<<<<<<<<<<<<< * * _default_consistency_level = ConsistencyLevel.LOCAL_ONE */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_default_timeout_2, __pyx_v_timeout}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_set_legacy_config, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2417 * return self._default_timeout * * @default_timeout.setter # <<<<<<<<<<<<<< * def default_timeout(self, timeout): * self._validate_set_legacy_config('default_timeout', timeout) */ /* 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_AddTraceback("cassandra.cluster.Session.default_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2423 * _default_consistency_level = ConsistencyLevel.LOCAL_ONE * * @property # <<<<<<<<<<<<<< * def default_consistency_level(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_9default_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_8default_consistency_level, "\n *Deprecated:* use execution profiles instead\n The default :class:`~ConsistencyLevel` for operations executed through\n this session. This default may be overridden by setting the\n :attr:`~.Statement.consistency_level` on individual statements.\n\n .. versionadded:: 1.2.0\n\n .. versionchanged:: 3.0.0\n\n default changed from ONE to LOCAL_ONE\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_9default_consistency_level = {"default_consistency_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_9default_consistency_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_8default_consistency_level}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_9default_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_consistency_level (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2423, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2423, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_consistency_level", 0) < (0)) __PYX_ERR(0, 2423, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_consistency_level", 1, 1, 1, i); __PYX_ERR(0, 2423, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2423, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_consistency_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2423, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.default_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_8default_consistency_level(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_8default_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_consistency_level", 0); /* "cassandra/cluster.py":2437 * default changed from ONE to LOCAL_ONE * """ * return self._default_consistency_level # <<<<<<<<<<<<<< * * @default_consistency_level.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_consistency_level); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2437, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2423 * _default_consistency_level = ConsistencyLevel.LOCAL_ONE * * @property # <<<<<<<<<<<<<< * def default_consistency_level(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Session.default_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2439 * return self._default_consistency_level * * @default_consistency_level.setter # <<<<<<<<<<<<<< * def default_consistency_level(self, cl): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_11default_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_10default_consistency_level, "\n *Deprecated:* use execution profiles instead\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_11default_consistency_level = {"default_consistency_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_11default_consistency_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_10default_consistency_level}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_11default_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_cl = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_consistency_level (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_cl,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2439, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2439, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2439, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_consistency_level", 0) < (0)) __PYX_ERR(0, 2439, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_consistency_level", 1, 2, 2, i); __PYX_ERR(0, 2439, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2439, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2439, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_cl = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_consistency_level", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2439, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.default_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_10default_consistency_level(__pyx_self, __pyx_v_self, __pyx_v_cl); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_10default_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cl) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_consistency_level", 0); /* "cassandra/cluster.py":2444 * *Deprecated:* use execution profiles instead * """ * warn("Setting the consistency level at the session level will be removed in 4.0. Consider using " # <<<<<<<<<<<<<< * "execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile." * , DeprecationWarning) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "cassandra/cluster.py":2446 * warn("Setting the consistency level at the session level will be removed in 4.0. Consider using " * "execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile." * , DeprecationWarning) # <<<<<<<<<<<<<< * self._validate_set_legacy_config('default_consistency_level', cl) * */ __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Setting_the_consistency_level_at, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2447 * "execution profiles and setting the desired consistency level to the EXEC_PROFILE_DEFAULT profile." * , DeprecationWarning) * self._validate_set_legacy_config('default_consistency_level', cl) # <<<<<<<<<<<<<< * * _default_serial_consistency_level = None */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_default_consistency_level_2, __pyx_v_cl}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_set_legacy_config, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2439 * return self._default_consistency_level * * @default_consistency_level.setter # <<<<<<<<<<<<<< * def default_consistency_level(self, cl): * """ */ /* 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("cassandra.cluster.Session.default_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2451 * _default_serial_consistency_level = None * * @property # <<<<<<<<<<<<<< * def default_serial_consistency_level(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_13default_serial_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_12default_serial_consistency_level, "\n The default :class:`~ConsistencyLevel` for serial phase of conditional updates executed through\n this session. This default may be overridden by setting the\n :attr:`~.Statement.serial_consistency_level` on individual statements.\n\n Only valid for ``protocol_version >= 2``.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_13default_serial_consistency_level = {"default_serial_consistency_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_13default_serial_consistency_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_12default_serial_consistency_level}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_13default_serial_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_serial_consistency_level (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2451, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2451, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_serial_consistency_level", 0) < (0)) __PYX_ERR(0, 2451, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_serial_consistency_level", 1, 1, 1, i); __PYX_ERR(0, 2451, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2451, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_serial_consistency_level", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2451, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.default_serial_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_12default_serial_consistency_level(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_12default_serial_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_serial_consistency_level", 0); /* "cassandra/cluster.py":2460 * Only valid for ``protocol_version >= 2``. * """ * return self._default_serial_consistency_level # <<<<<<<<<<<<<< * * @default_serial_consistency_level.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_leve); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2451 * _default_serial_consistency_level = None * * @property # <<<<<<<<<<<<<< * def default_serial_consistency_level(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.Session.default_serial_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2462 * return self._default_serial_consistency_level * * @default_serial_consistency_level.setter # <<<<<<<<<<<<<< * def default_serial_consistency_level(self, cl): * if (cl is not None and */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_15default_serial_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_15default_serial_consistency_level = {"default_serial_consistency_level", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_15default_serial_consistency_level, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_15default_serial_consistency_level(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_cl = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("default_serial_consistency_level (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_cl,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2462, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2462, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2462, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "default_serial_consistency_level", 0) < (0)) __PYX_ERR(0, 2462, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("default_serial_consistency_level", 1, 2, 2, i); __PYX_ERR(0, 2462, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2462, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2462, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_cl = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("default_serial_consistency_level", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2462, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.default_serial_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_14default_serial_consistency_level(__pyx_self, __pyx_v_self, __pyx_v_cl); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_14default_serial_consistency_level(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cl) { 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; size_t __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("default_serial_consistency_level", 0); /* "cassandra/cluster.py":2464 * @default_serial_consistency_level.setter * def default_serial_consistency_level(self, cl): * if (cl is not None and # <<<<<<<<<<<<<< * not ConsistencyLevel.is_serial(cl)): * raise ValueError("default_serial_consistency_level must be either " */ __pyx_t_2 = (__pyx_v_cl != Py_None); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } /* "cassandra/cluster.py":2465 * def default_serial_consistency_level(self, cl): * if (cl is not None and * not ConsistencyLevel.is_serial(cl)): # <<<<<<<<<<<<<< * raise ValueError("default_serial_consistency_level must be either " * "ConsistencyLevel.SERIAL " */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_is_serial); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_cl}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2465, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = (!__pyx_t_2); __pyx_t_1 = __pyx_t_8; __pyx_L4_bool_binop_done:; /* "cassandra/cluster.py":2464 * @default_serial_consistency_level.setter * def default_serial_consistency_level(self, cl): * if (cl is not None and # <<<<<<<<<<<<<< * not ConsistencyLevel.is_serial(cl)): * raise ValueError("default_serial_consistency_level must be either " */ if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":2466 * if (cl is not None and * not ConsistencyLevel.is_serial(cl)): * raise ValueError("default_serial_consistency_level must be either " # <<<<<<<<<<<<<< * "ConsistencyLevel.SERIAL " * "or ConsistencyLevel.LOCAL_SERIAL.") */ __pyx_t_6 = NULL; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_default_serial_consistency_level}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 2466, __pyx_L1_error) /* "cassandra/cluster.py":2464 * @default_serial_consistency_level.setter * def default_serial_consistency_level(self, cl): * if (cl is not None and # <<<<<<<<<<<<<< * not ConsistencyLevel.is_serial(cl)): * raise ValueError("default_serial_consistency_level must be either " */ } /* "cassandra/cluster.py":2470 * "or ConsistencyLevel.LOCAL_SERIAL.") * * self._validate_set_legacy_config('default_serial_consistency_level', cl) # <<<<<<<<<<<<<< * * max_trace_wait = 2.0 */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_level_2, __pyx_v_cl}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_validate_set_legacy_config, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2462 * return self._default_serial_consistency_level * * @default_serial_consistency_level.setter # <<<<<<<<<<<<<< * def default_serial_consistency_level(self, cl): * if (cl is not None and */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); 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_AddTraceback("cassandra.cluster.Session.default_serial_consistency_level", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2575 * _graph_paging_available = False * * def __init__(self, cluster, hosts, keyspace=None): # <<<<<<<<<<<<<< * self.cluster = cluster * self.hosts = hosts */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_17__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_17__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_17__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_17__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_cluster = 0; PyObject *__pyx_v_hosts = 0; PyObject *__pyx_v_keyspace = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_cluster,&__pyx_mstate_global->__pyx_n_u_hosts,&__pyx_mstate_global->__pyx_n_u_keyspace,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2575, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2575, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2575, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2575, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2575, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 2575, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, i); __PYX_ERR(0, 2575, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2575, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2575, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2575, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2575, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_cluster = values[1]; __pyx_v_hosts = values[2]; __pyx_v_keyspace = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 2575, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_16__init__(__pyx_self, __pyx_v_self, __pyx_v_cluster, __pyx_v_hosts, __pyx_v_keyspace); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_8__init___2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":2597 * * futures = wait_futures(self._initial_connect_futures, return_when=FIRST_COMPLETED) * while futures.not_done and not any(f.result() for f in futures.done): # <<<<<<<<<<<<<< * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_8__init___genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_7_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 2597, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_7Session_8__init___2generator4, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Session___init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.Session.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_8__init___2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2597, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 2597, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2597, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2597, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2597, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_cur_scope->__pyx_v_f; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_8__init___5generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":2600 * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * * if not any(f.result() for f in self._initial_connect_futures): # <<<<<<<<<<<<<< * msg = "Unable to connect to any servers" * if self.keyspace: */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_8__init___3genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_8_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 2600, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_7Session_8__init___5generator5, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Session___init___locals_genexpr, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.Session.__init__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_8__init___5generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2600, __pyx_L1_error) if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 2600, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2600, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2600, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2600, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __pyx_cur_scope->__pyx_v_f; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; } CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2575 * _graph_paging_available = False * * def __init__(self, cluster, hosts, keyspace=None): # <<<<<<<<<<<<<< * self.cluster = cluster * self.hosts = hosts */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_16__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_hosts, PyObject *__pyx_v_keyspace) { PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_future = NULL; PyObject *__pyx_v_futures = NULL; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_v_cc_host = NULL; PyObject *__pyx_v_valid_insights_version = NULL; PyObject *__pyx_gb_9cassandra_7cluster_7Session_8__init___2generator4 = 0; PyObject *__pyx_gb_9cassandra_7cluster_7Session_8__init___5generator5 = 0; PyObject *__pyx_9genexpr17__pyx_v_h = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":2576 * * def __init__(self, cluster, hosts, keyspace=None): * self.cluster = cluster # <<<<<<<<<<<<<< * self.hosts = hosts * self.keyspace = keyspace */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster, __pyx_v_cluster) < (0)) __PYX_ERR(0, 2576, __pyx_L1_error) /* "cassandra/cluster.py":2577 * def __init__(self, cluster, hosts, keyspace=None): * self.cluster = cluster * self.hosts = hosts # <<<<<<<<<<<<<< * self.keyspace = keyspace * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_hosts, __pyx_v_hosts) < (0)) __PYX_ERR(0, 2577, __pyx_L1_error) /* "cassandra/cluster.py":2578 * self.cluster = cluster * self.hosts = hosts * self.keyspace = keyspace # <<<<<<<<<<<<<< * * self._lock = RLock() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace) < (0)) __PYX_ERR(0, 2578, __pyx_L1_error) /* "cassandra/cluster.py":2580 * self.keyspace = keyspace * * self._lock = RLock() # <<<<<<<<<<<<<< * self._pools = {} * self._profile_manager = cluster.profile_manager */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RLock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock, __pyx_t_1) < (0)) __PYX_ERR(0, 2580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2581 * * self._lock = RLock() * self._pools = {} # <<<<<<<<<<<<<< * self._profile_manager = cluster.profile_manager * self._metrics = cluster.metrics */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools, __pyx_t_1) < (0)) __PYX_ERR(0, 2581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2582 * self._lock = RLock() * self._pools = {} * self._profile_manager = cluster.profile_manager # <<<<<<<<<<<<<< * self._metrics = cluster.metrics * self._request_init_callbacks = [] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cluster, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager_2, __pyx_t_1) < (0)) __PYX_ERR(0, 2582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2583 * self._pools = {} * self._profile_manager = cluster.profile_manager * self._metrics = cluster.metrics # <<<<<<<<<<<<<< * self._request_init_callbacks = [] * self._protocol_version = self.cluster.protocol_version */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cluster, __pyx_mstate_global->__pyx_n_u_metrics); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2, __pyx_t_1) < (0)) __PYX_ERR(0, 2583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2584 * self._profile_manager = cluster.profile_manager * self._metrics = cluster.metrics * self._request_init_callbacks = [] # <<<<<<<<<<<<<< * self._protocol_version = self.cluster.protocol_version * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_request_init_callbacks, __pyx_t_1) < (0)) __PYX_ERR(0, 2584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2585 * self._metrics = cluster.metrics * self._request_init_callbacks = [] * self._protocol_version = self.cluster.protocol_version # <<<<<<<<<<<<<< * * self.encoder = Encoder() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2, __pyx_t_3) < (0)) __PYX_ERR(0, 2585, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2587 * self._protocol_version = self.cluster.protocol_version * * self.encoder = Encoder() # <<<<<<<<<<<<<< * * # create connection pools in parallel */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Encoder); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoder, __pyx_t_3) < (0)) __PYX_ERR(0, 2587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2590 * * # create connection pools in parallel * self._initial_connect_futures = set() # <<<<<<<<<<<<<< * for host in hosts: * future = self.add_or_renew_pool(host, is_host_addition=False) */ __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_initial_connect_futures, __pyx_t_3) < (0)) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2591 * # create connection pools in parallel * self._initial_connect_futures = set() * for host in hosts: # <<<<<<<<<<<<<< * future = self.add_or_renew_pool(host, is_host_addition=False) * if future: */ if (likely(PyList_CheckExact(__pyx_v_hosts)) || PyTuple_CheckExact(__pyx_v_hosts)) { __pyx_t_3 = __pyx_v_hosts; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_hosts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2591, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2591, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2591, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); #endif ++__pyx_t_5; } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2591, __pyx_L1_error) } else { __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2591, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2592 * self._initial_connect_futures = set() * for host in hosts: * future = self.add_or_renew_pool(host, is_host_addition=False) # <<<<<<<<<<<<<< * if future: * self._initial_connect_futures.add(future) */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_v_host}; __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_False, __pyx_t_7, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2592, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_add_or_renew_pool, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2593 * for host in hosts: * future = self.add_or_renew_pool(host, is_host_addition=False) * if future: # <<<<<<<<<<<<<< * self._initial_connect_futures.add(future) * */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_future); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2593, __pyx_L1_error) if (__pyx_t_8) { /* "cassandra/cluster.py":2594 * future = self.add_or_renew_pool(host, is_host_addition=False) * if future: * self._initial_connect_futures.add(future) # <<<<<<<<<<<<<< * * futures = wait_futures(self._initial_connect_futures, return_when=FIRST_COMPLETED) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_initial_connect_futures); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_future}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2593 * for host in hosts: * future = self.add_or_renew_pool(host, is_host_addition=False) * if future: # <<<<<<<<<<<<<< * self._initial_connect_futures.add(future) * */ } /* "cassandra/cluster.py":2591 * # create connection pools in parallel * self._initial_connect_futures = set() * for host in hosts: # <<<<<<<<<<<<<< * future = self.add_or_renew_pool(host, is_host_addition=False) * if future: */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2596 * self._initial_connect_futures.add(future) * * futures = wait_futures(self._initial_connect_futures, return_when=FIRST_COMPLETED) # <<<<<<<<<<<<<< * while futures.not_done and not any(f.result() for f in futures.done): * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_wait_futures); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_initial_connect_futures); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_FIRST_COMPLETED); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_7}; __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_return_when, __pyx_t_9, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2596, __pyx_L1_error) __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_futures = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2597 * * futures = wait_futures(self._initial_connect_futures, return_when=FIRST_COMPLETED) * while futures.not_done and not any(f.result() for f in futures.done): # <<<<<<<<<<<<<< * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * */ while (1) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_futures, __pyx_mstate_global->__pyx_n_u_not_done); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L9_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_futures, __pyx_mstate_global->__pyx_n_u_done); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_pf_9cassandra_7cluster_7Session_8__init___genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 2597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = (!__pyx_t_11); __pyx_t_8 = __pyx_t_12; __pyx_L9_bool_binop_done:; if (!__pyx_t_8) break; /* "cassandra/cluster.py":2598 * futures = wait_futures(self._initial_connect_futures, return_when=FIRST_COMPLETED) * while futures.not_done and not any(f.result() for f in futures.done): * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) # <<<<<<<<<<<<<< * * if not any(f.result() for f in self._initial_connect_futures): */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_wait_futures); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_futures, __pyx_mstate_global->__pyx_n_u_not_done); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_FIRST_COMPLETED); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, __pyx_t_9}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_return_when, __pyx_t_7, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2598, __pyx_L1_error) __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_futures, __pyx_t_3); __pyx_t_3 = 0; } /* "cassandra/cluster.py":2600 * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * * if not any(f.result() for f in self._initial_connect_futures): # <<<<<<<<<<<<<< * msg = "Unable to connect to any servers" * if self.keyspace: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_initial_connect_futures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __pyx_pf_9cassandra_7cluster_7Session_8__init___3genexpr(NULL, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_Generator_GetInlinedResult(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2600, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = (!__pyx_t_8); if (__pyx_t_12) { /* "cassandra/cluster.py":2601 * * if not any(f.result() for f in self._initial_connect_futures): * msg = "Unable to connect to any servers" # <<<<<<<<<<<<<< * if self.keyspace: * msg += " using keyspace '%s'" % self.keyspace */ __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Unable_to_connect_to_any_servers); __pyx_v_msg = __pyx_mstate_global->__pyx_kp_u_Unable_to_connect_to_any_servers; /* "cassandra/cluster.py":2602 * if not any(f.result() for f in self._initial_connect_futures): * msg = "Unable to connect to any servers" * if self.keyspace: # <<<<<<<<<<<<<< * msg += " using keyspace '%s'" % self.keyspace * raise NoHostAvailable(msg, [h.address for h in hosts]) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 2602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":2603 * msg = "Unable to connect to any servers" * if self.keyspace: * msg += " using keyspace '%s'" % self.keyspace # <<<<<<<<<<<<<< * raise NoHostAvailable(msg, [h.address for h in hosts]) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_using_keyspace_s, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_v_msg, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "cassandra/cluster.py":2602 * if not any(f.result() for f in self._initial_connect_futures): * msg = "Unable to connect to any servers" * if self.keyspace: # <<<<<<<<<<<<<< * msg += " using keyspace '%s'" % self.keyspace * raise NoHostAvailable(msg, [h.address for h in hosts]) */ } /* "cassandra/cluster.py":2604 * if self.keyspace: * msg += " using keyspace '%s'" % self.keyspace * raise NoHostAvailable(msg, [h.address for h in hosts]) # <<<<<<<<<<<<<< * * self.session_id = uuid.uuid4() */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NoHostAvailable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); { /* enter inner scope */ __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2604, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_v_hosts)) || PyTuple_CheckExact(__pyx_v_hosts)) { __pyx_t_9 = __pyx_v_hosts; __Pyx_INCREF(__pyx_t_9); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { __pyx_t_5 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_hosts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2604, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2604, __pyx_L15_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_9))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2604, __pyx_L15_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2604, __pyx_L15_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_5)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_5); #endif ++__pyx_t_5; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2604, __pyx_L15_error) } else { __pyx_t_1 = __pyx_t_6(__pyx_t_9); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2604, __pyx_L15_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_h, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr17__pyx_v_h, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2604, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 2604, __pyx_L15_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_h); __pyx_9genexpr17__pyx_v_h = 0; goto __pyx_L19_exit_scope; __pyx_L15_error:; __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_h); __pyx_9genexpr17__pyx_v_h = 0; goto __pyx_L1_error; __pyx_L19_exit_scope:; } /* exit inner scope */ __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_msg, __pyx_t_7}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 2604, __pyx_L1_error) /* "cassandra/cluster.py":2600 * futures = wait_futures(futures.not_done, return_when=FIRST_COMPLETED) * * if not any(f.result() for f in self._initial_connect_futures): # <<<<<<<<<<<<<< * msg = "Unable to connect to any servers" * if self.keyspace: */ } /* "cassandra/cluster.py":2606 * raise NoHostAvailable(msg, [h.address for h in hosts]) * * self.session_id = uuid.uuid4() # <<<<<<<<<<<<<< * self._graph_paging_available = self._check_graph_paging_available() * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_uuid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_uuid4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session_id, __pyx_t_3) < (0)) __PYX_ERR(0, 2606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2607 * * self.session_id = uuid.uuid4() * self._graph_paging_available = self._check_graph_paging_available() # <<<<<<<<<<<<<< * * if self.cluster.column_encryption_policy is not None: */ __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_check_graph_paging_available, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_graph_paging_available, __pyx_t_3) < (0)) __PYX_ERR(0, 2607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2609 * self._graph_paging_available = self._check_graph_paging_available() * * if self.cluster.column_encryption_policy is not None: # <<<<<<<<<<<<<< * try: * self.client_protocol_handler = type( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_column_encryption_policy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_12 = (__pyx_t_10 != Py_None); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":2610 * * if self.cluster.column_encryption_policy is not None: * try: # <<<<<<<<<<<<<< * self.client_protocol_handler = type( * str(self.session_id) + "-ProtocolHandler", */ { __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:*/ { /* "cassandra/cluster.py":2611 * if self.cluster.column_encryption_policy is not None: * try: * self.client_protocol_handler = type( # <<<<<<<<<<<<<< * str(self.session_id) + "-ProtocolHandler", * (ProtocolHandler,), */ __pyx_t_3 = NULL; /* "cassandra/cluster.py":2612 * try: * self.client_protocol_handler = type( * str(self.session_id) + "-ProtocolHandler", # <<<<<<<<<<<<<< * (ProtocolHandler,), * {"column_encryption_policy": self.cluster.column_encryption_policy}) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2612, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2612, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_Concat__Pyx_ReferenceSharing_OwnStrongReferenceInPlace(__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_ProtocolHandler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2612, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2613 * self.client_protocol_handler = type( * str(self.session_id) + "-ProtocolHandler", * (ProtocolHandler,), # <<<<<<<<<<<<<< * {"column_encryption_policy": self.cluster.column_encryption_policy}) * except AttributeError: */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_ProtocolHandler_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2613, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2613, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_7); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7) != (0)) __PYX_ERR(0, 2613, __pyx_L21_error); __pyx_t_7 = 0; /* "cassandra/cluster.py":2614 * str(self.session_id) + "-ProtocolHandler", * (ProtocolHandler,), * {"column_encryption_policy": self.cluster.column_encryption_policy}) # <<<<<<<<<<<<<< * except AttributeError: * log.info("Unable to set column encryption policy for session") */ __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2614, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2614, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_column_encryption_policy); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2614, __pyx_L21_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_column_encryption_policy, __pyx_t_16) < (0)) __PYX_ERR(0, 2614, __pyx_L21_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_4 = 1; { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_2, __pyx_t_9, __pyx_t_7}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(&PyType_Type), __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2611, __pyx_L21_error) __Pyx_GOTREF((PyObject *)__pyx_t_10); } /* "cassandra/cluster.py":2611 * if self.cluster.column_encryption_policy is not None: * try: * self.client_protocol_handler = type( # <<<<<<<<<<<<<< * str(self.session_id) + "-ProtocolHandler", * (ProtocolHandler,), */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_client_protocol_handler, ((PyObject *)__pyx_t_10)) < (0)) __PYX_ERR(0, 2611, __pyx_L21_error) __Pyx_DECREF((PyObject *)__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2610 * * if self.cluster.column_encryption_policy is not None: * try: # <<<<<<<<<<<<<< * self.client_protocol_handler = type( * str(self.session_id) + "-ProtocolHandler", */ } __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_L26_try_end; __pyx_L21_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":2615 * (ProtocolHandler,), * {"column_encryption_policy": self.cluster.column_encryption_policy}) * except AttributeError: # <<<<<<<<<<<<<< * log.info("Unable to set column encryption policy for session") * */ __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError)))); if (__pyx_t_17) { __Pyx_AddTraceback("cassandra.cluster.Session.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 2615, __pyx_L23_except_error) __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":2616 * {"column_encryption_policy": self.cluster.column_encryption_policy}) * except AttributeError: * log.info("Unable to set column encryption policy for session") # <<<<<<<<<<<<<< * * if self.cluster.monitor_reporting_enabled: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2616, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2616, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unable_to_set_column_encryption}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2616, __pyx_L23_except_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L22_exception_handled; } goto __pyx_L23_except_error; /* "cassandra/cluster.py":2610 * * if self.cluster.column_encryption_policy is not None: * try: # <<<<<<<<<<<<<< * self.client_protocol_handler = type( * str(self.session_id) + "-ProtocolHandler", */ __pyx_L23_except_error:; __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_L1_error; __pyx_L22_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_L26_try_end:; } /* "cassandra/cluster.py":2609 * self._graph_paging_available = self._check_graph_paging_available() * * if self.cluster.column_encryption_policy is not None: # <<<<<<<<<<<<<< * try: * self.client_protocol_handler = type( */ } /* "cassandra/cluster.py":2618 * log.info("Unable to set column encryption policy for session") * * if self.cluster.monitor_reporting_enabled: # <<<<<<<<<<<<<< * cc_host = self.cluster.get_control_connection_host() * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_monitor_reporting_enabled); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 2618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":2619 * * if self.cluster.monitor_reporting_enabled: * cc_host = self.cluster.get_control_connection_host() # <<<<<<<<<<<<<< * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) * if valid_insights_version: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __pyx_t_10; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_control_connection_host, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_cc_host = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":2620 * if self.cluster.monitor_reporting_enabled: * cc_host = self.cluster.get_control_connection_host() * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) # <<<<<<<<<<<<<< * if valid_insights_version: * self._monitor_reporter = MonitorReporter( */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_cc_host); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 2620, __pyx_L1_error) if (__pyx_t_12) { } else { __Pyx_INCREF(__pyx_v_cc_host); __pyx_t_7 = __pyx_v_cc_host; goto __pyx_L30_bool_binop_done; } __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_version_supports_insights); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cc_host, __pyx_mstate_global->__pyx_n_u_dse_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_1}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_INCREF(__pyx_t_10); __pyx_t_7 = __pyx_t_10; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_L30_bool_binop_done:; __pyx_v_valid_insights_version = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":2621 * cc_host = self.cluster.get_control_connection_host() * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) * if valid_insights_version: # <<<<<<<<<<<<<< * self._monitor_reporter = MonitorReporter( * interval_sec=self.cluster.monitor_reporting_interval, */ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_valid_insights_version); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 2621, __pyx_L1_error) if (__pyx_t_12) { /* "cassandra/cluster.py":2622 * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) * if valid_insights_version: * self._monitor_reporter = MonitorReporter( # <<<<<<<<<<<<<< * interval_sec=self.cluster.monitor_reporting_interval, * session=self, */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_MonitorReporter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":2623 * if valid_insights_version: * self._monitor_reporter = MonitorReporter( * interval_sec=self.cluster.monitor_reporting_interval, # <<<<<<<<<<<<<< * session=self, * ) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_monitor_reporting_interval); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2624 * self._monitor_reporter = MonitorReporter( * interval_sec=self.cluster.monitor_reporting_interval, * session=self, # <<<<<<<<<<<<<< * ) * else: */ __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, NULL}; __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_interval_sec, __pyx_t_9, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2622, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_session, __pyx_v_self, __pyx_t_1, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2622, __pyx_L1_error) __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } /* "cassandra/cluster.py":2622 * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) * if valid_insights_version: * self._monitor_reporter = MonitorReporter( # <<<<<<<<<<<<<< * interval_sec=self.cluster.monitor_reporting_interval, * session=self, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_monitor_reporter, __pyx_t_7) < (0)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2621 * cc_host = self.cluster.get_control_connection_host() * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) * if valid_insights_version: # <<<<<<<<<<<<<< * self._monitor_reporter = MonitorReporter( * interval_sec=self.cluster.monitor_reporting_interval, */ goto __pyx_L32; } /* "cassandra/cluster.py":2627 * ) * else: * if cc_host: # <<<<<<<<<<<<<< * log.debug('Not starting MonitorReporter thread for Insights; ' * 'not supported by server version {v} on ' */ /*else*/ { __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_cc_host); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 2627, __pyx_L1_error) if (__pyx_t_12) { /* "cassandra/cluster.py":2628 * else: * if cc_host: * log.debug('Not starting MonitorReporter thread for Insights; ' # <<<<<<<<<<<<<< * 'not supported by server version {v} on ' * 'ControlConnection host {c}'.format(v=cc_host.release_version, c=cc_host)) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2630 * log.debug('Not starting MonitorReporter thread for Insights; ' * 'not supported by server version {v} on ' * 'ControlConnection host {c}'.format(v=cc_host.release_version, c=cc_host)) # <<<<<<<<<<<<<< * * log.debug('Started Session with client_id {} and session_id {}'.format(self.cluster.client_id, */ __pyx_t_10 = __pyx_mstate_global->__pyx_kp_u_Not_starting_MonitorReporter_thr; __Pyx_INCREF(__pyx_t_10); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cc_host, __pyx_mstate_global->__pyx_n_u_release_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, NULL}; __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_v, __pyx_t_3, __pyx_t_16, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2630, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_c, __pyx_v_cc_host, __pyx_t_16, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2630, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2627 * ) * else: * if cc_host: # <<<<<<<<<<<<<< * log.debug('Not starting MonitorReporter thread for Insights; ' * 'not supported by server version {v} on ' */ } } __pyx_L32:; /* "cassandra/cluster.py":2618 * log.info("Unable to set column encryption policy for session") * * if self.cluster.monitor_reporting_enabled: # <<<<<<<<<<<<<< * cc_host = self.cluster.get_control_connection_host() * valid_insights_version = (cc_host and version_supports_insights(cc_host.dse_version)) */ } /* "cassandra/cluster.py":2632 * 'ControlConnection host {c}'.format(v=cc_host.release_version, c=cc_host)) * * log.debug('Started Session with client_id {} and session_id {}'.format(self.cluster.client_id, # <<<<<<<<<<<<<< * self.session_id)) * */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = __pyx_mstate_global->__pyx_kp_u_Started_Session_with_client_id_a; __Pyx_INCREF(__pyx_t_16); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_client_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2633 * * log.debug('Started Session with client_id {} and session_id {}'.format(self.cluster.client_id, * self.session_id)) # <<<<<<<<<<<<<< * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_t_10, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_1}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":2575 * _graph_paging_available = False * * def __init__(self, cluster, hosts, keyspace=None): # <<<<<<<<<<<<<< * self.cluster = cluster * self.hosts = hosts */ /* 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_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("cassandra.cluster.Session.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_future); __Pyx_XDECREF(__pyx_v_futures); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XDECREF(__pyx_v_cc_host); __Pyx_XDECREF(__pyx_v_valid_insights_version); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_7Session_8__init___2generator4); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_7Session_8__init___5generator5); __Pyx_XDECREF(__pyx_9genexpr17__pyx_v_h); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2635 * self.session_id)) * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, # <<<<<<<<<<<<<< * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ static PyObject *__pyx_pf_9cassandra_7cluster_48__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":2637 * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the given query and synchronously wait for the response. */ __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, Py_None) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, Py_None) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); /* "cassandra/cluster.py":2635 * self.session_id)) * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, # <<<<<<<<<<<<<< * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 2635, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_19execute(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_18execute, "\n Execute the given query and synchronously wait for the response.\n\n If an error is encountered while executing the query, an Exception\n will be raised.\n\n `query` may be a query string or an instance of :class:`cassandra.query.Statement`.\n\n `parameters` may be a sequence or dict of parameters to bind. If a\n sequence is used, ``%s`` should be used the placeholder for each\n argument. If a dict is used, ``%(name)s`` style placeholders must\n be used.\n\n `timeout` should specify a floating-point timeout (in seconds) after\n which an :exc:`.OperationTimedOut` exception will be raised if the query\n has not completed. If not set, the timeout defaults to the request_timeout of the selected ``execution_profile``.\n If set to :const:`None`, there is no timeout. Please see :meth:`.ResponseFuture.result` for details on\n the scope and effect of this timeout.\n\n If `trace` is set to :const:`True`, the query will be sent with tracing enabled.\n The trace details can be obtained using the returned :class:`.ResultSet` object.\n\n `custom_payload` is a :ref:`custom_payload` dict to be passed to the server.\n If `query` is a Statement with its own custom_payload. The message payload\n will be a union of the two, with the values specified here taking precedence.\n\n `execution_profile` is the execution profile to use for this request. It can be a key to a profile configured\n via :meth:`Cluster.add_execution_profile` or an instance (from :meth:`Session.execution_profile_clone_update`,\n for example\n\n `paging_state` is an optional paging state, reused from a previous :class:`ResultSet`.\n\n `host` is the :class:`cassandra.pool.Host` that should handle the query. If the host specified is down or\n not yet connected, the query will fail with :class:`NoHostAvailable`. Using this is\n discouraged exc""ept in a few cases, e.g., querying node-local tables and applying schema changes.\n\n `execute_as` the user that will be used on the server to execute the request. This is only available\n on a DSE cluster.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_19execute = {"execute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_19execute, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_18execute}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_19execute(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_v_trace = 0; PyObject *__pyx_v_custom_payload = 0; PyObject *__pyx_v_execution_profile = 0; PyObject *__pyx_v_paging_state = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_execute_as = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_parameters,&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_custom_payload,&__pyx_mstate_global->__pyx_n_u_execution_profile,&__pyx_mstate_global->__pyx_n_u_paging_state,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_execute_as,0}; struct __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2635, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute", 0) < (0)) __PYX_ERR(0, 2635, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":2636 * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, # <<<<<<<<<<<<<< * paging_state=None, host=None, execute_as=None): * """ */ if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":2637 * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the given query and synchronously wait for the response. */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute", 0, 2, 10, i); __PYX_ERR(0, 2635, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2635, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2635, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2635, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "cassandra/cluster.py":2635 * self.session_id)) * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, # <<<<<<<<<<<<<< * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); /* "cassandra/cluster.py":2636 * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, # <<<<<<<<<<<<<< * paging_state=None, host=None, execute_as=None): * """ */ if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":2637 * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the given query and synchronously wait for the response. */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_parameters = values[2]; __pyx_v_timeout = values[3]; __pyx_v_trace = values[4]; __pyx_v_custom_payload = values[5]; __pyx_v_execution_profile = values[6]; __pyx_v_paging_state = values[7]; __pyx_v_host = values[8]; __pyx_v_execute_as = values[9]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute", 0, 2, 10, __pyx_nargs); __PYX_ERR(0, 2635, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_18execute(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_parameters, __pyx_v_timeout, __pyx_v_trace, __pyx_v_custom_payload, __pyx_v_execution_profile, __pyx_v_paging_state, __pyx_v_host, __pyx_v_execute_as); /* "cassandra/cluster.py":2635 * self.session_id)) * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, # <<<<<<<<<<<<<< * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_18execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_timeout, PyObject *__pyx_v_trace, PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_paging_state, PyObject *__pyx_v_host, PyObject *__pyx_v_execute_as) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute", 0); /* "cassandra/cluster.py":2678 * """ * * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() # <<<<<<<<<<<<<< * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[10] = {__pyx_t_4, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_custom_payload, __pyx_v_timeout, __pyx_v_execution_profile, __pyx_v_paging_state, __pyx_v_host, __pyx_v_execute_as}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_execute_async, __pyx_callargs+__pyx_t_5, (10-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2635 * self.session_id)) * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, # <<<<<<<<<<<<<< * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=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_AddTraceback("cassandra.cluster.Session.execute", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2680 * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ static PyObject *__pyx_pf_9cassandra_7cluster_50__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":2682 * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the given query and return a :class:`~.ResponseFuture` object */ __pyx_t_1 = PyTuple_New(8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self)->arg1) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, Py_None) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, Py_None) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); /* "cassandra/cluster.py":2680 * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 2680, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_21execute_async(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_20execute_async, "\n Execute the given query and return a :class:`~.ResponseFuture` object\n which callbacks may be attached to for asynchronous response\n delivery. You may also call :meth:`~.ResponseFuture.result()`\n on the :class:`.ResponseFuture` to synchronously block for results at\n any time.\n\n See :meth:`Session.execute` for parameter definitions.\n\n Example usage::\n\n >>> session = cluster.connect()\n >>> future = session.execute_async(\"SELECT * FROM mycf\")\n\n >>> def log_results(results):\n ... for row in results:\n ... log.info(\"Results: %s\", row)\n\n >>> def log_error(exc):\n >>> log.error(\"Operation failed: %s\", exc)\n\n >>> future.add_callbacks(log_results, log_error)\n\n Async execution with blocking wait for results::\n\n >>> future = session.execute_async(\"SELECT * FROM mycf\")\n >>> # do other stuff...\n\n >>> try:\n ... results = future.result()\n ... except Exception:\n ... log.exception(\"Operation failed:\")\n\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_21execute_async = {"execute_async", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_21execute_async, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_20execute_async}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_21execute_async(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_trace = 0; PyObject *__pyx_v_custom_payload = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_v_execution_profile = 0; PyObject *__pyx_v_paging_state = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_execute_as = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute_async (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_parameters,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_custom_payload,&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_execution_profile,&__pyx_mstate_global->__pyx_n_u_paging_state,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_execute_as,0}; struct __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2680, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute_async", 0) < (0)) __PYX_ERR(0, 2680, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":2682 * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the given query and return a :class:`~.ResponseFuture` object */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute_async", 0, 2, 10, i); __PYX_ERR(0, 2680, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2680, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2680, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "cassandra/cluster.py":2680 * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg1); /* "cassandra/cluster.py":2682 * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the given query and return a :class:`~.ResponseFuture` object */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_parameters = values[2]; __pyx_v_trace = values[3]; __pyx_v_custom_payload = values[4]; __pyx_v_timeout = values[5]; __pyx_v_execution_profile = values[6]; __pyx_v_paging_state = values[7]; __pyx_v_host = values[8]; __pyx_v_execute_as = values[9]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute_async", 0, 2, 10, __pyx_nargs); __PYX_ERR(0, 2680, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.execute_async", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_20execute_async(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_custom_payload, __pyx_v_timeout, __pyx_v_execution_profile, __pyx_v_paging_state, __pyx_v_host, __pyx_v_execute_as); /* "cassandra/cluster.py":2680 * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_20execute_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_timeout, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_paging_state, PyObject *__pyx_v_host, PyObject *__pyx_v_execute_as) { PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute_async", 0); __Pyx_INCREF(__pyx_v_custom_payload); /* "cassandra/cluster.py":2717 * * """ * custom_payload = custom_payload if custom_payload else {} # <<<<<<<<<<<<<< * if execute_as: * custom_payload[_proxy_execute_key] = execute_as.encode() */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_custom_payload); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2717, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(__pyx_v_custom_payload); __pyx_t_1 = __pyx_v_custom_payload; } else { __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __Pyx_DECREF_SET(__pyx_v_custom_payload, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2718 * """ * custom_payload = custom_payload if custom_payload else {} * if execute_as: # <<<<<<<<<<<<<< * custom_payload[_proxy_execute_key] = execute_as.encode() * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_execute_as); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2718, __pyx_L1_error) if (__pyx_t_2) { /* "cassandra/cluster.py":2719 * custom_payload = custom_payload if custom_payload else {} * if execute_as: * custom_payload[_proxy_execute_key] = execute_as.encode() # <<<<<<<<<<<<<< * * future = self._create_response_future( */ __pyx_t_3 = __pyx_v_execute_as; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_proxy_execute_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_v_custom_payload, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 2719, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2718 * """ * custom_payload = custom_payload if custom_payload else {} * if execute_as: # <<<<<<<<<<<<<< * custom_payload[_proxy_execute_key] = execute_as.encode() * */ } /* "cassandra/cluster.py":2721 * custom_payload[_proxy_execute_key] = execute_as.encode() * * future = self._create_response_future( # <<<<<<<<<<<<<< * query, parameters, trace, custom_payload, timeout, * execution_profile, paging_state, host) */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); /* "cassandra/cluster.py":2723 * future = self._create_response_future( * query, parameters, trace, custom_payload, timeout, * execution_profile, paging_state, host) # <<<<<<<<<<<<<< * future._protocol_handler = self.client_protocol_handler * self._on_request(future) */ __pyx_t_4 = 0; { PyObject *__pyx_callargs[9] = {__pyx_t_3, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_custom_payload, __pyx_v_timeout, __pyx_v_execution_profile, __pyx_v_paging_state, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_response_future, __pyx_callargs+__pyx_t_4, (9-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_future = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2724 * query, parameters, trace, custom_payload, timeout, * execution_profile, paging_state, host) * future._protocol_handler = self.client_protocol_handler # <<<<<<<<<<<<<< * self._on_request(future) * future.send_request() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_client_protocol_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_protocol_handler, __pyx_t_1) < (0)) __PYX_ERR(0, 2724, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2725 * execution_profile, paging_state, host) * future._protocol_handler = self.client_protocol_handler * self._on_request(future) # <<<<<<<<<<<<<< * future.send_request() * return future */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_future}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_request, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2725, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2726 * future._protocol_handler = self.client_protocol_handler * self._on_request(future) * future.send_request() # <<<<<<<<<<<<<< * return future * */ __pyx_t_3 = __pyx_v_future; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2727 * self._on_request(future) * future.send_request() * return future # <<<<<<<<<<<<<< * * def execute_concurrent(self, statements_and_parameters, concurrency=100, raise_on_first_error=True, results_generator=False, execution_profile=EXEC_PROFILE_DEFAULT): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_future); __pyx_r = __pyx_v_future; goto __pyx_L0; /* "cassandra/cluster.py":2680 * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Session.execute_async", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_future); __Pyx_XDECREF(__pyx_v_custom_payload); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2729 * return future * * def execute_concurrent(self, statements_and_parameters, concurrency=100, raise_on_first_error=True, results_generator=False, execution_profile=EXEC_PROFILE_DEFAULT): # <<<<<<<<<<<<<< * """ * Executes a sequence of (statement, parameters) tuples concurrently. Each */ static PyObject *__pyx_pf_9cassandra_7cluster_52__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_100)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_100)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)__pyx_mstate_global->__pyx_int_100)) != (0)) __PYX_ERR(0, 2729, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_True)); __Pyx_GIVEREF(((PyObject*)Py_True)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)Py_True)) != (0)) __PYX_ERR(0, 2729, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 2729, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 2729, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2729, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 2729, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_23execute_concurrent(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_22execute_concurrent, "\n Executes a sequence of (statement, parameters) tuples concurrently. Each\n ``parameters`` item must be a sequence or :const:`None`.\n\n The `concurrency` parameter controls how many statements will be executed\n concurrently. When :attr:`.Cluster.protocol_version` is set to 1 or 2,\n it is recommended that this be kept below 100 times the number of\n core connections per host times the number of connected hosts (see\n :meth:`.Cluster.set_core_connections_per_host`). If that amount is exceeded,\n the event loop thread may attempt to block on new connection creation,\n substantially impacting throughput. If :attr:`~.Cluster.protocol_version`\n is 3 or higher, you can safely experiment with higher levels of concurrency.\n\n If `raise_on_first_error` is left as :const:`True`, execution will stop\n after the first failed statement and the corresponding exception will be\n raised.\n\n `results_generator` controls how the results are returned.\n\n * If :const:`False`, the results are returned only after all requests have completed.\n * If :const:`True`, a generator expression is returned. Using a generator results in a constrained\n memory footprint when the results set will be large -- results are yielded\n as they return instead of materializing the entire list at once. The trade for lower memory\n footprint is marginal CPU overhead (more thread coordination and sorting out-of-order results\n on-the-fly).\n\n `execution_profile` argument is the execution profile to use for this\n request, it is passed directly to :meth:`Session.execute_async`.\n\n A sequence of ``ExecutionResult(success, result_or_exc)`` namedtuples is returned\n in the same order that the statements were passed in. If ``success`` is :const:`False`,\n there was an error executing the statement, and ``result_or_exc``""\n will be an :class:`Exception`. If ``success`` is :const:`True`, ``result_or_exc``\n will be the query result.\n\n Example usage::\n\n select_statement = session.prepare(\"SELECT * FROM users WHERE id=?\")\n\n statements_and_params = []\n for user_id in user_ids:\n params = (user_id, )\n statements_and_params.append((select_statement, params))\n\n results = session.execute_concurrent(statements_and_params, raise_on_first_error=False)\n\n for (success, result) in results:\n if not success:\n handle_error(result) # result will be an Exception\n else:\n process_user(result[0]) # result will be a list of rows\n\n Note: in the case that `generators` are used, it is important to ensure the consumers do not\n block or attempt further synchronous requests, because no further IO will be processed until\n the consumer returns. This may also produce a deadlock in the IO event thread.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_23execute_concurrent = {"execute_concurrent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_23execute_concurrent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_22execute_concurrent}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_23execute_concurrent(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_statements_and_parameters = 0; PyObject *__pyx_v_concurrency = 0; PyObject *__pyx_v_raise_on_first_error = 0; PyObject *__pyx_v_results_generator = 0; PyObject *__pyx_v_execution_profile = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute_concurrent (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_statements_and_parameters,&__pyx_mstate_global->__pyx_n_u_concurrency,&__pyx_mstate_global->__pyx_n_u_raise_on_first_error,&__pyx_mstate_global->__pyx_n_u_results_generator,&__pyx_mstate_global->__pyx_n_u_execution_profile,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2729, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute_concurrent", 0) < (0)) __PYX_ERR(0, 2729, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_100))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute_concurrent", 0, 2, 6, i); __PYX_ERR(0, 2729, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2729, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2729, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2729, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_100))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[5]) values[5] = __Pyx_NewRef(__pyx_dynamic_args->arg0); } __pyx_v_self = values[0]; __pyx_v_statements_and_parameters = values[1]; __pyx_v_concurrency = values[2]; __pyx_v_raise_on_first_error = values[3]; __pyx_v_results_generator = values[4]; __pyx_v_execution_profile = values[5]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute_concurrent", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 2729, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.execute_concurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_22execute_concurrent(__pyx_self, __pyx_v_self, __pyx_v_statements_and_parameters, __pyx_v_concurrency, __pyx_v_raise_on_first_error, __pyx_v_results_generator, __pyx_v_execution_profile); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_22execute_concurrent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_statements_and_parameters, PyObject *__pyx_v_concurrency, PyObject *__pyx_v_raise_on_first_error, PyObject *__pyx_v_results_generator, PyObject *__pyx_v_execution_profile) { PyObject *__pyx_v_execute_concurrent = 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 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute_concurrent", 0); /* "cassandra/cluster.py":2786 * the consumer returns. This may also produce a deadlock in the IO event thread. * """ * from cassandra.concurrent import execute_concurrent # <<<<<<<<<<<<<< * return execute_concurrent(self, statements_and_parameters, concurrency, raise_on_first_error, results_generator, execution_profile) * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_execute_concurrent}; __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_concurrent, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2786, __pyx_L1_error) } __pyx_t_1 = __pyx_t_2; __Pyx_GOTREF(__pyx_t_1); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_execute_concurrent}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); switch (__pyx_t_3) { case 0: __Pyx_INCREF(__pyx_t_4); __pyx_v_execute_concurrent = __pyx_t_4; break; default:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2787 * """ * from cassandra.concurrent import execute_concurrent * return execute_concurrent(self, statements_and_parameters, concurrency, raise_on_first_error, results_generator, execution_profile) # <<<<<<<<<<<<<< * * def execute_concurrent_with_args(self, statement, parameters, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_execute_concurrent); __pyx_t_5 = __pyx_v_execute_concurrent; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_v_self, __pyx_v_statements_and_parameters, __pyx_v_concurrency, __pyx_v_raise_on_first_error, __pyx_v_results_generator, __pyx_v_execution_profile}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (7-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2729 * return future * * def execute_concurrent(self, statements_and_parameters, concurrency=100, raise_on_first_error=True, results_generator=False, execution_profile=EXEC_PROFILE_DEFAULT): # <<<<<<<<<<<<<< * """ * Executes a sequence of (statement, parameters) tuples concurrently. Each */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Session.execute_concurrent", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_execute_concurrent); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2789 * return execute_concurrent(self, statements_and_parameters, concurrency, raise_on_first_error, results_generator, execution_profile) * * def execute_concurrent_with_args(self, statement, parameters, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Like :meth:`~cassandra.concurrent.execute_concurrent()`, but takes a single */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_25execute_concurrent_with_args(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_24execute_concurrent_with_args, "\n Like :meth:`~cassandra.concurrent.execute_concurrent()`, but takes a single\n statement and a sequence of parameters. Each item in ``parameters``\n should be a sequence or :const:`None`.\n\n Example usage::\n\n statement = session.prepare(\"INSERT INTO mytable (a, b) VALUES (1, ?)\")\n parameters = [(x,) for x in range(1000)]\n session.execute_concurrent_with_args(statement, parameters, concurrency=50)\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_25execute_concurrent_with_args = {"execute_concurrent_with_args", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_25execute_concurrent_with_args, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_24execute_concurrent_with_args}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_25execute_concurrent_with_args(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_statement = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute_concurrent_with_args (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 3, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_statement,&__pyx_mstate_global->__pyx_n_u_parameters,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2789, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2789, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2789, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2789, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 3) ? kwd_pos_args : 3; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "execute_concurrent_with_args", 1) < (0)) __PYX_ERR(0, 2789, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute_concurrent_with_args", 0, 3, 3, i); __PYX_ERR(0, 2789, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2789, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2789, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2789, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_statement = values[1]; __pyx_v_parameters = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute_concurrent_with_args", 0, 3, 3, __pyx_nargs); __PYX_ERR(0, 2789, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Session.execute_concurrent_with_args", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_24execute_concurrent_with_args(__pyx_self, __pyx_v_self, __pyx_v_statement, __pyx_v_parameters, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_24execute_concurrent_with_args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_statement, PyObject *__pyx_v_parameters, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_execute_concurrent_with_args = 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 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute_concurrent_with_args", 0); /* "cassandra/cluster.py":2801 * session.execute_concurrent_with_args(statement, parameters, concurrency=50) * """ * from cassandra.concurrent import execute_concurrent_with_args # <<<<<<<<<<<<<< * return execute_concurrent_with_args(self, statement, parameters, *args, **kwargs) * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_execute_concurrent_with_args}; __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_concurrent, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2801, __pyx_L1_error) } __pyx_t_1 = __pyx_t_2; __Pyx_GOTREF(__pyx_t_1); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_execute_concurrent_with_args}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); switch (__pyx_t_3) { case 0: __Pyx_INCREF(__pyx_t_4); __pyx_v_execute_concurrent_with_args = __pyx_t_4; break; default:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2802 * """ * from cassandra.concurrent import execute_concurrent_with_args * return execute_concurrent_with_args(self, statement, parameters, *args, **kwargs) # <<<<<<<<<<<<<< * * def execute_concurrent_async(self, statements_and_parameters, concurrency=100, raise_on_first_error=False, execution_profile=EXEC_PROFILE_DEFAULT): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 2802, __pyx_L1_error); __Pyx_INCREF(__pyx_v_statement); __Pyx_GIVEREF(__pyx_v_statement); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_statement) != (0)) __PYX_ERR(0, 2802, __pyx_L1_error); __Pyx_INCREF(__pyx_v_parameters); __Pyx_GIVEREF(__pyx_v_parameters); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_parameters) != (0)) __PYX_ERR(0, 2802, __pyx_L1_error); __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_execute_concurrent_with_args, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2789 * return execute_concurrent(self, statements_and_parameters, concurrency, raise_on_first_error, results_generator, execution_profile) * * def execute_concurrent_with_args(self, statement, parameters, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Like :meth:`~cassandra.concurrent.execute_concurrent()`, but takes a single */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Session.execute_concurrent_with_args", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_execute_concurrent_with_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2804 * return execute_concurrent_with_args(self, statement, parameters, *args, **kwargs) * * def execute_concurrent_async(self, statements_and_parameters, concurrency=100, raise_on_first_error=False, execution_profile=EXEC_PROFILE_DEFAULT): # <<<<<<<<<<<<<< * """ * Asynchronously executes a sequence of (statement, parameters) tuples concurrently. */ static PyObject *__pyx_pf_9cassandra_7cluster_54__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject*)__pyx_mstate_global->__pyx_int_100)); __Pyx_GIVEREF(((PyObject*)__pyx_mstate_global->__pyx_int_100)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject*)__pyx_mstate_global->__pyx_int_100)) != (0)) __PYX_ERR(0, 2804, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 2804, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 2804, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2804, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 2804, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_27execute_concurrent_async(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_26execute_concurrent_async, "\n Asynchronously executes a sequence of (statement, parameters) tuples concurrently.\n\n Args:\n session: Cassandra session object.\n statement_and_parameters: Iterable of (prepared CQL statement, bind parameters) tuples.\n concurrency (int, optional): Number of concurrent operations. Default is 100.\n raise_on_first_error (bool, optional): If True, execution stops on the first error. Default is True.\n execution_profile (ExecutionProfile, optional): Execution profile to use. Default is EXEC_PROFILE_DEFAULT.\n\n Returns:\n A `Future` object that will be completed when all operations are done.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_27execute_concurrent_async = {"execute_concurrent_async", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_27execute_concurrent_async, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_26execute_concurrent_async}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_27execute_concurrent_async(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_statements_and_parameters = 0; PyObject *__pyx_v_concurrency = 0; PyObject *__pyx_v_raise_on_first_error = 0; PyObject *__pyx_v_execution_profile = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute_concurrent_async (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_statements_and_parameters,&__pyx_mstate_global->__pyx_n_u_concurrency,&__pyx_mstate_global->__pyx_n_u_raise_on_first_error,&__pyx_mstate_global->__pyx_n_u_execution_profile,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2804, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute_concurrent_async", 0) < (0)) __PYX_ERR(0, 2804, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_100))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute_concurrent_async", 0, 2, 5, i); __PYX_ERR(0, 2804, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2804, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2804, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2804, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_100))); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); } __pyx_v_self = values[0]; __pyx_v_statements_and_parameters = values[1]; __pyx_v_concurrency = values[2]; __pyx_v_raise_on_first_error = values[3]; __pyx_v_execution_profile = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute_concurrent_async", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 2804, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.execute_concurrent_async", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_26execute_concurrent_async(__pyx_self, __pyx_v_self, __pyx_v_statements_and_parameters, __pyx_v_concurrency, __pyx_v_raise_on_first_error, __pyx_v_execution_profile); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_26execute_concurrent_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_statements_and_parameters, PyObject *__pyx_v_concurrency, PyObject *__pyx_v_raise_on_first_error, PyObject *__pyx_v_execution_profile) { PyObject *__pyx_v_execute_concurrent_async = 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 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute_concurrent_async", 0); /* "cassandra/cluster.py":2818 * A `Future` object that will be completed when all operations are done. * """ * from cassandra.concurrent import execute_concurrent_async # <<<<<<<<<<<<<< * return execute_concurrent_async(self, statements_and_parameters, concurrency, raise_on_first_error, execution_profile) * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_execute_concurrent_async}; __pyx_t_2 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_concurrent, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2818, __pyx_L1_error) } __pyx_t_1 = __pyx_t_2; __Pyx_GOTREF(__pyx_t_1); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_execute_concurrent_async}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_1, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); switch (__pyx_t_3) { case 0: __Pyx_INCREF(__pyx_t_4); __pyx_v_execute_concurrent_async = __pyx_t_4; break; default:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2819 * """ * from cassandra.concurrent import execute_concurrent_async * return execute_concurrent_async(self, statements_and_parameters, concurrency, raise_on_first_error, execution_profile) # <<<<<<<<<<<<<< * * def execute_graph(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_execute_concurrent_async); __pyx_t_5 = __pyx_v_execute_concurrent_async; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_self, __pyx_v_statements_and_parameters, __pyx_v_concurrency, __pyx_v_raise_on_first_error, __pyx_v_execution_profile}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2804 * return execute_concurrent_with_args(self, statement, parameters, *args, **kwargs) * * def execute_concurrent_async(self, statements_and_parameters, concurrency=100, raise_on_first_error=False, execution_profile=EXEC_PROFILE_DEFAULT): # <<<<<<<<<<<<<< * """ * Asynchronously executes a sequence of (statement, parameters) tuples concurrently. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Session.execute_concurrent_async", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_execute_concurrent_async); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2821 * return execute_concurrent_async(self, statements_and_parameters, concurrency, raise_on_first_error, execution_profile) * * def execute_graph(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): # <<<<<<<<<<<<<< * """ * Executes a Gremlin query string or GraphStatement synchronously, */ static PyObject *__pyx_pf_9cassandra_7cluster_56__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 2821, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 2821, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 2821, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 2821, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2821, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 2821, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_29execute_graph(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_28execute_graph, "\n Executes a Gremlin query string or GraphStatement synchronously,\n and returns a ResultSet from this execution.\n\n `parameters` is dict of named parameters to bind. The values must be\n JSON-serializable.\n\n `execution_profile`: Selects an execution profile for the request.\n\n `execute_as` the user that will be used on the server to execute the request.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_29execute_graph = {"execute_graph", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_29execute_graph, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_28execute_graph}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_29execute_graph(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_trace = 0; PyObject *__pyx_v_execution_profile = 0; PyObject *__pyx_v_execute_as = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute_graph (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_parameters,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_execution_profile,&__pyx_mstate_global->__pyx_n_u_execute_as,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2821, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute_graph", 0) < (0)) __PYX_ERR(0, 2821, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute_graph", 0, 2, 6, i); __PYX_ERR(0, 2821, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2821, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2821, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2821, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_parameters = values[2]; __pyx_v_trace = values[3]; __pyx_v_execution_profile = values[4]; __pyx_v_execute_as = values[5]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute_graph", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 2821, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.execute_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_28execute_graph(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_execution_profile, __pyx_v_execute_as); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_28execute_graph(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_execute_as) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute_graph", 0); /* "cassandra/cluster.py":2833 * `execute_as` the user that will be used on the server to execute the request. * """ * return self.execute_graph_async(query, parameters, trace, execution_profile, execute_as).result() # <<<<<<<<<<<<<< * * def execute_graph_async(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[6] = {__pyx_t_4, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_execution_profile, __pyx_v_execute_as}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_execute_graph_async, __pyx_callargs+__pyx_t_5, (6-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2821 * return execute_concurrent_async(self, statements_and_parameters, concurrency, raise_on_first_error, execution_profile) * * def execute_graph(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): # <<<<<<<<<<<<<< * """ * Executes a Gremlin query string or GraphStatement synchronously, */ /* 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("cassandra.cluster.Session.execute_graph", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2835 * return self.execute_graph_async(query, parameters, trace, execution_profile, execute_as).result() * * def execute_graph_async(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the graph query and return a :class:`ResponseFuture` */ static PyObject *__pyx_pf_9cassandra_7cluster_58__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 2835, __pyx_L1_error); __Pyx_INCREF(((PyObject*)Py_False)); __Pyx_GIVEREF(((PyObject*)Py_False)); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)Py_False)) != (0)) __PYX_ERR(0, 2835, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 2835, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 2835, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 2835, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 2835, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_31execute_graph_async(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_30execute_graph_async, "\n Execute the graph query and return a :class:`ResponseFuture`\n object which callbacks may be attached to for asynchronous response delivery. You may also call ``ResponseFuture.result()`` to synchronously block for\n results at any time.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_31execute_graph_async = {"execute_graph_async", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_31execute_graph_async, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_30execute_graph_async}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_31execute_graph_async(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_trace = 0; PyObject *__pyx_v_execution_profile = 0; PyObject *__pyx_v_execute_as = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[6] = {0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execute_graph_async (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_parameters,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_execution_profile,&__pyx_mstate_global->__pyx_n_u_execute_as,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2835, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "execute_graph_async", 0) < (0)) __PYX_ERR(0, 2835, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execute_graph_async", 0, 2, 6, i); __PYX_ERR(0, 2835, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2835, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2835, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2835, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); if (!values[4]) values[4] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_parameters = values[2]; __pyx_v_trace = values[3]; __pyx_v_execution_profile = values[4]; __pyx_v_execute_as = values[5]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execute_graph_async", 0, 2, 6, __pyx_nargs); __PYX_ERR(0, 2835, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.execute_graph_async", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_30execute_graph_async(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_execution_profile, __pyx_v_execute_as); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_30execute_graph_async(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_execute_as) { PyObject *__pyx_v_graph_parameters = NULL; PyObject *__pyx_v_custom_payload = NULL; PyObject *__pyx_v_future = 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; size_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execute_graph_async", 0); __Pyx_INCREF(__pyx_v_query); __Pyx_INCREF(__pyx_v_execution_profile); /* "cassandra/cluster.py":2841 * results at any time. * """ * if self.cluster._config_mode is _ConfigMode.LEGACY: # <<<<<<<<<<<<<< * raise ValueError(("Cannot execute graph queries using Cluster legacy parameters. " * "Consider using Execution profiles: " */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = (__pyx_t_2 == __pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_4)) { /* "cassandra/cluster.py":2842 * """ * if self.cluster._config_mode is _ConfigMode.LEGACY: * raise ValueError(("Cannot execute graph queries using Cluster legacy parameters. " # <<<<<<<<<<<<<< * "Consider using Execution profiles: " * "https://docs.datastax.com/en/developer/python-driver/latest/execution_profiles/#execution-profiles")) */ __pyx_t_2 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Cannot_execute_graph_queries_usi}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 2842, __pyx_L1_error) /* "cassandra/cluster.py":2841 * results at any time. * """ * if self.cluster._config_mode is _ConfigMode.LEGACY: # <<<<<<<<<<<<<< * raise ValueError(("Cannot execute graph queries using Cluster legacy parameters. " * "Consider using Execution profiles: " */ } /* "cassandra/cluster.py":2846 * "https://docs.datastax.com/en/developer/python-driver/latest/execution_profiles/#execution-profiles")) * * if not isinstance(query, GraphStatement): # <<<<<<<<<<<<<< * query = SimpleGraphStatement(query) * */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GraphStatement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_IsInstance(__pyx_v_query, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = (!__pyx_t_4); if (__pyx_t_6) { /* "cassandra/cluster.py":2847 * * if not isinstance(query, GraphStatement): * query = SimpleGraphStatement(query) # <<<<<<<<<<<<<< * * # Clone and look up instance here so we can resolve and apply the extended attributes */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_SimpleGraphStatement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_query}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_query, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2846 * "https://docs.datastax.com/en/developer/python-driver/latest/execution_profiles/#execution-profiles")) * * if not isinstance(query, GraphStatement): # <<<<<<<<<<<<<< * query = SimpleGraphStatement(query) * */ } /* "cassandra/cluster.py":2850 * * # Clone and look up instance here so we can resolve and apply the extended attributes * execution_profile = self.execution_profile_clone_update(execution_profile) # <<<<<<<<<<<<<< * * if not hasattr(execution_profile, 'graph_options'): */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_execution_profile}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_execution_profile_clone_update, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_execution_profile, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2852 * execution_profile = self.execution_profile_clone_update(execution_profile) * * if not hasattr(execution_profile, 'graph_options'): # <<<<<<<<<<<<<< * raise ValueError( * "Execution profile for graph queries must derive from GraphExecutionProfile, and provide graph_options") */ __pyx_t_6 = __Pyx_HasAttr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2852, __pyx_L1_error) __pyx_t_4 = (!__pyx_t_6); if (unlikely(__pyx_t_4)) { /* "cassandra/cluster.py":2853 * * if not hasattr(execution_profile, 'graph_options'): * raise ValueError( # <<<<<<<<<<<<<< * "Execution profile for graph queries must derive from GraphExecutionProfile, and provide graph_options") * */ __pyx_t_1 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Execution_profile_for_graph_quer}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 2853, __pyx_L1_error) /* "cassandra/cluster.py":2852 * execution_profile = self.execution_profile_clone_update(execution_profile) * * if not hasattr(execution_profile, 'graph_options'): # <<<<<<<<<<<<<< * raise ValueError( * "Execution profile for graph queries must derive from GraphExecutionProfile, and provide graph_options") */ } /* "cassandra/cluster.py":2856 * "Execution profile for graph queries must derive from GraphExecutionProfile, and provide graph_options") * * self._resolve_execution_profile_options(execution_profile) # <<<<<<<<<<<<<< * * # make sure the graphson context row factory is binded to this cluster */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_execution_profile}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_resolve_execution_profile_optio, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2859 * * # make sure the graphson context row factory is binded to this cluster * try: # <<<<<<<<<<<<<< * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): * execution_profile.row_factory = execution_profile.row_factory(self.cluster) */ { __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:*/ { /* "cassandra/cluster.py":2860 * # make sure the graphson context row factory is binded to this cluster * try: * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): # <<<<<<<<<<<<<< * execution_profile.row_factory = execution_profile.row_factory(self.cluster) * except TypeError: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2860, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_GraphSONContextRowFactory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2860, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_IsSubclass(__pyx_t_3, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2860, __pyx_L6_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "cassandra/cluster.py":2861 * try: * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): * execution_profile.row_factory = execution_profile.row_factory(self.cluster) # <<<<<<<<<<<<<< * except TypeError: * # issubclass might fail if arg1 is an instance */ __pyx_t_3 = __pyx_v_execution_profile; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2861, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_row_factory, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_1) < (0)) __PYX_ERR(0, 2861, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2860 * # make sure the graphson context row factory is binded to this cluster * try: * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): # <<<<<<<<<<<<<< * execution_profile.row_factory = execution_profile.row_factory(self.cluster) * except TypeError: */ } /* "cassandra/cluster.py":2859 * * # make sure the graphson context row factory is binded to this cluster * try: # <<<<<<<<<<<<<< * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): * execution_profile.row_factory = execution_profile.row_factory(self.cluster) */ } __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; /* "cassandra/cluster.py":2862 * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): * execution_profile.row_factory = execution_profile.row_factory(self.cluster) * except TypeError: # <<<<<<<<<<<<<< * # issubclass might fail if arg1 is an instance * pass */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError)))); if (__pyx_t_10) { __Pyx_ErrRestore(0,0,0); goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; /* "cassandra/cluster.py":2859 * * # make sure the graphson context row factory is binded to this cluster * try: # <<<<<<<<<<<<<< * if issubclass(execution_profile.row_factory, _GraphSONContextRowFactory): * execution_profile.row_factory = execution_profile.row_factory(self.cluster) */ __pyx_L8_except_error:; __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_L1_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:; } /* "cassandra/cluster.py":2867 * * # set graph paging if needed * self._maybe_set_graph_paging(execution_profile) # <<<<<<<<<<<<<< * * graph_parameters = None */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_execution_profile}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_maybe_set_graph_paging, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2869 * self._maybe_set_graph_paging(execution_profile) * * graph_parameters = None # <<<<<<<<<<<<<< * if parameters: * graph_parameters = self._transform_params(parameters, graph_options=execution_profile.graph_options) */ __Pyx_INCREF(Py_None); __pyx_v_graph_parameters = Py_None; /* "cassandra/cluster.py":2870 * * graph_parameters = None * if parameters: # <<<<<<<<<<<<<< * graph_parameters = self._transform_params(parameters, graph_options=execution_profile.graph_options) * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_parameters); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2870, __pyx_L1_error) if (__pyx_t_4) { /* "cassandra/cluster.py":2871 * graph_parameters = None * if parameters: * graph_parameters = self._transform_params(parameters, graph_options=execution_profile.graph_options) # <<<<<<<<<<<<<< * * custom_payload = execution_profile.graph_options.get_options_map() */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_parameters}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_graph_options, __pyx_t_3, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2871, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_transform_params, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_graph_parameters, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2870 * * graph_parameters = None * if parameters: # <<<<<<<<<<<<<< * graph_parameters = self._transform_params(parameters, graph_options=execution_profile.graph_options) * */ } /* "cassandra/cluster.py":2873 * graph_parameters = self._transform_params(parameters, graph_options=execution_profile.graph_options) * * custom_payload = execution_profile.graph_options.get_options_map() # <<<<<<<<<<<<<< * if execute_as: * custom_payload[_proxy_execute_key] = execute_as.encode() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __pyx_t_3; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_options_map, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_custom_payload = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2874 * * custom_payload = execution_profile.graph_options.get_options_map() * if execute_as: # <<<<<<<<<<<<<< * custom_payload[_proxy_execute_key] = execute_as.encode() * custom_payload[_request_timeout_key] = int64_pack(int(execution_profile.request_timeout * 1000)) */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_execute_as); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2874, __pyx_L1_error) if (__pyx_t_4) { /* "cassandra/cluster.py":2875 * custom_payload = execution_profile.graph_options.get_options_map() * if execute_as: * custom_payload[_proxy_execute_key] = execute_as.encode() # <<<<<<<<<<<<<< * custom_payload[_request_timeout_key] = int64_pack(int(execution_profile.request_timeout * 1000)) * */ __pyx_t_3 = __pyx_v_execute_as; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_proxy_execute_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_v_custom_payload, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 2875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2874 * * custom_payload = execution_profile.graph_options.get_options_map() * if execute_as: # <<<<<<<<<<<<<< * custom_payload[_proxy_execute_key] = execute_as.encode() * custom_payload[_request_timeout_key] = int64_pack(int(execution_profile.request_timeout * 1000)) */ } /* "cassandra/cluster.py":2876 * if execute_as: * custom_payload[_proxy_execute_key] = execute_as.encode() * custom_payload[_request_timeout_key] = int64_pack(int(execution_profile.request_timeout * 1000)) # <<<<<<<<<<<<<< * * future = self._create_response_future(query, parameters=None, trace=trace, custom_payload=custom_payload, */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_int64_pack); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_request_timeout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyLong_MultiplyObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1000, 0x3E8, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_request_timeout_key); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (unlikely((PyObject_SetItem(__pyx_v_custom_payload, __pyx_t_11, __pyx_t_1) < 0))) __PYX_ERR(0, 2876, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2878 * custom_payload[_request_timeout_key] = int64_pack(int(execution_profile.request_timeout * 1000)) * * future = self._create_response_future(query, parameters=None, trace=trace, custom_payload=custom_payload, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=execution_profile) * */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); /* "cassandra/cluster.py":2879 * * future = self._create_response_future(query, parameters=None, trace=trace, custom_payload=custom_payload, * timeout=_NOT_SET, execution_profile=execution_profile) # <<<<<<<<<<<<<< * * future.message.query_params = graph_parameters */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 5 : 0)] = {__pyx_t_11, __pyx_v_query}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_parameters, Py_None, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2878, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_trace, __pyx_v_trace, __pyx_t_3, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2878, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_custom_payload, __pyx_v_custom_payload, __pyx_t_3, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 2878, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_2, __pyx_t_3, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 2878, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_execution_profile, __pyx_v_execution_profile, __pyx_t_3, __pyx_callargs+2, 4) < (0)) __PYX_ERR(0, 2878, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_create_response_future, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_future = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2881 * timeout=_NOT_SET, execution_profile=execution_profile) * * future.message.query_params = graph_parameters # <<<<<<<<<<<<<< * future._protocol_handler = self.client_protocol_handler * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_query_params, __pyx_v_graph_parameters) < (0)) __PYX_ERR(0, 2881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2882 * * future.message.query_params = graph_parameters * future._protocol_handler = self.client_protocol_handler # <<<<<<<<<<<<<< * * if execution_profile.graph_options.is_analytics_source and \ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_client_protocol_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_protocol_handler, __pyx_t_1) < (0)) __PYX_ERR(0, 2882, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2884 * future._protocol_handler = self.client_protocol_handler * * if execution_profile.graph_options.is_analytics_source and \ # <<<<<<<<<<<<<< * isinstance(execution_profile.load_balancing_policy, DefaultLoadBalancingPolicy): * self._target_analytics_master(future) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_is_analytics_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { } else { __pyx_t_4 = __pyx_t_6; goto __pyx_L18_bool_binop_done; } /* "cassandra/cluster.py":2885 * * if execution_profile.graph_options.is_analytics_source and \ * isinstance(execution_profile.load_balancing_policy, DefaultLoadBalancingPolicy): # <<<<<<<<<<<<<< * self._target_analytics_master(future) * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DefaultLoadBalancingPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyObject_IsInstance(__pyx_t_3, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_6; __pyx_L18_bool_binop_done:; /* "cassandra/cluster.py":2884 * future._protocol_handler = self.client_protocol_handler * * if execution_profile.graph_options.is_analytics_source and \ # <<<<<<<<<<<<<< * isinstance(execution_profile.load_balancing_policy, DefaultLoadBalancingPolicy): * self._target_analytics_master(future) */ if (__pyx_t_4) { /* "cassandra/cluster.py":2886 * if execution_profile.graph_options.is_analytics_source and \ * isinstance(execution_profile.load_balancing_policy, DefaultLoadBalancingPolicy): * self._target_analytics_master(future) # <<<<<<<<<<<<<< * else: * future.send_request() */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_future}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_target_analytics_master, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2884 * future._protocol_handler = self.client_protocol_handler * * if execution_profile.graph_options.is_analytics_source and \ # <<<<<<<<<<<<<< * isinstance(execution_profile.load_balancing_policy, DefaultLoadBalancingPolicy): * self._target_analytics_master(future) */ goto __pyx_L17; } /* "cassandra/cluster.py":2888 * self._target_analytics_master(future) * else: * future.send_request() # <<<<<<<<<<<<<< * return future * */ /*else*/ { __pyx_t_3 = __pyx_v_future; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L17:; /* "cassandra/cluster.py":2889 * else: * future.send_request() * return future # <<<<<<<<<<<<<< * * def _maybe_set_graph_paging(self, execution_profile): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_future); __pyx_r = __pyx_v_future; goto __pyx_L0; /* "cassandra/cluster.py":2835 * return self.execute_graph_async(query, parameters, trace, execution_profile, execute_as).result() * * def execute_graph_async(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the graph query and return a :class:`ResponseFuture` */ /* 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_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("cassandra.cluster.Session.execute_graph_async", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_graph_parameters); __Pyx_XDECREF(__pyx_v_custom_payload); __Pyx_XDECREF(__pyx_v_future); __Pyx_XDECREF(__pyx_v_query); __Pyx_XDECREF(__pyx_v_execution_profile); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2891 * return future * * def _maybe_set_graph_paging(self, execution_profile): # <<<<<<<<<<<<<< * graph_paging = execution_profile.continuous_paging_options * if execution_profile.continuous_paging_options is _NOT_SET: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_33_maybe_set_graph_paging(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_33_maybe_set_graph_paging = {"_maybe_set_graph_paging", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_33_maybe_set_graph_paging, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_33_maybe_set_graph_paging(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_execution_profile = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_maybe_set_graph_paging (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_execution_profile,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2891, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2891, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2891, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_maybe_set_graph_paging", 0) < (0)) __PYX_ERR(0, 2891, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_maybe_set_graph_paging", 1, 2, 2, i); __PYX_ERR(0, 2891, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2891, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2891, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_execution_profile = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_maybe_set_graph_paging", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2891, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._maybe_set_graph_paging", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_32_maybe_set_graph_paging(__pyx_self, __pyx_v_self, __pyx_v_execution_profile); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_32_maybe_set_graph_paging(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_execution_profile) { PyObject *__pyx_v_graph_paging = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_set_graph_paging", 0); /* "cassandra/cluster.py":2892 * * def _maybe_set_graph_paging(self, execution_profile): * graph_paging = execution_profile.continuous_paging_options # <<<<<<<<<<<<<< * if execution_profile.continuous_paging_options is _NOT_SET: * graph_paging = ContinuousPagingOptions() if self._graph_paging_available else None */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_continuous_paging_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_graph_paging = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2893 * def _maybe_set_graph_paging(self, execution_profile): * graph_paging = execution_profile.continuous_paging_options * if execution_profile.continuous_paging_options is _NOT_SET: # <<<<<<<<<<<<<< * graph_paging = ContinuousPagingOptions() if self._graph_paging_available else None * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_continuous_paging_options); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_t_1 == __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":2894 * graph_paging = execution_profile.continuous_paging_options * if execution_profile.continuous_paging_options is _NOT_SET: * graph_paging = ContinuousPagingOptions() if self._graph_paging_available else None # <<<<<<<<<<<<<< * * execution_profile.continuous_paging_options = graph_paging */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_graph_paging_available); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_2 = Py_None; } __Pyx_DECREF_SET(__pyx_v_graph_paging, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2893 * def _maybe_set_graph_paging(self, execution_profile): * graph_paging = execution_profile.continuous_paging_options * if execution_profile.continuous_paging_options is _NOT_SET: # <<<<<<<<<<<<<< * graph_paging = ContinuousPagingOptions() if self._graph_paging_available else None * */ } /* "cassandra/cluster.py":2896 * graph_paging = ContinuousPagingOptions() if self._graph_paging_available else None * * execution_profile.continuous_paging_options = graph_paging # <<<<<<<<<<<<<< * * def _check_graph_paging_available(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_continuous_paging_options, __pyx_v_graph_paging) < (0)) __PYX_ERR(0, 2896, __pyx_L1_error) /* "cassandra/cluster.py":2891 * return future * * def _maybe_set_graph_paging(self, execution_profile): # <<<<<<<<<<<<<< * graph_paging = execution_profile.continuous_paging_options * if execution_profile.continuous_paging_options is _NOT_SET: */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Session._maybe_set_graph_paging", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_graph_paging); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2898 * execution_profile.continuous_paging_options = graph_paging * * def _check_graph_paging_available(self): # <<<<<<<<<<<<<< * """Verify if we can enable graph paging. This executed only once when the session is created.""" * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_35_check_graph_paging_available(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_34_check_graph_paging_available, "Verify if we can enable graph paging. This executed only once when the session is created."); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_35_check_graph_paging_available = {"_check_graph_paging_available", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_35_check_graph_paging_available, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_34_check_graph_paging_available}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_35_check_graph_paging_available(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_check_graph_paging_available (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2898, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2898, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_check_graph_paging_available", 0) < (0)) __PYX_ERR(0, 2898, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_check_graph_paging_available", 1, 1, 1, i); __PYX_ERR(0, 2898, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2898, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_check_graph_paging_available", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2898, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._check_graph_paging_available", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_34_check_graph_paging_available(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_34_check_graph_paging_available(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_version = 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; size_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_graph_paging_available", 0); /* "cassandra/cluster.py":2901 * """Verify if we can enable graph paging. This executed only once when the session is created.""" * * if not ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version): # <<<<<<<<<<<<<< * return False * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_has_continuous_paging_next_pages); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { /* "cassandra/cluster.py":2902 * * if not ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version): * return False # <<<<<<<<<<<<<< * * for host in self.cluster.metadata.all_hosts(): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":2901 * """Verify if we can enable graph paging. This executed only once when the session is created.""" * * if not ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version): # <<<<<<<<<<<<<< * return False * */ } /* "cassandra/cluster.py":2904 * return False * * for host in self.cluster.metadata.all_hosts(): # <<<<<<<<<<<<<< * if host.dse_version is None: * return False */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __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_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2904, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2904, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_8; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2904, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); #endif ++__pyx_t_8; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2904, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_9(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 2904, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2905 * * for host in self.cluster.metadata.all_hosts(): * if host.dse_version is None: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":2906 * for host in self.cluster.metadata.all_hosts(): * if host.dse_version is None: * return False # <<<<<<<<<<<<<< * * version = Version(host.dse_version) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2905 * * for host in self.cluster.metadata.all_hosts(): * if host.dse_version is None: # <<<<<<<<<<<<<< * return False * */ } /* "cassandra/cluster.py":2908 * return False * * version = Version(host.dse_version) # <<<<<<<<<<<<<< * if version < _GRAPH_PAGING_MIN_DSE_VERSION: * return False */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_version); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_version, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2909 * * version = Version(host.dse_version) * if version < _GRAPH_PAGING_MIN_DSE_VERSION: # <<<<<<<<<<<<<< * return False * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_GRAPH_PAGING_MIN_DSE_VERSION); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_v_version, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":2910 * version = Version(host.dse_version) * if version < _GRAPH_PAGING_MIN_DSE_VERSION: * return False # <<<<<<<<<<<<<< * * return True */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2909 * * version = Version(host.dse_version) * if version < _GRAPH_PAGING_MIN_DSE_VERSION: # <<<<<<<<<<<<<< * return False * */ } /* "cassandra/cluster.py":2904 * return False * * for host in self.cluster.metadata.all_hosts(): # <<<<<<<<<<<<<< * if host.dse_version is None: * return False */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":2912 * return False * * return True # <<<<<<<<<<<<<< * * def _resolve_execution_profile_options(self, execution_profile): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "cassandra/cluster.py":2898 * execution_profile.continuous_paging_options = graph_paging * * def _check_graph_paging_available(self): # <<<<<<<<<<<<<< * """Verify if we can enable graph paging. This executed only once when the session is created.""" * */ /* 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_10); __Pyx_AddTraceback("cassandra.cluster.Session._check_graph_paging_available", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_version); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2914 * return True * * def _resolve_execution_profile_options(self, execution_profile): # <<<<<<<<<<<<<< * """ * Determine the GraphSON protocol and row factory for a graph query. This is useful */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_37_resolve_execution_profile_options(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_36_resolve_execution_profile_options, "\n Determine the GraphSON protocol and row factory for a graph query. This is useful\n to configure automatically the execution profile when executing a query on a\n core graph.\n\n If `graph_protocol` is not explicitly specified, the following rules apply:\n - Default to GraphProtocol.GRAPHSON_1_0, or GRAPHSON_2_0 if the `graph_language` is not gremlin-groovy.\n - If `graph_options.graph_name` is specified and is a Core graph, set GraphSON_3_0.\n If `row_factory` is not explicitly specified, the following rules apply:\n - Default to graph_object_row_factory.\n - If `graph_options.graph_name` is specified and is a Core graph, set graph_graphson3_row_factory.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_37_resolve_execution_profile_options = {"_resolve_execution_profile_options", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_37_resolve_execution_profile_options, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_36_resolve_execution_profile_options}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_37_resolve_execution_profile_options(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_execution_profile = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_resolve_execution_profile_options (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_execution_profile,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2914, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2914, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2914, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_resolve_execution_profile_options", 0) < (0)) __PYX_ERR(0, 2914, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_resolve_execution_profile_options", 1, 2, 2, i); __PYX_ERR(0, 2914, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2914, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2914, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_execution_profile = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_resolve_execution_profile_options", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2914, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._resolve_execution_profile_options", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_36_resolve_execution_profile_options(__pyx_self, __pyx_v_self, __pyx_v_execution_profile); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_36_resolve_execution_profile_options(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_execution_profile) { PyObject *__pyx_v_graph_options = NULL; int __pyx_v_is_core_graph; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_ks_metadata = NULL; PyObject *__pyx_v_graph_protocol = NULL; PyObject *__pyx_v_row_factory = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_resolve_execution_profile_options", 0); /* "cassandra/cluster.py":2927 * - If `graph_options.graph_name` is specified and is a Core graph, set graph_graphson3_row_factory. * """ * if execution_profile.graph_options.graph_protocol is not None and \ # <<<<<<<<<<<<<< * execution_profile.row_factory is not None: * return */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_graph_protocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != Py_None); __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; } /* "cassandra/cluster.py":2928 * """ * if execution_profile.graph_options.graph_protocol is not None and \ * execution_profile.row_factory is not None: # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; /* "cassandra/cluster.py":2927 * - If `graph_options.graph_name` is specified and is a Core graph, set graph_graphson3_row_factory. * """ * if execution_profile.graph_options.graph_protocol is not None and \ # <<<<<<<<<<<<<< * execution_profile.row_factory is not None: * return */ if (__pyx_t_1) { /* "cassandra/cluster.py":2929 * if execution_profile.graph_options.graph_protocol is not None and \ * execution_profile.row_factory is not None: * return # <<<<<<<<<<<<<< * * graph_options = execution_profile.graph_options */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":2927 * - If `graph_options.graph_name` is specified and is a Core graph, set graph_graphson3_row_factory. * """ * if execution_profile.graph_options.graph_protocol is not None and \ # <<<<<<<<<<<<<< * execution_profile.row_factory is not None: * return */ } /* "cassandra/cluster.py":2931 * return * * graph_options = execution_profile.graph_options # <<<<<<<<<<<<<< * * is_core_graph = False */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_graph_options); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_graph_options = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2933 * graph_options = execution_profile.graph_options * * is_core_graph = False # <<<<<<<<<<<<<< * if graph_options.graph_name: * # graph_options.graph_name is bytes ... */ __pyx_v_is_core_graph = 0; /* "cassandra/cluster.py":2934 * * is_core_graph = False * if graph_options.graph_name: # <<<<<<<<<<<<<< * # graph_options.graph_name is bytes ... * name = graph_options.graph_name.decode('utf-8') */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2936 * if graph_options.graph_name: * # graph_options.graph_name is bytes ... * name = graph_options.graph_name.decode('utf-8') # <<<<<<<<<<<<<< * if name in self.cluster.metadata.keyspaces: * ks_metadata = self.cluster.metadata.keyspaces[name] */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_utf_8}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_name = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2937 * # graph_options.graph_name is bytes ... * name = graph_options.graph_name.decode('utf-8') * if name in self.cluster.metadata.keyspaces: # <<<<<<<<<<<<<< * ks_metadata = self.cluster.metadata.keyspaces[name] * if ks_metadata.graph_engine == 'Core': */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_keyspaces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2938 * name = graph_options.graph_name.decode('utf-8') * if name in self.cluster.metadata.keyspaces: * ks_metadata = self.cluster.metadata.keyspaces[name] # <<<<<<<<<<<<<< * if ks_metadata.graph_engine == 'Core': * is_core_graph = True */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_keyspaces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_ks_metadata = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":2939 * if name in self.cluster.metadata.keyspaces: * ks_metadata = self.cluster.metadata.keyspaces[name] * if ks_metadata.graph_engine == 'Core': # <<<<<<<<<<<<<< * is_core_graph = True * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ks_metadata, __pyx_mstate_global->__pyx_n_u_graph_engine); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2939, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Core, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2939, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2940 * ks_metadata = self.cluster.metadata.keyspaces[name] * if ks_metadata.graph_engine == 'Core': * is_core_graph = True # <<<<<<<<<<<<<< * * if is_core_graph: */ __pyx_v_is_core_graph = 1; /* "cassandra/cluster.py":2939 * if name in self.cluster.metadata.keyspaces: * ks_metadata = self.cluster.metadata.keyspaces[name] * if ks_metadata.graph_engine == 'Core': # <<<<<<<<<<<<<< * is_core_graph = True * */ } /* "cassandra/cluster.py":2937 * # graph_options.graph_name is bytes ... * name = graph_options.graph_name.decode('utf-8') * if name in self.cluster.metadata.keyspaces: # <<<<<<<<<<<<<< * ks_metadata = self.cluster.metadata.keyspaces[name] * if ks_metadata.graph_engine == 'Core': */ } /* "cassandra/cluster.py":2934 * * is_core_graph = False * if graph_options.graph_name: # <<<<<<<<<<<<<< * # graph_options.graph_name is bytes ... * name = graph_options.graph_name.decode('utf-8') */ } /* "cassandra/cluster.py":2942 * is_core_graph = True * * if is_core_graph: # <<<<<<<<<<<<<< * graph_protocol = GraphProtocol.GRAPHSON_3_0 * row_factory = graph_graphson3_row_factory */ if (__pyx_v_is_core_graph) { /* "cassandra/cluster.py":2943 * * if is_core_graph: * graph_protocol = GraphProtocol.GRAPHSON_3_0 # <<<<<<<<<<<<<< * row_factory = graph_graphson3_row_factory * else: */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GraphProtocol); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GRAPHSON_3_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_graph_protocol = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2944 * if is_core_graph: * graph_protocol = GraphProtocol.GRAPHSON_3_0 * row_factory = graph_graphson3_row_factory # <<<<<<<<<<<<<< * else: * if graph_options.graph_language == GraphOptions.DEFAULT_GRAPH_LANGUAGE: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_graph_graphson3_row_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2944, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_row_factory = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2942 * is_core_graph = True * * if is_core_graph: # <<<<<<<<<<<<<< * graph_protocol = GraphProtocol.GRAPHSON_3_0 * row_factory = graph_graphson3_row_factory */ goto __pyx_L9; } /* "cassandra/cluster.py":2946 * row_factory = graph_graphson3_row_factory * else: * if graph_options.graph_language == GraphOptions.DEFAULT_GRAPH_LANGUAGE: # <<<<<<<<<<<<<< * graph_protocol = GraphOptions.DEFAULT_GRAPH_PROTOCOL * row_factory = graph_object_row_factory */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_language); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GraphOptions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DEFAULT_GRAPH_LANGUAGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2946, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 2946, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2947 * else: * if graph_options.graph_language == GraphOptions.DEFAULT_GRAPH_LANGUAGE: * graph_protocol = GraphOptions.DEFAULT_GRAPH_PROTOCOL # <<<<<<<<<<<<<< * row_factory = graph_object_row_factory * else: */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_GraphOptions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_DEFAULT_GRAPH_PROTOCOL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_graph_protocol = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":2948 * if graph_options.graph_language == GraphOptions.DEFAULT_GRAPH_LANGUAGE: * graph_protocol = GraphOptions.DEFAULT_GRAPH_PROTOCOL * row_factory = graph_object_row_factory # <<<<<<<<<<<<<< * else: * # if not gremlin-groovy, GraphSON_2_0 */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_graph_object_row_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_row_factory = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":2946 * row_factory = graph_graphson3_row_factory * else: * if graph_options.graph_language == GraphOptions.DEFAULT_GRAPH_LANGUAGE: # <<<<<<<<<<<<<< * graph_protocol = GraphOptions.DEFAULT_GRAPH_PROTOCOL * row_factory = graph_object_row_factory */ goto __pyx_L10; } /* "cassandra/cluster.py":2951 * else: * # if not gremlin-groovy, GraphSON_2_0 * graph_protocol = GraphProtocol.GRAPHSON_2_0 # <<<<<<<<<<<<<< * row_factory = graph_graphson2_row_factory * */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GraphProtocol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_GRAPHSON_2_0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_graph_protocol = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":2952 * # if not gremlin-groovy, GraphSON_2_0 * graph_protocol = GraphProtocol.GRAPHSON_2_0 * row_factory = graph_graphson2_row_factory # <<<<<<<<<<<<<< * * # Only apply if not set explicitly */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_graph_graphson2_row_factory); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_row_factory = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L10:; } __pyx_L9:; /* "cassandra/cluster.py":2955 * * # Only apply if not set explicitly * if graph_options.graph_protocol is None: # <<<<<<<<<<<<<< * graph_options.graph_protocol = graph_protocol * if execution_profile.row_factory is None: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_protocol); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = (__pyx_t_5 == Py_None); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2956 * # Only apply if not set explicitly * if graph_options.graph_protocol is None: * graph_options.graph_protocol = graph_protocol # <<<<<<<<<<<<<< * if execution_profile.row_factory is None: * execution_profile.row_factory = row_factory */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_protocol, __pyx_v_graph_protocol) < (0)) __PYX_ERR(0, 2956, __pyx_L1_error) /* "cassandra/cluster.py":2955 * * # Only apply if not set explicitly * if graph_options.graph_protocol is None: # <<<<<<<<<<<<<< * graph_options.graph_protocol = graph_protocol * if execution_profile.row_factory is None: */ } /* "cassandra/cluster.py":2957 * if graph_options.graph_protocol is None: * graph_options.graph_protocol = graph_protocol * if execution_profile.row_factory is None: # <<<<<<<<<<<<<< * execution_profile.row_factory = row_factory * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = (__pyx_t_5 == Py_None); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":2958 * graph_options.graph_protocol = graph_protocol * if execution_profile.row_factory is None: * execution_profile.row_factory = row_factory # <<<<<<<<<<<<<< * * def _transform_params(self, parameters, graph_options): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_v_row_factory) < (0)) __PYX_ERR(0, 2958, __pyx_L1_error) /* "cassandra/cluster.py":2957 * if graph_options.graph_protocol is None: * graph_options.graph_protocol = graph_protocol * if execution_profile.row_factory is None: # <<<<<<<<<<<<<< * execution_profile.row_factory = row_factory * */ } /* "cassandra/cluster.py":2914 * return True * * def _resolve_execution_profile_options(self, execution_profile): # <<<<<<<<<<<<<< * """ * Determine the GraphSON protocol and row factory for a graph query. This is useful */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Session._resolve_execution_profile_options", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_graph_options); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_ks_metadata); __Pyx_XDECREF(__pyx_v_graph_protocol); __Pyx_XDECREF(__pyx_v_row_factory); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2960 * execution_profile.row_factory = row_factory * * def _transform_params(self, parameters, graph_options): # <<<<<<<<<<<<<< * if not isinstance(parameters, dict): * raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_39_transform_params(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_39_transform_params = {"_transform_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_39_transform_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_39_transform_params(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_graph_options = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_transform_params (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_parameters,&__pyx_mstate_global->__pyx_n_u_graph_options,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2960, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2960, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_transform_params", 0) < (0)) __PYX_ERR(0, 2960, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_transform_params", 1, 3, 3, i); __PYX_ERR(0, 2960, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2960, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2960, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2960, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_parameters = values[1]; __pyx_v_graph_options = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_transform_params", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2960, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._transform_params", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_38_transform_params(__pyx_self, __pyx_v_self, __pyx_v_parameters, __pyx_v_graph_options); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_38_transform_params(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_parameters, PyObject *__pyx_v_graph_options) { PyObject *__pyx_v_serializer = NULL; PyObject *__pyx_v_context = NULL; PyObject *__pyx_v_serialized_parameters = 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; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_transform_params", 0); /* "cassandra/cluster.py":2961 * * def _transform_params(self, parameters, graph_options): * if not isinstance(parameters, dict): # <<<<<<<<<<<<<< * raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') * */ __pyx_t_1 = PyDict_Check(__pyx_v_parameters); __pyx_t_2 = (!__pyx_t_1); if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":2962 * def _transform_params(self, parameters, graph_options): * if not isinstance(parameters, dict): * raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') # <<<<<<<<<<<<<< * * # Serialize python types to graphson */ __pyx_t_4 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_The_parameters_must_be_a_diction}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 2962, __pyx_L1_error) /* "cassandra/cluster.py":2961 * * def _transform_params(self, parameters, graph_options): * if not isinstance(parameters, dict): # <<<<<<<<<<<<<< * raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') * */ } /* "cassandra/cluster.py":2965 * * # Serialize python types to graphson * serializer = GraphSON1Serializer # <<<<<<<<<<<<<< * if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: * serializer = GraphSON2Serializer() */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GraphSON1Serializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_serializer = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2966 * # Serialize python types to graphson * serializer = GraphSON1Serializer * if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: # <<<<<<<<<<<<<< * serializer = GraphSON2Serializer() * elif graph_options.graph_protocol == GraphProtocol.GRAPHSON_3_0: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_protocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GraphProtocol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GRAPHSON_2_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2966, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":2967 * serializer = GraphSON1Serializer * if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: * serializer = GraphSON2Serializer() # <<<<<<<<<<<<<< * elif graph_options.graph_protocol == GraphProtocol.GRAPHSON_3_0: * # only required for core graphs */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GraphSON2Serializer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF_SET(__pyx_v_serializer, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2966 * # Serialize python types to graphson * serializer = GraphSON1Serializer * if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: # <<<<<<<<<<<<<< * serializer = GraphSON2Serializer() * elif graph_options.graph_protocol == GraphProtocol.GRAPHSON_3_0: */ goto __pyx_L4; } /* "cassandra/cluster.py":2968 * if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: * serializer = GraphSON2Serializer() * elif graph_options.graph_protocol == GraphProtocol.GRAPHSON_3_0: # <<<<<<<<<<<<<< * # only required for core graphs * context = { */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_protocol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GraphProtocol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_GRAPHSON_3_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":2971 * # only required for core graphs * context = { * 'cluster': self.cluster, # <<<<<<<<<<<<<< * 'graph_name': graph_options.graph_name.decode('utf-8') if graph_options.graph_name else None * } */ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cluster, __pyx_t_6) < (0)) __PYX_ERR(0, 2971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":2972 * context = { * 'cluster': self.cluster, * 'graph_name': graph_options.graph_name.decode('utf-8') if graph_options.graph_name else None # <<<<<<<<<<<<<< * } * serializer = GraphSON3Serializer(context) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_graph_options, __pyx_mstate_global->__pyx_n_u_graph_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_utf_8}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_decode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __pyx_t_4; __pyx_t_4 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_6 = Py_None; } if (PyDict_SetItem(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_graph_name, __pyx_t_6) < (0)) __PYX_ERR(0, 2971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_context = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2974 * 'graph_name': graph_options.graph_name.decode('utf-8') if graph_options.graph_name else None * } * serializer = GraphSON3Serializer(context) # <<<<<<<<<<<<<< * * serialized_parameters = serializer.serialize(parameters) */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GraphSON3Serializer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_context}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF_SET(__pyx_v_serializer, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":2968 * if graph_options.graph_protocol == GraphProtocol.GRAPHSON_2_0: * serializer = GraphSON2Serializer() * elif graph_options.graph_protocol == GraphProtocol.GRAPHSON_3_0: # <<<<<<<<<<<<<< * # only required for core graphs * context = { */ } __pyx_L4:; /* "cassandra/cluster.py":2976 * serializer = GraphSON3Serializer(context) * * serialized_parameters = serializer.serialize(parameters) # <<<<<<<<<<<<<< * return [json.dumps(serialized_parameters).encode('utf-8')] * */ __pyx_t_4 = __pyx_v_serializer; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_parameters}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_serialize, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_serialized_parameters = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":2977 * * serialized_parameters = serializer.serialize(parameters) * return [json.dumps(serialized_parameters).encode('utf-8')] # <<<<<<<<<<<<<< * * def _target_analytics_master(self, future): */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_json); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dumps); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_serialized_parameters}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_utf_8}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 2977, __pyx_L1_error); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "cassandra/cluster.py":2960 * execution_profile.row_factory = row_factory * * def _transform_params(self, parameters, graph_options): # <<<<<<<<<<<<<< * if not isinstance(parameters, dict): * raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster.Session._transform_params", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_serializer); __Pyx_XDECREF(__pyx_v_context); __Pyx_XDECREF(__pyx_v_serialized_parameters); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2979 * return [json.dumps(serialized_parameters).encode('utf-8')] * * def _target_analytics_master(self, future): # <<<<<<<<<<<<<< * future._start_timer() * master_query_future = self._create_response_future("CALL DseClientTool.getAnalyticsGraphServer()", */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_41_target_analytics_master(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_41_target_analytics_master = {"_target_analytics_master", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_41_target_analytics_master, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_41_target_analytics_master(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_target_analytics_master (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2979, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2979, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2979, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_target_analytics_master", 0) < (0)) __PYX_ERR(0, 2979, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_target_analytics_master", 1, 2, 2, i); __PYX_ERR(0, 2979, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2979, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2979, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_future = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_target_analytics_master", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 2979, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._target_analytics_master", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_40_target_analytics_master(__pyx_self, __pyx_v_self, __pyx_v_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_40_target_analytics_master(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_future) { PyObject *__pyx_v_master_query_future = NULL; PyObject *__pyx_v_cb = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_target_analytics_master", 0); /* "cassandra/cluster.py":2980 * * def _target_analytics_master(self, future): * future._start_timer() # <<<<<<<<<<<<<< * master_query_future = self._create_response_future("CALL DseClientTool.getAnalyticsGraphServer()", * parameters=None, trace=False, */ __pyx_t_2 = __pyx_v_future; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_timer, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2981 * def _target_analytics_master(self, future): * future._start_timer() * master_query_future = self._create_response_future("CALL DseClientTool.getAnalyticsGraphServer()", # <<<<<<<<<<<<<< * parameters=None, trace=False, * custom_payload=None, timeout=future.timeout) */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); /* "cassandra/cluster.py":2983 * master_query_future = self._create_response_future("CALL DseClientTool.getAnalyticsGraphServer()", * parameters=None, trace=False, * custom_payload=None, timeout=future.timeout) # <<<<<<<<<<<<<< * master_query_future.row_factory = tuple_factory * master_query_future.send_request() */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_CALL_DseClientTool_getAnalyticsG}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_parameters, Py_None, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 2981, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_trace, Py_False, __pyx_t_5, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 2981, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_custom_payload, Py_None, __pyx_t_5, __pyx_callargs+2, 2) < (0)) __PYX_ERR(0, 2981, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_4, __pyx_t_5, __pyx_callargs+2, 3) < (0)) __PYX_ERR(0, 2981, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_create_response_future, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_master_query_future = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2984 * parameters=None, trace=False, * custom_payload=None, timeout=future.timeout) * master_query_future.row_factory = tuple_factory # <<<<<<<<<<<<<< * master_query_future.send_request() * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tuple_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_master_query_future, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_1) < (0)) __PYX_ERR(0, 2984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2985 * custom_payload=None, timeout=future.timeout) * master_query_future.row_factory = tuple_factory * master_query_future.send_request() # <<<<<<<<<<<<<< * * cb = self._on_analytics_master_result */ __pyx_t_5 = __pyx_v_master_query_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2987 * master_query_future.send_request() * * cb = self._on_analytics_master_result # <<<<<<<<<<<<<< * args = (master_query_future, future) * master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_analytics_master_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2987, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cb = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":2988 * * cb = self._on_analytics_master_result * args = (master_query_future, future) # <<<<<<<<<<<<<< * master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) * */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_master_query_future); __Pyx_GIVEREF(__pyx_v_master_query_future); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_master_query_future) != (0)) __PYX_ERR(0, 2988, __pyx_L1_error); __Pyx_INCREF(__pyx_v_future); __Pyx_GIVEREF(__pyx_v_future); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_future) != (0)) __PYX_ERR(0, 2988, __pyx_L1_error); __pyx_v_args = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2989 * cb = self._on_analytics_master_result * args = (master_query_future, future) * master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) # <<<<<<<<<<<<<< * * def _on_analytics_master_result(self, response, master_future, query_future): */ __pyx_t_5 = __pyx_v_master_query_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_callback, __pyx_v_cb, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 2989, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_callback_args, __pyx_v_args, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 2989, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_errback, __pyx_v_cb, __pyx_t_4, __pyx_callargs+1, 2) < (0)) __PYX_ERR(0, 2989, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_errback_args, __pyx_v_args, __pyx_t_4, __pyx_callargs+1, 3) < (0)) __PYX_ERR(0, 2989, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_add_callbacks, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __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(0, 2989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":2979 * return [json.dumps(serialized_parameters).encode('utf-8')] * * def _target_analytics_master(self, future): # <<<<<<<<<<<<<< * future._start_timer() * master_query_future = self._create_response_future("CALL DseClientTool.getAnalyticsGraphServer()", */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.Session._target_analytics_master", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_master_query_future); __Pyx_XDECREF(__pyx_v_cb); __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":2991 * master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) * * def _on_analytics_master_result(self, response, master_future, query_future): # <<<<<<<<<<<<<< * try: * row = master_future.result()[0] */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_43_on_analytics_master_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_43_on_analytics_master_result = {"_on_analytics_master_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_43_on_analytics_master_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_43_on_analytics_master_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_response = 0; PyObject *__pyx_v_master_future = 0; PyObject *__pyx_v_query_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_on_analytics_master_result (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_response,&__pyx_mstate_global->__pyx_n_u_master_future,&__pyx_mstate_global->__pyx_n_u_query_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 2991, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2991, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2991, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2991, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2991, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_on_analytics_master_result", 0) < (0)) __PYX_ERR(0, 2991, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_on_analytics_master_result", 1, 4, 4, i); __PYX_ERR(0, 2991, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 2991, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 2991, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 2991, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 2991, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_response = values[1]; __pyx_v_master_future = values[2]; __pyx_v_query_future = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_on_analytics_master_result", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 2991, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._on_analytics_master_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_42_on_analytics_master_result(__pyx_self, __pyx_v_self, __pyx_v_response, __pyx_v_master_future, __pyx_v_query_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_42_on_analytics_master_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_response, PyObject *__pyx_v_master_future, PyObject *__pyx_v_query_future) { PyObject *__pyx_v_row = NULL; PyObject *__pyx_v_addr = NULL; PyObject *__pyx_v_delimiter_index = NULL; PyObject *__pyx_v_targeted_query = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_on_analytics_master_result", 0); /* "cassandra/cluster.py":2992 * * def _on_analytics_master_result(self, response, master_future, query_future): * try: # <<<<<<<<<<<<<< * row = master_future.result()[0] * addr = row[0]['location'] */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":2993 * def _on_analytics_master_result(self, response, master_future, query_future): * try: * row = master_future.result()[0] # <<<<<<<<<<<<<< * addr = row[0]['location'] * delimiter_index = addr.rfind(':') # assumes : - not robust, but that's what is being provided */ __pyx_t_5 = __pyx_v_master_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2993, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2993, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_row = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":2994 * try: * row = master_future.result()[0] * addr = row[0]['location'] # <<<<<<<<<<<<<< * delimiter_index = addr.rfind(':') # assumes : - not robust, but that's what is being provided * if delimiter_index > 0: */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_row, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2994, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_location); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2994, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_addr = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":2995 * row = master_future.result()[0] * addr = row[0]['location'] * delimiter_index = addr.rfind(':') # assumes : - not robust, but that's what is being provided # <<<<<<<<<<<<<< * if delimiter_index > 0: * addr = addr[:delimiter_index] */ __pyx_t_5 = __pyx_v_addr; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u__4}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_rfind, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2995, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_delimiter_index = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":2996 * addr = row[0]['location'] * delimiter_index = addr.rfind(':') # assumes : - not robust, but that's what is being provided * if delimiter_index > 0: # <<<<<<<<<<<<<< * addr = addr[:delimiter_index] * targeted_query = HostTargetingStatement(query_future.query, addr) */ __pyx_t_4 = PyObject_RichCompare(__pyx_v_delimiter_index, __pyx_mstate_global->__pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2996, __pyx_L3_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2996, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":2997 * delimiter_index = addr.rfind(':') # assumes : - not robust, but that's what is being provided * if delimiter_index > 0: * addr = addr[:delimiter_index] # <<<<<<<<<<<<<< * targeted_query = HostTargetingStatement(query_future.query, addr) * query_future.query_plan = query_future._load_balancer.make_query_plan(self.keyspace, targeted_query) */ __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_addr, 0, 0, NULL, &__pyx_v_delimiter_index, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2997, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_addr, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2996 * addr = row[0]['location'] * delimiter_index = addr.rfind(':') # assumes : - not robust, but that's what is being provided * if delimiter_index > 0: # <<<<<<<<<<<<<< * addr = addr[:delimiter_index] * targeted_query = HostTargetingStatement(query_future.query, addr) */ } /* "cassandra/cluster.py":2998 * if delimiter_index > 0: * addr = addr[:delimiter_index] * targeted_query = HostTargetingStatement(query_future.query, addr) # <<<<<<<<<<<<<< * query_future.query_plan = query_future._load_balancer.make_query_plan(self.keyspace, targeted_query) * except Exception: */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_HostTargetingStatement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2998, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_future, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2998, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_9, __pyx_v_addr}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2998, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_targeted_query = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":2999 * addr = addr[:delimiter_index] * targeted_query = HostTargetingStatement(query_future.query, addr) * query_future.query_plan = query_future._load_balancer.make_query_plan(self.keyspace, targeted_query) # <<<<<<<<<<<<<< * except Exception: * log.debug("Failed querying analytics master (request might not be routed optimally). " */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_future, __pyx_mstate_global->__pyx_n_u_load_balancer); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2999, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __pyx_t_9; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2999, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_5, __pyx_v_targeted_query}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_query_plan, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2999, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_query_future, __pyx_mstate_global->__pyx_n_u_query_plan, __pyx_t_4) < (0)) __PYX_ERR(0, 2999, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":2992 * * def _on_analytics_master_result(self, response, master_future, query_future): * try: # <<<<<<<<<<<<<< * row = master_future.result()[0] * addr = row[0]['location'] */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3000 * targeted_query = HostTargetingStatement(query_future.query, addr) * query_future.query_plan = query_future._load_balancer.make_query_plan(self.keyspace, targeted_query) * except Exception: # <<<<<<<<<<<<<< * log.debug("Failed querying analytics master (request might not be routed optimally). " * "Make sure the session is connecting to a graph analytics datacenter.", exc_info=True) */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster.Session._on_analytics_master_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_5) < 0) __PYX_ERR(0, 3000, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_5); /* "cassandra/cluster.py":3001 * query_future.query_plan = query_future._load_balancer.make_query_plan(self.keyspace, targeted_query) * except Exception: * log.debug("Failed querying analytics master (request might not be routed optimally). " # <<<<<<<<<<<<<< * "Make sure the session is connecting to a graph analytics datacenter.", exc_info=True) * */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3001, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3001, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3002 * except Exception: * log.debug("Failed querying analytics master (request might not be routed optimally). " * "Make sure the session is connecting to a graph analytics datacenter.", exc_info=True) # <<<<<<<<<<<<<< * * self.submit(query_future.send_request) */ __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_Failed_querying_analytics_master}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3001, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3001, __pyx_L5_except_error) __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3001, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":2992 * * def _on_analytics_master_result(self, response, master_future, query_future): * try: # <<<<<<<<<<<<<< * row = master_future.result()[0] * addr = row[0]['location'] */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":3004 * "Make sure the session is connecting to a graph analytics datacenter.", exc_info=True) * * self.submit(query_future.send_request) # <<<<<<<<<<<<<< * * def _create_response_future(self, query, parameters, trace, custom_payload, */ __pyx_t_9 = __pyx_v_self; __Pyx_INCREF(__pyx_t_9); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_future, __pyx_mstate_global->__pyx_n_u_send_request); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_4}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submit, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3004, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":2991 * master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) * * def _on_analytics_master_result(self, response, master_future, query_future): # <<<<<<<<<<<<<< * try: * row = master_future.result()[0] */ /* 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_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("cassandra.cluster.Session._on_analytics_master_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF(__pyx_v_addr); __Pyx_XDECREF(__pyx_v_delimiter_index); __Pyx_XDECREF(__pyx_v_targeted_query); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3006 * self.submit(query_future.send_request) * * def _create_response_future(self, query, parameters, trace, custom_payload, # <<<<<<<<<<<<<< * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): */ static PyObject *__pyx_pf_9cassandra_7cluster_60__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":3008 * def _create_response_future(self, query, parameters, trace, custom_payload, * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): # <<<<<<<<<<<<<< * """ Returns the ResponseFuture before calling send_request() on it """ * */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 3006, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 3006, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(0, 3006, __pyx_L1_error); /* "cassandra/cluster.py":3006 * self.submit(query_future.send_request) * * def _create_response_future(self, query, parameters, trace, custom_payload, # <<<<<<<<<<<<<< * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 3006, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 3006, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_45_create_response_future(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_44_create_response_future, " Returns the ResponseFuture before calling send_request() on it "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_45_create_response_future = {"_create_response_future", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_45_create_response_future, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_44_create_response_future}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_45_create_response_future(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_parameters = 0; PyObject *__pyx_v_trace = 0; PyObject *__pyx_v_custom_payload = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_v_execution_profile = 0; PyObject *__pyx_v_paging_state = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_create_response_future (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_parameters,&__pyx_mstate_global->__pyx_n_u_trace,&__pyx_mstate_global->__pyx_n_u_custom_payload,&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_execution_profile,&__pyx_mstate_global->__pyx_n_u_paging_state,&__pyx_mstate_global->__pyx_n_u_host,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3006, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_create_response_future", 0) < (0)) __PYX_ERR(0, 3006, __pyx_L3_error) if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":3008 * def _create_response_future(self, query, parameters, trace, custom_payload, * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): # <<<<<<<<<<<<<< * """ Returns the ResponseFuture before calling send_request() on it """ * */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_create_response_future", 0, 6, 9, i); __PYX_ERR(0, 3006, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3006, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3006, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3006, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3006, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3006, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3006, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3006, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[6]) values[6] = __Pyx_NewRef(__pyx_dynamic_args->arg0); if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_parameters = values[2]; __pyx_v_trace = values[3]; __pyx_v_custom_payload = values[4]; __pyx_v_timeout = values[5]; __pyx_v_execution_profile = values[6]; __pyx_v_paging_state = values[7]; __pyx_v_host = values[8]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_create_response_future", 0, 6, 9, __pyx_nargs); __PYX_ERR(0, 3006, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._create_response_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_44_create_response_future(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_parameters, __pyx_v_trace, __pyx_v_custom_payload, __pyx_v_timeout, __pyx_v_execution_profile, __pyx_v_paging_state, __pyx_v_host); /* "cassandra/cluster.py":3006 * self.submit(query_future.send_request) * * def _create_response_future(self, query, parameters, trace, custom_payload, # <<<<<<<<<<<<<< * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_44_create_response_future(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_parameters, PyObject *__pyx_v_trace, PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_timeout, PyObject *__pyx_v_execution_profile, PyObject *__pyx_v_paging_state, PyObject *__pyx_v_host) { PyObject *__pyx_v_prepared_statement = NULL; PyObject *__pyx_v_cl = NULL; PyObject *__pyx_v_serial_cl = NULL; PyObject *__pyx_v_retry_policy = NULL; PyObject *__pyx_v_row_factory = NULL; PyObject *__pyx_v_load_balancing_policy = NULL; PyObject *__pyx_v_spec_exec_policy = NULL; PyObject *__pyx_v_continuous_paging_options = NULL; PyObject *__pyx_v_fetch_size = NULL; PyObject *__pyx_v_start_time = NULL; PyObject *__pyx_v_timestamp = NULL; PyObject *__pyx_v_supports_continuous_paging_state = NULL; PyObject *__pyx_v_continuous_paging_state = NULL; PyObject *__pyx_v_query_string = NULL; PyObject *__pyx_v_statement_keyspace = NULL; PyObject *__pyx_v_message = NULL; PyObject *__pyx_v_spec_exec_plan = 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; size_t __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_create_response_future", 0); __Pyx_INCREF(__pyx_v_query); __Pyx_INCREF(__pyx_v_timeout); __Pyx_INCREF(__pyx_v_execution_profile); /* "cassandra/cluster.py":3011 * """ Returns the ResponseFuture before calling send_request() on it """ * * prepared_statement = None # <<<<<<<<<<<<<< * * if isinstance(query, str): */ __Pyx_INCREF(Py_None); __pyx_v_prepared_statement = Py_None; /* "cassandra/cluster.py":3013 * prepared_statement = None * * if isinstance(query, str): # <<<<<<<<<<<<<< * query = SimpleStatement(query) * elif isinstance(query, PreparedStatement): */ __pyx_t_1 = PyUnicode_Check(__pyx_v_query); if (__pyx_t_1) { /* "cassandra/cluster.py":3014 * * if isinstance(query, str): * query = SimpleStatement(query) # <<<<<<<<<<<<<< * elif isinstance(query, PreparedStatement): * query = query.bind(parameters) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SimpleStatement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_query}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_query, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3013 * prepared_statement = None * * if isinstance(query, str): # <<<<<<<<<<<<<< * query = SimpleStatement(query) * elif isinstance(query, PreparedStatement): */ goto __pyx_L3; } /* "cassandra/cluster.py":3015 * if isinstance(query, str): * query = SimpleStatement(query) * elif isinstance(query, PreparedStatement): # <<<<<<<<<<<<<< * query = query.bind(parameters) * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PreparedStatement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_query, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3015, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3016 * query = SimpleStatement(query) * elif isinstance(query, PreparedStatement): * query = query.bind(parameters) # <<<<<<<<<<<<<< * * if self.cluster._config_mode == _ConfigMode.LEGACY: */ __pyx_t_4 = __pyx_v_query; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_parameters}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_bind, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_query, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3015 * if isinstance(query, str): * query = SimpleStatement(query) * elif isinstance(query, PreparedStatement): # <<<<<<<<<<<<<< * query = query.bind(parameters) * */ } __pyx_L3:; /* "cassandra/cluster.py":3018 * query = query.bind(parameters) * * if self.cluster._config_mode == _ConfigMode.LEGACY: # <<<<<<<<<<<<<< * if execution_profile is not EXEC_PROFILE_DEFAULT: * raise ValueError("Cannot specify execution_profile while using legacy parameters.") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3018, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3018, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3019 * * if self.cluster._config_mode == _ConfigMode.LEGACY: * if execution_profile is not EXEC_PROFILE_DEFAULT: # <<<<<<<<<<<<<< * raise ValueError("Cannot specify execution_profile while using legacy parameters.") * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__pyx_v_execution_profile != __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":3020 * if self.cluster._config_mode == _ConfigMode.LEGACY: * if execution_profile is not EXEC_PROFILE_DEFAULT: * raise ValueError("Cannot specify execution_profile while using legacy parameters.") # <<<<<<<<<<<<<< * * if timeout is _NOT_SET: */ __pyx_t_3 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Cannot_specify_execution_profile}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 3020, __pyx_L1_error) /* "cassandra/cluster.py":3019 * * if self.cluster._config_mode == _ConfigMode.LEGACY: * if execution_profile is not EXEC_PROFILE_DEFAULT: # <<<<<<<<<<<<<< * raise ValueError("Cannot specify execution_profile while using legacy parameters.") * */ } /* "cassandra/cluster.py":3022 * raise ValueError("Cannot specify execution_profile while using legacy parameters.") * * if timeout is _NOT_SET: # <<<<<<<<<<<<<< * timeout = self.default_timeout * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3022, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__pyx_v_timeout == __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3023 * * if timeout is _NOT_SET: * timeout = self.default_timeout # <<<<<<<<<<<<<< * * cl = query.consistency_level if query.consistency_level is not None else self.default_consistency_level */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_timeout_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3022 * raise ValueError("Cannot specify execution_profile while using legacy parameters.") * * if timeout is _NOT_SET: # <<<<<<<<<<<<<< * timeout = self.default_timeout * */ } /* "cassandra/cluster.py":3025 * timeout = self.default_timeout * * cl = query.consistency_level if query.consistency_level is not None else self.default_consistency_level # <<<<<<<<<<<<<< * serial_cl = query.serial_consistency_level if query.serial_consistency_level is not None else self.default_serial_consistency_level * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_consistency_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_consistency_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_consistency_level_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_v_cl = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3026 * * cl = query.consistency_level if query.consistency_level is not None else self.default_consistency_level * serial_cl = query.serial_consistency_level if query.serial_consistency_level is not None else self.default_serial_consistency_level # <<<<<<<<<<<<<< * * retry_policy = query.retry_policy or self.cluster.default_retry_policy */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_serial_consistency_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_serial_consistency_level); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_level_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_v_serial_cl = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3028 * serial_cl = query.serial_consistency_level if query.serial_consistency_level is not None else self.default_serial_consistency_level * * retry_policy = query.retry_policy or self.cluster.default_retry_policy # <<<<<<<<<<<<<< * row_factory = self.row_factory * load_balancing_policy = self.cluster.load_balancing_policy */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_retry_policy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3028, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L7_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_L7_bool_binop_done:; __pyx_v_retry_policy = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3029 * * retry_policy = query.retry_policy or self.cluster.default_retry_policy * row_factory = self.row_factory # <<<<<<<<<<<<<< * load_balancing_policy = self.cluster.load_balancing_policy * spec_exec_policy = None */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_row_factory = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3030 * retry_policy = query.retry_policy or self.cluster.default_retry_policy * row_factory = self.row_factory * load_balancing_policy = self.cluster.load_balancing_policy # <<<<<<<<<<<<<< * spec_exec_policy = None * continuous_paging_options = None */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3030, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_load_balancing_policy = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3031 * row_factory = self.row_factory * load_balancing_policy = self.cluster.load_balancing_policy * spec_exec_policy = None # <<<<<<<<<<<<<< * continuous_paging_options = None * else: */ __Pyx_INCREF(Py_None); __pyx_v_spec_exec_policy = Py_None; /* "cassandra/cluster.py":3032 * load_balancing_policy = self.cluster.load_balancing_policy * spec_exec_policy = None * continuous_paging_options = None # <<<<<<<<<<<<<< * else: * execution_profile = self._maybe_get_execution_profile(execution_profile) */ __Pyx_INCREF(Py_None); __pyx_v_continuous_paging_options = Py_None; /* "cassandra/cluster.py":3018 * query = query.bind(parameters) * * if self.cluster._config_mode == _ConfigMode.LEGACY: # <<<<<<<<<<<<<< * if execution_profile is not EXEC_PROFILE_DEFAULT: * raise ValueError("Cannot specify execution_profile while using legacy parameters.") */ goto __pyx_L4; } /* "cassandra/cluster.py":3034 * continuous_paging_options = None * else: * execution_profile = self._maybe_get_execution_profile(execution_profile) # <<<<<<<<<<<<<< * * if timeout is _NOT_SET: */ /*else*/ { __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_execution_profile}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_maybe_get_execution_profile, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF_SET(__pyx_v_execution_profile, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3036 * execution_profile = self._maybe_get_execution_profile(execution_profile) * * if timeout is _NOT_SET: # <<<<<<<<<<<<<< * timeout = execution_profile.request_timeout * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = (__pyx_v_timeout == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3037 * * if timeout is _NOT_SET: * timeout = execution_profile.request_timeout # <<<<<<<<<<<<<< * * cl = query.consistency_level if query.consistency_level is not None else execution_profile.consistency_level */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_request_timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_timeout, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3036 * execution_profile = self._maybe_get_execution_profile(execution_profile) * * if timeout is _NOT_SET: # <<<<<<<<<<<<<< * timeout = execution_profile.request_timeout * */ } /* "cassandra/cluster.py":3039 * timeout = execution_profile.request_timeout * * cl = query.consistency_level if query.consistency_level is not None else execution_profile.consistency_level # <<<<<<<<<<<<<< * serial_cl = query.serial_consistency_level if query.serial_consistency_level is not None else execution_profile.serial_consistency_level * continuous_paging_options = execution_profile.continuous_paging_options */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_consistency_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_consistency_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_consistency_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_v_cl = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3040 * * cl = query.consistency_level if query.consistency_level is not None else execution_profile.consistency_level * serial_cl = query.serial_consistency_level if query.serial_consistency_level is not None else execution_profile.serial_consistency_level # <<<<<<<<<<<<<< * continuous_paging_options = execution_profile.continuous_paging_options * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_serial_consistency_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_serial_consistency_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; } else { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_serial_consistency_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_v_serial_cl = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3041 * cl = query.consistency_level if query.consistency_level is not None else execution_profile.consistency_level * serial_cl = query.serial_consistency_level if query.serial_consistency_level is not None else execution_profile.serial_consistency_level * continuous_paging_options = execution_profile.continuous_paging_options # <<<<<<<<<<<<<< * * retry_policy = query.retry_policy or execution_profile.retry_policy */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_continuous_paging_options); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_continuous_paging_options = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3043 * continuous_paging_options = execution_profile.continuous_paging_options * * retry_policy = query.retry_policy or execution_profile.retry_policy # <<<<<<<<<<<<<< * row_factory = execution_profile.row_factory * load_balancing_policy = execution_profile.load_balancing_policy */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_retry_policy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3043, __pyx_L1_error) if (!__pyx_t_1) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_retry_policy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L10_bool_binop_done:; __pyx_v_retry_policy = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3044 * * retry_policy = query.retry_policy or execution_profile.retry_policy * row_factory = execution_profile.row_factory # <<<<<<<<<<<<<< * load_balancing_policy = execution_profile.load_balancing_policy * spec_exec_policy = execution_profile.speculative_execution_policy */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_row_factory = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3045 * retry_policy = query.retry_policy or execution_profile.retry_policy * row_factory = execution_profile.row_factory * load_balancing_policy = execution_profile.load_balancing_policy # <<<<<<<<<<<<<< * spec_exec_policy = execution_profile.speculative_execution_policy * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_load_balancing_policy = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3046 * row_factory = execution_profile.row_factory * load_balancing_policy = execution_profile.load_balancing_policy * spec_exec_policy = execution_profile.speculative_execution_policy # <<<<<<<<<<<<<< * * fetch_size = query.fetch_size */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_execution_profile, __pyx_mstate_global->__pyx_n_u_speculative_execution_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_spec_exec_policy = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L4:; /* "cassandra/cluster.py":3048 * spec_exec_policy = execution_profile.speculative_execution_policy * * fetch_size = query.fetch_size # <<<<<<<<<<<<<< * if fetch_size is FETCH_SIZE_UNSET and self._protocol_version >= 2: * fetch_size = self.default_fetch_size */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_fetch_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_fetch_size = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3049 * * fetch_size = query.fetch_size * if fetch_size is FETCH_SIZE_UNSET and self._protocol_version >= 2: # <<<<<<<<<<<<<< * fetch_size = self.default_fetch_size * elif self._protocol_version == 1: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_FETCH_SIZE_UNSET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = (__pyx_v_fetch_size == __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L13_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_mstate_global->__pyx_int_2, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3049, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L13_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":3050 * fetch_size = query.fetch_size * if fetch_size is FETCH_SIZE_UNSET and self._protocol_version >= 2: * fetch_size = self.default_fetch_size # <<<<<<<<<<<<<< * elif self._protocol_version == 1: * fetch_size = None */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_fetch_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_fetch_size, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3049 * * fetch_size = query.fetch_size * if fetch_size is FETCH_SIZE_UNSET and self._protocol_version >= 2: # <<<<<<<<<<<<<< * fetch_size = self.default_fetch_size * elif self._protocol_version == 1: */ goto __pyx_L12; } /* "cassandra/cluster.py":3051 * if fetch_size is FETCH_SIZE_UNSET and self._protocol_version >= 2: * fetch_size = self.default_fetch_size * elif self._protocol_version == 1: # <<<<<<<<<<<<<< * fetch_size = None * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3052 * fetch_size = self.default_fetch_size * elif self._protocol_version == 1: * fetch_size = None # <<<<<<<<<<<<<< * * start_time = time.time() */ __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_fetch_size, Py_None); /* "cassandra/cluster.py":3051 * if fetch_size is FETCH_SIZE_UNSET and self._protocol_version >= 2: * fetch_size = self.default_fetch_size * elif self._protocol_version == 1: # <<<<<<<<<<<<<< * fetch_size = None * */ } __pyx_L12:; /* "cassandra/cluster.py":3054 * fetch_size = None * * start_time = time.time() # <<<<<<<<<<<<<< * if self._protocol_version >= 3 and self.use_client_timestamp: * timestamp = self.cluster.timestamp_generator() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_start_time = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3055 * * start_time = time.time() * if self._protocol_version >= 3 and self.use_client_timestamp: # <<<<<<<<<<<<<< * timestamp = self.cluster.timestamp_generator() * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L16_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_use_client_timestamp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __pyx_t_6; __pyx_L16_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":3056 * start_time = time.time() * if self._protocol_version >= 3 and self.use_client_timestamp: * timestamp = self.cluster.timestamp_generator() # <<<<<<<<<<<<<< * else: * timestamp = None */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_timestamp_generator, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3056, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_timestamp = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3055 * * start_time = time.time() * if self._protocol_version >= 3 and self.use_client_timestamp: # <<<<<<<<<<<<<< * timestamp = self.cluster.timestamp_generator() * else: */ goto __pyx_L15; } /* "cassandra/cluster.py":3058 * timestamp = self.cluster.timestamp_generator() * else: * timestamp = None # <<<<<<<<<<<<<< * * supports_continuous_paging_state = ( */ /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_timestamp = Py_None; } __pyx_L15:; /* "cassandra/cluster.py":3061 * * supports_continuous_paging_state = ( * ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version) # <<<<<<<<<<<<<< * ) * if continuous_paging_options and supports_continuous_paging_state: */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_has_continuous_paging_next_pages); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_supports_continuous_paging_state = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3063 * ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version) * ) * if continuous_paging_options and supports_continuous_paging_state: # <<<<<<<<<<<<<< * continuous_paging_state = ContinuousPagingState(continuous_paging_options.max_queue_size) * else: */ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_continuous_paging_options); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3063, __pyx_L1_error) if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L19_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_supports_continuous_paging_state); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3063, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L19_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":3064 * ) * if continuous_paging_options and supports_continuous_paging_state: * continuous_paging_state = ContinuousPagingState(continuous_paging_options.max_queue_size) # <<<<<<<<<<<<<< * else: * continuous_paging_state = None */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ContinuousPagingState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_continuous_paging_options, __pyx_mstate_global->__pyx_n_u_max_queue_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_continuous_paging_state = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3063 * ProtocolVersion.has_continuous_paging_next_pages(self._protocol_version) * ) * if continuous_paging_options and supports_continuous_paging_state: # <<<<<<<<<<<<<< * continuous_paging_state = ContinuousPagingState(continuous_paging_options.max_queue_size) * else: */ goto __pyx_L18; } /* "cassandra/cluster.py":3066 * continuous_paging_state = ContinuousPagingState(continuous_paging_options.max_queue_size) * else: * continuous_paging_state = None # <<<<<<<<<<<<<< * * if isinstance(query, SimpleStatement): */ /*else*/ { __Pyx_INCREF(Py_None); __pyx_v_continuous_paging_state = Py_None; } __pyx_L18:; /* "cassandra/cluster.py":3068 * continuous_paging_state = None * * if isinstance(query, SimpleStatement): # <<<<<<<<<<<<<< * query_string = query.query_string * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_SimpleStatement); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_IsInstance(__pyx_v_query, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3069 * * if isinstance(query, SimpleStatement): * query_string = query.query_string # <<<<<<<<<<<<<< * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None * if parameters: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_query_string); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_query_string = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3070 * if isinstance(query, SimpleStatement): * query_string = query.query_string * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None # <<<<<<<<<<<<<< * if parameters: * query_string = bind_params(query_string, parameters, self.encoder) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_uses_keyspace_flag); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __pyx_t_2; __pyx_t_2 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_7 = Py_None; } __pyx_v_statement_keyspace = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3071 * query_string = query.query_string * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None * if parameters: # <<<<<<<<<<<<<< * query_string = bind_params(query_string, parameters, self.encoder) * message = QueryMessage( */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_parameters); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3071, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":3072 * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None * if parameters: * query_string = bind_params(query_string, parameters, self.encoder) # <<<<<<<<<<<<<< * message = QueryMessage( * query_string, cl, serial_cl, */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_bind_params); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoder); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_query_string, __pyx_v_parameters, __pyx_t_3}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF_SET(__pyx_v_query_string, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":3071 * query_string = query.query_string * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None * if parameters: # <<<<<<<<<<<<<< * query_string = bind_params(query_string, parameters, self.encoder) * message = QueryMessage( */ } /* "cassandra/cluster.py":3073 * if parameters: * query_string = bind_params(query_string, parameters, self.encoder) * message = QueryMessage( # <<<<<<<<<<<<<< * query_string, cl, serial_cl, * fetch_size, paging_state, timestamp, */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "cassandra/cluster.py":3076 * query_string, cl, serial_cl, * fetch_size, paging_state, timestamp, * continuous_paging_options, statement_keyspace) # <<<<<<<<<<<<<< * elif isinstance(query, BoundStatement): * prepared_statement = query.prepared_statement */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[9] = {__pyx_t_8, __pyx_v_query_string, __pyx_v_cl, __pyx_v_serial_cl, __pyx_v_fetch_size, __pyx_v_paging_state, __pyx_v_timestamp, __pyx_v_continuous_paging_options, __pyx_v_statement_keyspace}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (9-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_message = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3068 * continuous_paging_state = None * * if isinstance(query, SimpleStatement): # <<<<<<<<<<<<<< * query_string = query.query_string * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None */ goto __pyx_L21; } /* "cassandra/cluster.py":3077 * fetch_size, paging_state, timestamp, * continuous_paging_options, statement_keyspace) * elif isinstance(query, BoundStatement): # <<<<<<<<<<<<<< * prepared_statement = query.prepared_statement * message = ExecuteMessage( */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BoundStatement); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_IsInstance(__pyx_v_query, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3077, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3078 * continuous_paging_options, statement_keyspace) * elif isinstance(query, BoundStatement): * prepared_statement = query.prepared_statement # <<<<<<<<<<<<<< * message = ExecuteMessage( * prepared_statement.query_id, query.values, cl, */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_prepared_statement, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":3079 * elif isinstance(query, BoundStatement): * prepared_statement = query.prepared_statement * message = ExecuteMessage( # <<<<<<<<<<<<<< * prepared_statement.query_id, query.values, cl, * serial_cl, fetch_size, paging_state, timestamp, */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ExecuteMessage); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "cassandra/cluster.py":3080 * prepared_statement = query.prepared_statement * message = ExecuteMessage( * prepared_statement.query_id, query.values, cl, # <<<<<<<<<<<<<< * serial_cl, fetch_size, paging_state, timestamp, * skip_meta=bool(prepared_statement.result_metadata), */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":3082 * prepared_statement.query_id, query.values, cl, * serial_cl, fetch_size, paging_state, timestamp, * skip_meta=bool(prepared_statement.result_metadata), # <<<<<<<<<<<<<< * continuous_paging_options=continuous_paging_options, * result_metadata_id=prepared_statement.result_metadata_id) */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_result_metadata); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3082, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":3084 * skip_meta=bool(prepared_statement.result_metadata), * continuous_paging_options=continuous_paging_options, * result_metadata_id=prepared_statement.result_metadata_id) # <<<<<<<<<<<<<< * elif isinstance(query, BatchStatement): * if self._protocol_version < 2: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_result_metadata_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3084, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[8 + ((CYTHON_VECTORCALL) ? 3 : 0)] = {__pyx_t_3, __pyx_t_2, __pyx_t_4, __pyx_v_cl, __pyx_v_serial_cl, __pyx_v_fetch_size, __pyx_v_paging_state, __pyx_v_timestamp}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_skip_meta, __pyx_t_9, __pyx_t_11, __pyx_callargs+8, 0) < (0)) __PYX_ERR(0, 3079, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_continuous_paging_options, __pyx_v_continuous_paging_options, __pyx_t_11, __pyx_callargs+8, 1) < (0)) __PYX_ERR(0, 3079, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_result_metadata_id, __pyx_t_10, __pyx_t_11, __pyx_callargs+8, 2) < (0)) __PYX_ERR(0, 3079, __pyx_L1_error) __pyx_t_7 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_message = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3077 * fetch_size, paging_state, timestamp, * continuous_paging_options, statement_keyspace) * elif isinstance(query, BoundStatement): # <<<<<<<<<<<<<< * prepared_statement = query.prepared_statement * message = ExecuteMessage( */ goto __pyx_L21; } /* "cassandra/cluster.py":3085 * continuous_paging_options=continuous_paging_options, * result_metadata_id=prepared_statement.result_metadata_id) * elif isinstance(query, BatchStatement): # <<<<<<<<<<<<<< * if self._protocol_version < 2: * raise UnsupportedOperation( */ __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_BatchStatement); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = PyObject_IsInstance(__pyx_v_query, __pyx_t_7); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3086 * result_metadata_id=prepared_statement.result_metadata_id) * elif isinstance(query, BatchStatement): * if self._protocol_version < 2: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "BatchStatement execution is only supported with protocol version " */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_mstate_global->__pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":3087 * elif isinstance(query, BatchStatement): * if self._protocol_version < 2: * raise UnsupportedOperation( # <<<<<<<<<<<<<< * "BatchStatement execution is only supported with protocol version " * "2 or higher (supported in Cassandra 2.0 and higher). Consider " */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_UnsupportedOperation); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_kp_u_BatchStatement_execution_is_only}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 3087, __pyx_L1_error) /* "cassandra/cluster.py":3086 * result_metadata_id=prepared_statement.result_metadata_id) * elif isinstance(query, BatchStatement): * if self._protocol_version < 2: # <<<<<<<<<<<<<< * raise UnsupportedOperation( * "BatchStatement execution is only supported with protocol version " */ } /* "cassandra/cluster.py":3091 * "2 or higher (supported in Cassandra 2.0 and higher). Consider " * "setting Cluster.protocol_version to 2 to support this operation.") * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None # <<<<<<<<<<<<<< * message = BatchMessage( * query.batch_type, query._statements_and_parameters, cl, */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_uses_keyspace_flag); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_1) { __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __pyx_t_11; __pyx_t_11 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_8 = Py_None; } __pyx_v_statement_keyspace = __pyx_t_8; __pyx_t_8 = 0; /* "cassandra/cluster.py":3092 * "setting Cluster.protocol_version to 2 to support this operation.") * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None * message = BatchMessage( # <<<<<<<<<<<<<< * query.batch_type, query._statements_and_parameters, cl, * serial_cl, timestamp, statement_keyspace) */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_BatchMessage); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":3093 * statement_keyspace = query.keyspace if ProtocolVersion.uses_keyspace_flag(self._protocol_version) else None * message = BatchMessage( * query.batch_type, query._statements_and_parameters, cl, # <<<<<<<<<<<<<< * serial_cl, timestamp, statement_keyspace) * elif isinstance(query, GraphStatement): */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_batch_type); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_statements_and_parameters_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3093, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "cassandra/cluster.py":3094 * message = BatchMessage( * query.batch_type, query._statements_and_parameters, cl, * serial_cl, timestamp, statement_keyspace) # <<<<<<<<<<<<<< * elif isinstance(query, GraphStatement): * # the statement_keyspace is not aplicable to GraphStatement */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[7] = {__pyx_t_11, __pyx_t_10, __pyx_t_7, __pyx_v_cl, __pyx_v_serial_cl, __pyx_v_timestamp, __pyx_v_statement_keyspace}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (7-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_v_message = __pyx_t_8; __pyx_t_8 = 0; /* "cassandra/cluster.py":3085 * continuous_paging_options=continuous_paging_options, * result_metadata_id=prepared_statement.result_metadata_id) * elif isinstance(query, BatchStatement): # <<<<<<<<<<<<<< * if self._protocol_version < 2: * raise UnsupportedOperation( */ goto __pyx_L21; } /* "cassandra/cluster.py":3095 * query.batch_type, query._statements_and_parameters, cl, * serial_cl, timestamp, statement_keyspace) * elif isinstance(query, GraphStatement): # <<<<<<<<<<<<<< * # the statement_keyspace is not aplicable to GraphStatement * message = QueryMessage(query.query, cl, serial_cl, fetch_size, */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_GraphStatement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_1 = PyObject_IsInstance(__pyx_v_query, __pyx_t_8); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3095, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":3097 * elif isinstance(query, GraphStatement): * # the statement_keyspace is not aplicable to GraphStatement * message = QueryMessage(query.query, cl, serial_cl, fetch_size, # <<<<<<<<<<<<<< * paging_state, timestamp, * continuous_paging_options) */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); /* "cassandra/cluster.py":3099 * message = QueryMessage(query.query, cl, serial_cl, fetch_size, * paging_state, timestamp, * continuous_paging_options) # <<<<<<<<<<<<<< * * message.tracing = trace */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[8] = {__pyx_t_9, __pyx_t_10, __pyx_v_cl, __pyx_v_serial_cl, __pyx_v_fetch_size, __pyx_v_paging_state, __pyx_v_timestamp, __pyx_v_continuous_paging_options}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (8-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_v_message = __pyx_t_8; __pyx_t_8 = 0; /* "cassandra/cluster.py":3095 * query.batch_type, query._statements_and_parameters, cl, * serial_cl, timestamp, statement_keyspace) * elif isinstance(query, GraphStatement): # <<<<<<<<<<<<<< * # the statement_keyspace is not aplicable to GraphStatement * message = QueryMessage(query.query, cl, serial_cl, fetch_size, */ } __pyx_L21:; /* "cassandra/cluster.py":3101 * continuous_paging_options) * * message.tracing = trace # <<<<<<<<<<<<<< * message.update_custom_payload(query.custom_payload) * message.update_custom_payload(custom_payload) */ if (unlikely(!__pyx_v_message)) { __Pyx_RaiseUnboundLocalError("message"); __PYX_ERR(0, 3101, __pyx_L1_error) } if (__Pyx_PyObject_SetAttrStr(__pyx_v_message, __pyx_mstate_global->__pyx_n_u_tracing, __pyx_v_trace) < (0)) __PYX_ERR(0, 3101, __pyx_L1_error) /* "cassandra/cluster.py":3102 * * message.tracing = trace * message.update_custom_payload(query.custom_payload) # <<<<<<<<<<<<<< * message.update_custom_payload(custom_payload) * message.allow_beta_protocol_version = self.cluster.allow_beta_protocol_version */ if (unlikely(!__pyx_v_message)) { __Pyx_RaiseUnboundLocalError("message"); __PYX_ERR(0, 3102, __pyx_L1_error) } __pyx_t_7 = __pyx_v_message; __Pyx_INCREF(__pyx_t_7); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_custom_payload); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_custom_payload, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":3103 * message.tracing = trace * message.update_custom_payload(query.custom_payload) * message.update_custom_payload(custom_payload) # <<<<<<<<<<<<<< * message.allow_beta_protocol_version = self.cluster.allow_beta_protocol_version * */ if (unlikely(!__pyx_v_message)) { __Pyx_RaiseUnboundLocalError("message"); __PYX_ERR(0, 3103, __pyx_L1_error) } __pyx_t_10 = __pyx_v_message; __Pyx_INCREF(__pyx_t_10); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_custom_payload}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_custom_payload, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":3104 * message.update_custom_payload(query.custom_payload) * message.update_custom_payload(custom_payload) * message.allow_beta_protocol_version = self.cluster.allow_beta_protocol_version # <<<<<<<<<<<<<< * * spec_exec_plan = spec_exec_policy.new_plan(query.keyspace or self.keyspace, query) if query.is_idempotent and spec_exec_policy else None */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_v_message)) { __Pyx_RaiseUnboundLocalError("message"); __PYX_ERR(0, 3104, __pyx_L1_error) } if (__Pyx_PyObject_SetAttrStr(__pyx_v_message, __pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version, __pyx_t_10) < (0)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":3106 * message.allow_beta_protocol_version = self.cluster.allow_beta_protocol_version * * spec_exec_plan = spec_exec_policy.new_plan(query.keyspace or self.keyspace, query) if query.is_idempotent and spec_exec_policy else None # <<<<<<<<<<<<<< * return ResponseFuture( * self, message, query, timeout, metrics=self._metrics, */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_is_idempotent); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L24_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_spec_exec_policy); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3106, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L24_bool_binop_done:; if (__pyx_t_1) { __pyx_t_7 = __pyx_v_spec_exec_policy; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3106, __pyx_L1_error) if (!__pyx_t_6) { __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { __Pyx_INCREF(__pyx_t_11); __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L26_bool_binop_done; } __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_11); __pyx_t_9 = __pyx_t_11; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_L26_bool_binop_done:; __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_9, __pyx_v_query}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new_plan, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_10 = __pyx_t_8; __pyx_t_8 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_10 = Py_None; } __pyx_v_spec_exec_plan = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":3107 * * spec_exec_plan = spec_exec_policy.new_plan(query.keyspace or self.keyspace, query) if query.is_idempotent and spec_exec_policy else None * return ResponseFuture( # <<<<<<<<<<<<<< * self, message, query, timeout, metrics=self._metrics, * prepared_statement=prepared_statement, retry_policy=retry_policy, row_factory=row_factory, */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ResponseFuture); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":3108 * spec_exec_plan = spec_exec_policy.new_plan(query.keyspace or self.keyspace, query) if query.is_idempotent and spec_exec_policy else None * return ResponseFuture( * self, message, query, timeout, metrics=self._metrics, # <<<<<<<<<<<<<< * prepared_statement=prepared_statement, retry_policy=retry_policy, row_factory=row_factory, * load_balancer=load_balancing_policy, start_time=start_time, speculative_execution_plan=spec_exec_plan, */ if (unlikely(!__pyx_v_message)) { __Pyx_RaiseUnboundLocalError("message"); __PYX_ERR(0, 3108, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "cassandra/cluster.py":3111 * prepared_statement=prepared_statement, retry_policy=retry_policy, row_factory=row_factory, * load_balancer=load_balancing_policy, start_time=start_time, speculative_execution_plan=spec_exec_plan, * continuous_paging_state=continuous_paging_state, host=host) # <<<<<<<<<<<<<< * * def get_execution_profile(self, name): */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 9 : 0)] = {__pyx_t_8, __pyx_v_self, __pyx_v_message, __pyx_v_query, __pyx_v_timeout}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_metrics, __pyx_t_7, __pyx_t_11, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_prepared_statement, __pyx_v_prepared_statement, __pyx_t_11, __pyx_callargs+5, 1) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_retry_policy, __pyx_v_retry_policy, __pyx_t_11, __pyx_callargs+5, 2) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_row_factory, __pyx_v_row_factory, __pyx_t_11, __pyx_callargs+5, 3) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_load_balancer_2, __pyx_v_load_balancing_policy, __pyx_t_11, __pyx_callargs+5, 4) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_start_time, __pyx_v_start_time, __pyx_t_11, __pyx_callargs+5, 5) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_speculative_execution_plan, __pyx_v_spec_exec_plan, __pyx_t_11, __pyx_callargs+5, 6) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_continuous_paging_state, __pyx_v_continuous_paging_state, __pyx_t_11, __pyx_callargs+5, 7) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_host, __pyx_v_host, __pyx_t_11, __pyx_callargs+5, 8) < (0)) __PYX_ERR(0, 3107, __pyx_L1_error) __pyx_t_10 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3006 * self.submit(query_future.send_request) * * def _create_response_future(self, query, parameters, trace, custom_payload, # <<<<<<<<<<<<<< * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): */ /* 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_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("cassandra.cluster.Session._create_response_future", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_prepared_statement); __Pyx_XDECREF(__pyx_v_cl); __Pyx_XDECREF(__pyx_v_serial_cl); __Pyx_XDECREF(__pyx_v_retry_policy); __Pyx_XDECREF(__pyx_v_row_factory); __Pyx_XDECREF(__pyx_v_load_balancing_policy); __Pyx_XDECREF(__pyx_v_spec_exec_policy); __Pyx_XDECREF(__pyx_v_continuous_paging_options); __Pyx_XDECREF(__pyx_v_fetch_size); __Pyx_XDECREF(__pyx_v_start_time); __Pyx_XDECREF(__pyx_v_timestamp); __Pyx_XDECREF(__pyx_v_supports_continuous_paging_state); __Pyx_XDECREF(__pyx_v_continuous_paging_state); __Pyx_XDECREF(__pyx_v_query_string); __Pyx_XDECREF(__pyx_v_statement_keyspace); __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_spec_exec_plan); __Pyx_XDECREF(__pyx_v_query); __Pyx_XDECREF(__pyx_v_timeout); __Pyx_XDECREF(__pyx_v_execution_profile); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3113 * continuous_paging_state=continuous_paging_state, host=host) * * def get_execution_profile(self, name): # <<<<<<<<<<<<<< * """ * Returns the execution profile associated with the provided ``name``. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_47get_execution_profile(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_46get_execution_profile, "\n Returns the execution profile associated with the provided ``name``.\n\n :param name: The name (or key) of the execution profile.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_47get_execution_profile = {"get_execution_profile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_47get_execution_profile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_46get_execution_profile}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_47get_execution_profile(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_name = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_execution_profile (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_name,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3113, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3113, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3113, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_execution_profile", 0) < (0)) __PYX_ERR(0, 3113, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_execution_profile", 1, 2, 2, i); __PYX_ERR(0, 3113, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3113, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3113, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_name = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_execution_profile", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3113, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.get_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_46get_execution_profile(__pyx_self, __pyx_v_self, __pyx_v_name); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_46get_execution_profile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) { PyObject *__pyx_v_profiles = NULL; PyObject *__pyx_v_eps = NULL; PyObject *__pyx_9genexpr18__pyx_v_ep = 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; size_t __pyx_t_16; PyObject *__pyx_t_17[5]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_execution_profile", 0); /* "cassandra/cluster.py":3119 * :param name: The name (or key) of the execution profile. * """ * profiles = self.cluster.profile_manager.profiles # <<<<<<<<<<<<<< * try: * return profiles[name] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3119, __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_mstate_global->__pyx_n_u_profiles); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_profiles = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3120 * """ * profiles = self.cluster.profile_manager.profiles * try: # <<<<<<<<<<<<<< * return profiles[name] * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "cassandra/cluster.py":3121 * profiles = self.cluster.profile_manager.profiles * try: * return profiles[name] # <<<<<<<<<<<<<< * except KeyError: * eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_profiles, __pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3121, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":3120 * """ * profiles = self.cluster.profile_manager.profiles * try: # <<<<<<<<<<<<<< * return profiles[name] * except KeyError: */ } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3122 * try: * return profiles[name] * except KeyError: # <<<<<<<<<<<<<< * eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] * raise ValueError("Invalid execution_profile: %s; valid profiles are: %s." % ( */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError)))); if (__pyx_t_6) { __Pyx_AddTraceback("cassandra.cluster.Session.get_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 3122, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_7); /* "cassandra/cluster.py":3123 * return profiles[name] * except KeyError: * eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] # <<<<<<<<<<<<<< * raise ValueError("Invalid execution_profile: %s; valid profiles are: %s." % ( * _execution_profile_to_string(name), ', '.join(eps))) */ { /* enter inner scope */ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3123, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = 0; if (unlikely(__pyx_v_profiles == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 3123, __pyx_L13_error) } __pyx_t_12 = __Pyx_dict_iterator(__pyx_v_profiles, 0, __pyx_mstate_global->__pyx_n_u_keys, (&__pyx_t_11), (&__pyx_t_6)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3123, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = __pyx_t_12; __pyx_t_12 = 0; while (1) { __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_11, &__pyx_t_10, &__pyx_t_12, NULL, NULL, __pyx_t_6); if (unlikely(__pyx_t_13 == 0)) break; if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 3123, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_ep, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_execution_profile_to_string); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3123, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15); assert(__pyx_t_14); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); __pyx_t_16 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_9genexpr18__pyx_v_ep}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3123, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); } if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 3123, __pyx_L13_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_ep); __pyx_9genexpr18__pyx_v_ep = 0; goto __pyx_L16_exit_scope; __pyx_L13_error:; __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_ep); __pyx_9genexpr18__pyx_v_ep = 0; goto __pyx_L5_except_error; __pyx_L16_exit_scope:; } /* exit inner scope */ __pyx_v_eps = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":3124 * except KeyError: * eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] * raise ValueError("Invalid execution_profile: %s; valid profiles are: %s." % ( # <<<<<<<<<<<<<< * _execution_profile_to_string(name), ', '.join(eps))) * */ __pyx_t_9 = NULL; /* "cassandra/cluster.py":3125 * eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] * raise ValueError("Invalid execution_profile: %s; valid profiles are: %s." % ( * _execution_profile_to_string(name), ', '.join(eps))) # <<<<<<<<<<<<<< * * def _maybe_get_execution_profile(self, ep): */ __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_execution_profile_to_string); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3125, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_name); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3125, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_15), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3125, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__5, __pyx_v_eps); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3125, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_17[0] = __pyx_mstate_global->__pyx_kp_u_Invalid_execution_profile; __pyx_t_17[1] = __pyx_t_12; __pyx_t_17[2] = __pyx_mstate_global->__pyx_kp_u_valid_profiles_are; __pyx_t_17[3] = __pyx_t_15; __pyx_t_17[4] = __pyx_mstate_global->__pyx_kp_u_; /* "cassandra/cluster.py":3124 * except KeyError: * eps = [_execution_profile_to_string(ep) for ep in profiles.keys()] * raise ValueError("Invalid execution_profile: %s; valid profiles are: %s." % ( # <<<<<<<<<<<<<< * _execution_profile_to_string(name), ', '.join(eps))) * */ __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, 27 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12) + 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3124, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_16 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_14}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_16, (2-__pyx_t_16) | (__pyx_t_16*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3124, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 3124, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3120 * """ * profiles = self.cluster.profile_manager.profiles * try: # <<<<<<<<<<<<<< * return profiles[name] * except KeyError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; } /* "cassandra/cluster.py":3113 * continuous_paging_state=continuous_paging_state, host=host) * * def get_execution_profile(self, name): # <<<<<<<<<<<<<< * """ * Returns the execution profile associated with the provided ``name``. */ /* function exit code */ __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_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("cassandra.cluster.Session.get_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_profiles); __Pyx_XDECREF(__pyx_v_eps); __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_ep); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3127 * _execution_profile_to_string(name), ', '.join(eps))) * * def _maybe_get_execution_profile(self, ep): # <<<<<<<<<<<<<< * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_49_maybe_get_execution_profile(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_49_maybe_get_execution_profile = {"_maybe_get_execution_profile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_49_maybe_get_execution_profile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_49_maybe_get_execution_profile(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ep = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_maybe_get_execution_profile (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_ep,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3127, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3127, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3127, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_maybe_get_execution_profile", 0) < (0)) __PYX_ERR(0, 3127, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_maybe_get_execution_profile", 1, 2, 2, i); __PYX_ERR(0, 3127, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3127, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3127, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_ep = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_maybe_get_execution_profile", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3127, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._maybe_get_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_48_maybe_get_execution_profile(__pyx_self, __pyx_v_self, __pyx_v_ep); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_48_maybe_get_execution_profile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ep) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_maybe_get_execution_profile", 0); /* "cassandra/cluster.py":3128 * * def _maybe_get_execution_profile(self, ep): * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) # <<<<<<<<<<<<<< * * def execution_profile_clone_update(self, ep, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExecutionProfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_IsInstance(__pyx_v_ep, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 3128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_v_ep); __pyx_t_1 = __pyx_v_ep; } else { __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_ep}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_execution_profile, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3127 * _execution_profile_to_string(name), ', '.join(eps))) * * def _maybe_get_execution_profile(self, ep): # <<<<<<<<<<<<<< * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cassandra.cluster.Session._maybe_get_execution_profile", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3130 * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) * * def execution_profile_clone_update(self, ep, **kwargs): # <<<<<<<<<<<<<< * """ * Returns a clone of the ``ep`` profile. ``kwargs`` can be specified to update attributes */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_51execution_profile_clone_update(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_50execution_profile_clone_update, "\n Returns a clone of the ``ep`` profile. ``kwargs`` can be specified to update attributes\n of the returned profile.\n\n This is a shallow clone, so any objects referenced by the profile are shared. This means Load Balancing Policy\n is maintained by inclusion in the active profiles. It also means updating any other rich objects will be seen\n by the active profile. In cases where this is not desirable, be sure to replace the instance instead of manipulating\n the shared object.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_51execution_profile_clone_update = {"execution_profile_clone_update", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_51execution_profile_clone_update, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_50execution_profile_clone_update}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_51execution_profile_clone_update(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_ep = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("execution_profile_clone_update (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_ep,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3130, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3130, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3130, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "execution_profile_clone_update", 1) < (0)) __PYX_ERR(0, 3130, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("execution_profile_clone_update", 1, 2, 2, i); __PYX_ERR(0, 3130, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3130, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3130, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_ep = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("execution_profile_clone_update", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3130, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Session.execution_profile_clone_update", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_50execution_profile_clone_update(__pyx_self, __pyx_v_self, __pyx_v_ep, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_50execution_profile_clone_update(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ep, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_clone = NULL; PyObject *__pyx_v_attr = NULL; PyObject *__pyx_v_value = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("execution_profile_clone_update", 0); /* "cassandra/cluster.py":3140 * the shared object. * """ * clone = copy(self._maybe_get_execution_profile(ep)) # <<<<<<<<<<<<<< * for attr, value in kwargs.items(): * setattr(clone, attr, value) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_ep}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_maybe_get_execution_profile, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_clone = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3141 * """ * clone = copy(self._maybe_get_execution_profile(ep)) * for attr, value in kwargs.items(): # <<<<<<<<<<<<<< * setattr(clone, attr, value) * return clone */ __pyx_t_7 = 0; __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_kwargs, 1, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_8, &__pyx_t_7, &__pyx_t_3, &__pyx_t_4, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 3141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3142 * clone = copy(self._maybe_get_execution_profile(ep)) * for attr, value in kwargs.items(): * setattr(clone, attr, value) # <<<<<<<<<<<<<< * return clone * */ __pyx_t_11 = PyObject_SetAttr(__pyx_v_clone, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3142, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3143 * for attr, value in kwargs.items(): * setattr(clone, attr, value) * return clone # <<<<<<<<<<<<<< * * def add_request_init_listener(self, fn, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_clone); __pyx_r = __pyx_v_clone; goto __pyx_L0; /* "cassandra/cluster.py":3130 * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) * * def execution_profile_clone_update(self, ep, **kwargs): # <<<<<<<<<<<<<< * """ * Returns a clone of the ``ep`` profile. ``kwargs`` can be specified to update attributes */ /* 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("cassandra.cluster.Session.execution_profile_clone_update", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_clone); __Pyx_XDECREF(__pyx_v_attr); __Pyx_XDECREF(__pyx_v_value); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3145 * return clone * * def add_request_init_listener(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Adds a callback with arguments to be called when any request is created. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_53add_request_init_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_52add_request_init_listener, "\n Adds a callback with arguments to be called when any request is created.\n\n It will be invoked as `fn(response_future, *args, **kwargs)` after each client request is created,\n and before the request is sent. This can be used to create extensions by adding result callbacks to the\n response future.\n\n `response_future` is the :class:`.ResponseFuture` for the request.\n\n Note that the init callback is done on the client thread creating the request, so you may need to consider\n synchronization if you have multiple threads. Any callbacks added to the response future will be executed\n on the event loop thread, so the normal advice about minimizing cycles and avoiding blocking apply (see Note in\n :meth:`.ResponseFuture.add_callbacks`.\n\n See `this example `_ in the\n source tree for an example.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_53add_request_init_listener = {"add_request_init_listener", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_53add_request_init_listener, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_52add_request_init_listener}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_53add_request_init_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_request_init_listener (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3145, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3145, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3145, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "add_request_init_listener", 1) < (0)) __PYX_ERR(0, 3145, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_request_init_listener", 0, 2, 2, i); __PYX_ERR(0, 3145, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3145, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3145, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_fn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_request_init_listener", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 3145, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Session.add_request_init_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_52add_request_init_listener(__pyx_self, __pyx_v_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_52add_request_init_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_request_init_listener", 0); /* "cassandra/cluster.py":3163 * source tree for an example. * """ * self._request_init_callbacks.append((fn, args, kwargs)) # <<<<<<<<<<<<<< * * def remove_request_init_listener(self, fn, *args, **kwargs): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_request_init_callbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 3163, __pyx_L1_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_args) != (0)) __PYX_ERR(0, 3163, __pyx_L1_error); __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_kwargs) != (0)) __PYX_ERR(0, 3163, __pyx_L1_error); __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 3163, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3145 * return clone * * def add_request_init_listener(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Adds a callback with arguments to be called when any request is created. */ /* 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_AddTraceback("cassandra.cluster.Session.add_request_init_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3165 * self._request_init_callbacks.append((fn, args, kwargs)) * * def remove_request_init_listener(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Removes a callback and arguments from the list. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_55remove_request_init_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_54remove_request_init_listener, "\n Removes a callback and arguments from the list.\n\n See :meth:`.Session.add_request_init_listener`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_55remove_request_init_listener = {"remove_request_init_listener", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_55remove_request_init_listener, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_54remove_request_init_listener}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_55remove_request_init_listener(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_request_init_listener (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3165, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3165, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3165, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "remove_request_init_listener", 1) < (0)) __PYX_ERR(0, 3165, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_request_init_listener", 0, 2, 2, i); __PYX_ERR(0, 3165, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3165, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3165, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_fn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_request_init_listener", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 3165, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Session.remove_request_init_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_54remove_request_init_listener(__pyx_self, __pyx_v_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_54remove_request_init_listener(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_request_init_listener", 0); /* "cassandra/cluster.py":3171 * See :meth:`.Session.add_request_init_listener`. * """ * self._request_init_callbacks.remove((fn, args, kwargs)) # <<<<<<<<<<<<<< * * def _on_request(self, response_future): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_request_init_callbacks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 3171, __pyx_L1_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_args) != (0)) __PYX_ERR(0, 3171, __pyx_L1_error); __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_kwargs) != (0)) __PYX_ERR(0, 3171, __pyx_L1_error); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3165 * self._request_init_callbacks.append((fn, args, kwargs)) * * def remove_request_init_listener(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Removes a callback and arguments from the list. */ /* 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_AddTraceback("cassandra.cluster.Session.remove_request_init_listener", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3173 * self._request_init_callbacks.remove((fn, args, kwargs)) * * def _on_request(self, response_future): # <<<<<<<<<<<<<< * for fn, args, kwargs in self._request_init_callbacks: * fn(response_future, *args, **kwargs) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_57_on_request(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_57_on_request = {"_on_request", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_57_on_request, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_57_on_request(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_response_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_on_request (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_response_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3173, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3173, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3173, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_on_request", 0) < (0)) __PYX_ERR(0, 3173, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_on_request", 1, 2, 2, i); __PYX_ERR(0, 3173, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3173, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3173, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_response_future = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_on_request", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3173, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._on_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_56_on_request(__pyx_self, __pyx_v_self, __pyx_v_response_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_56_on_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response_future) { PyObject *__pyx_v_fn = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_kwargs = 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)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_on_request", 0); /* "cassandra/cluster.py":3174 * * def _on_request(self, response_future): * for fn, args, kwargs in self._request_init_callbacks: # <<<<<<<<<<<<<< * fn(response_future, *args, **kwargs) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_request_init_callbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3174, __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(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3174, __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))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3174, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3174, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); #endif ++__pyx_t_3; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3174, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3174, __pyx_L1_error) PyErr_Clear(); } 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 != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3174, __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_INCREF(__pyx_t_5); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); } #else __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < (0)) __PYX_ERR(0, 3174, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3174, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_fn, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_args, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_kwargs, __pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":3175 * def _on_request(self, response_future): * for fn, args, kwargs in self._request_init_callbacks: * fn(response_future, *args, **kwargs) # <<<<<<<<<<<<<< * * def prepare(self, query, custom_payload=None, keyspace=None): */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_response_future); __Pyx_GIVEREF(__pyx_v_response_future); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_response_future) != (0)) __PYX_ERR(0, 3175, __pyx_L1_error); __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 3175, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { __pyx_t_7 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_7 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_fn, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3174 * * def _on_request(self, response_future): * for fn, args, kwargs in self._request_init_callbacks: # <<<<<<<<<<<<<< * fn(response_future, *args, **kwargs) * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3173 * self._request_init_callbacks.remove((fn, args, kwargs)) * * def _on_request(self, response_future): # <<<<<<<<<<<<<< * for fn, args, kwargs in self._request_init_callbacks: * fn(response_future, *args, **kwargs) */ /* 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_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.Session._on_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_fn); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3177 * fn(response_future, *args, **kwargs) * * def prepare(self, query, custom_payload=None, keyspace=None): # <<<<<<<<<<<<<< * """ * Prepares a query string, returning a :class:`~cassandra.query.PreparedStatement` */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_59prepare(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_58prepare, "\n Prepares a query string, returning a :class:`~cassandra.query.PreparedStatement`\n instance which can be used as follows::\n\n >>> session = cluster.connect(\"mykeyspace\")\n >>> query = \"INSERT INTO users (id, name, age) VALUES (?, ?, ?)\"\n >>> prepared = session.prepare(query)\n >>> session.execute(prepared, (user.id, user.name, user.age))\n\n Or you may bind values to the prepared statement ahead of time::\n\n >>> prepared = session.prepare(query)\n >>> bound_stmt = prepared.bind((user.id, user.name, user.age))\n >>> session.execute(bound_stmt)\n\n Of course, prepared statements may (and should) be reused::\n\n >>> prepared = session.prepare(query)\n >>> for user in users:\n ... bound = prepared.bind((user.id, user.name, user.age))\n ... session.execute(bound)\n\n Alternatively, if :attr:`~.Cluster.protocol_version` is 5 or higher\n (requires Cassandra 4.0+), the keyspace can be specified as a\n parameter. This will allow you to avoid specifying the keyspace in the\n query without specifying a keyspace in :meth:`~.Cluster.connect`. It\n even will let you prepare and use statements against a keyspace other\n than the one originally specified on connection:\n\n >>> analyticskeyspace_prepared = session.prepare(\n ... \"INSERT INTO user_activity id, last_activity VALUES (?, ?)\",\n ... keyspace=\"analyticskeyspace\") # note the different keyspace\n\n **Important**: PreparedStatements should be prepared only once.\n Preparing the same query more than once will likely affect performance.\n\n `custom_payload` is a key value map to be passed along with the prepare\n message. See :ref:`custom_payload`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_59prepare = {"prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_59prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_58prepare}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_59prepare(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; CYTHON_UNUSED PyObject *__pyx_v_custom_payload = 0; PyObject *__pyx_v_keyspace = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("prepare (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_custom_payload,&__pyx_mstate_global->__pyx_n_u_keyspace,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3177, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3177, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3177, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3177, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3177, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "prepare", 0) < (0)) __PYX_ERR(0, 3177, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("prepare", 0, 2, 4, i); __PYX_ERR(0, 3177, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3177, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3177, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3177, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3177, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_custom_payload = values[2]; __pyx_v_keyspace = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("prepare", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3177, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_58prepare(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_custom_payload, __pyx_v_keyspace); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_58prepare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, CYTHON_UNUSED PyObject *__pyx_v_custom_payload, PyObject *__pyx_v_keyspace) { PyObject *__pyx_v_message = NULL; PyObject *__pyx_v_future = NULL; PyObject *__pyx_v_response = NULL; PyObject *__pyx_v_prepared_keyspace = NULL; PyObject *__pyx_v_prepared_statement = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; 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; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prepare", 0); /* "cassandra/cluster.py":3217 * message. See :ref:`custom_payload`. * """ * message = PrepareMessage(query=query, keyspace=keyspace) # <<<<<<<<<<<<<< * future = ResponseFuture(self, message, query=None, timeout=self.default_timeout) * try: */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PrepareMessage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_query, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3217, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_5, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3217, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_message = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3218 * """ * message = PrepareMessage(query=query, keyspace=keyspace) * future = ResponseFuture(self, message, query=None, timeout=self.default_timeout) # <<<<<<<<<<<<<< * try: * future.send_request() */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ResponseFuture); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_timeout_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, __pyx_v_self, __pyx_v_message}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, Py_None, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3218, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_2, __pyx_t_6, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 3218, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_future = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3219 * message = PrepareMessage(query=query, keyspace=keyspace) * future = ResponseFuture(self, message, query=None, timeout=self.default_timeout) * try: # <<<<<<<<<<<<<< * future.send_request() * response = future.result().one() */ { __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:*/ { /* "cassandra/cluster.py":3220 * future = ResponseFuture(self, message, query=None, timeout=self.default_timeout) * try: * future.send_request() # <<<<<<<<<<<<<< * response = future.result().one() * except Exception: */ __pyx_t_5 = __pyx_v_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3220, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3221 * try: * future.send_request() * response = future.result().one() # <<<<<<<<<<<<<< * except Exception: * log.exception("Error preparing query:") */ __pyx_t_2 = __pyx_v_future; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3221, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_one, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3221, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_response = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3219 * message = PrepareMessage(query=query, keyspace=keyspace) * future = ResponseFuture(self, message, query=None, timeout=self.default_timeout) * try: # <<<<<<<<<<<<<< * future.send_request() * response = future.result().one() */ } __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_L8_try_end; __pyx_L3_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_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":3222 * future.send_request() * response = future.result().one() * except Exception: # <<<<<<<<<<<<<< * log.exception("Error preparing query:") * raise */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster.Session.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 3222, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /* "cassandra/cluster.py":3223 * response = future.result().one() * except Exception: * log.exception("Error preparing query:") # <<<<<<<<<<<<<< * raise * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3223, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3223, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Error_preparing_query}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3223, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3224 * except Exception: * log.exception("Error preparing query:") * raise # <<<<<<<<<<<<<< * * prepared_keyspace = keyspace if keyspace else None */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 3224, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3219 * message = PrepareMessage(query=query, keyspace=keyspace) * future = ResponseFuture(self, message, query=None, timeout=self.default_timeout) * try: # <<<<<<<<<<<<<< * future.send_request() * response = future.result().one() */ __pyx_L5_except_error:; __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_L1_error; __pyx_L8_try_end:; } /* "cassandra/cluster.py":3226 * raise * * prepared_keyspace = keyspace if keyspace else None # <<<<<<<<<<<<<< * prepared_statement = PreparedStatement.from_message( * response.query_id, response.bind_metadata, response.pk_indexes, self.cluster.metadata, query, prepared_keyspace, */ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_keyspace); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 3226, __pyx_L1_error) if (__pyx_t_13) { __Pyx_INCREF(__pyx_v_keyspace); __pyx_t_5 = __pyx_v_keyspace; } else { __Pyx_INCREF(Py_None); __pyx_t_5 = Py_None; } __pyx_v_prepared_keyspace = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3227 * * prepared_keyspace = keyspace if keyspace else None * prepared_statement = PreparedStatement.from_message( # <<<<<<<<<<<<<< * response.query_id, response.bind_metadata, response.pk_indexes, self.cluster.metadata, query, prepared_keyspace, * self._protocol_version, response.column_metadata, response.result_metadata_id, self.cluster.column_encryption_policy) */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PreparedStatement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_from_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3228 * prepared_keyspace = keyspace if keyspace else None * prepared_statement = PreparedStatement.from_message( * response.query_id, response.bind_metadata, response.pk_indexes, self.cluster.metadata, query, prepared_keyspace, # <<<<<<<<<<<<<< * self._protocol_version, response.column_metadata, response.result_metadata_id, self.cluster.column_encryption_policy) * prepared_statement.custom_payload = future.custom_payload */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_bind_metadata); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_pk_indexes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3229 * prepared_statement = PreparedStatement.from_message( * response.query_id, response.bind_metadata, response.pk_indexes, self.cluster.metadata, query, prepared_keyspace, * self._protocol_version, response.column_metadata, response.result_metadata_id, self.cluster.column_encryption_policy) # <<<<<<<<<<<<<< * prepared_statement.custom_payload = future.custom_payload * */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_column_metadata); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_result_metadata_id); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_mstate_global->__pyx_n_u_column_encryption_policy); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[11] = {__pyx_t_6, __pyx_t_1, __pyx_t_12, __pyx_t_3, __pyx_t_14, __pyx_v_query, __pyx_v_prepared_keyspace, __pyx_t_11, __pyx_t_15, __pyx_t_16, __pyx_t_18}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (11-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_prepared_statement = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3230 * response.query_id, response.bind_metadata, response.pk_indexes, self.cluster.metadata, query, prepared_keyspace, * self._protocol_version, response.column_metadata, response.result_metadata_id, self.cluster.column_encryption_policy) * prepared_statement.custom_payload = future.custom_payload # <<<<<<<<<<<<<< * * self.cluster.add_prepared(response.query_id, prepared_statement) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_custom_payload); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_custom_payload, __pyx_t_5) < (0)) __PYX_ERR(0, 3230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3232 * prepared_statement.custom_payload = future.custom_payload * * self.cluster.add_prepared(response.query_id, prepared_statement) # <<<<<<<<<<<<<< * * if self.cluster.prepare_on_all_hosts: */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_2 = __pyx_t_18; __Pyx_INCREF(__pyx_t_2); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_16, __pyx_v_prepared_statement}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_prepared, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3234 * self.cluster.add_prepared(response.query_id, prepared_statement) * * if self.cluster.prepare_on_all_hosts: # <<<<<<<<<<<<<< * host = future._current_host * try: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_prepare_on_all_hosts); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 3234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_13) { /* "cassandra/cluster.py":3235 * * if self.cluster.prepare_on_all_hosts: * host = future._current_host # <<<<<<<<<<<<<< * try: * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) */ __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_v_host = __pyx_t_18; __pyx_t_18 = 0; /* "cassandra/cluster.py":3236 * if self.cluster.prepare_on_all_hosts: * host = future._current_host * try: # <<<<<<<<<<<<<< * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "cassandra/cluster.py":3237 * host = future._current_host * try: * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) # <<<<<<<<<<<<<< * except Exception: * log.exception("Error preparing query on all hosts:") */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_query_string); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3237, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_4 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_t_16, __pyx_v_host, __pyx_v_prepared_keyspace}; __pyx_t_18 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_prepare_on_all_hosts, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3237, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_18); } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "cassandra/cluster.py":3236 * if self.cluster.prepare_on_all_hosts: * host = future._current_host * try: # <<<<<<<<<<<<<< * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) * except Exception: */ } __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; goto __pyx_L17_try_end; __pyx_L12_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_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":3238 * try: * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) * except Exception: # <<<<<<<<<<<<<< * log.exception("Error preparing query on all hosts:") * */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster.Session.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_18, &__pyx_t_16, &__pyx_t_5) < 0) __PYX_ERR(0, 3238, __pyx_L14_except_error) __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_5); /* "cassandra/cluster.py":3239 * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) * except Exception: * log.exception("Error preparing query on all hosts:") # <<<<<<<<<<<<<< * * return prepared_statement */ __pyx_t_15 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3239, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3239, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); assert(__pyx_t_15); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_mstate_global->__pyx_kp_u_Error_preparing_query_on_all_hos}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3239, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L13_exception_handled; } goto __pyx_L14_except_error; /* "cassandra/cluster.py":3236 * if self.cluster.prepare_on_all_hosts: * host = future._current_host * try: # <<<<<<<<<<<<<< * self.prepare_on_all_hosts(prepared_statement.query_string, host, prepared_keyspace) * except Exception: */ __pyx_L14_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); goto __pyx_L1_error; __pyx_L13_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); __pyx_L17_try_end:; } /* "cassandra/cluster.py":3234 * self.cluster.add_prepared(response.query_id, prepared_statement) * * if self.cluster.prepare_on_all_hosts: # <<<<<<<<<<<<<< * host = future._current_host * try: */ } /* "cassandra/cluster.py":3241 * log.exception("Error preparing query on all hosts:") * * return prepared_statement # <<<<<<<<<<<<<< * * def prepare_on_all_hosts(self, query, excluded_host, keyspace=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_prepared_statement); __pyx_r = __pyx_v_prepared_statement; goto __pyx_L0; /* "cassandra/cluster.py":3177 * fn(response_future, *args, **kwargs) * * def prepare(self, query, custom_payload=None, keyspace=None): # <<<<<<<<<<<<<< * """ * Prepares a query string, returning a :class:`~cassandra.query.PreparedStatement` */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("cassandra.cluster.Session.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_future); __Pyx_XDECREF(__pyx_v_response); __Pyx_XDECREF(__pyx_v_prepared_keyspace); __Pyx_XDECREF(__pyx_v_prepared_statement); __Pyx_XDECREF(__pyx_v_host); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3243 * return prepared_statement * * def prepare_on_all_hosts(self, query, excluded_host, keyspace=None): # <<<<<<<<<<<<<< * """ * Prepare the given query on all hosts, excluding ``excluded_host``. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_61prepare_on_all_hosts(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_60prepare_on_all_hosts, "\n Prepare the given query on all hosts, excluding ``excluded_host``.\n Intended for internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_61prepare_on_all_hosts = {"prepare_on_all_hosts", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_61prepare_on_all_hosts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_60prepare_on_all_hosts}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_61prepare_on_all_hosts(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_excluded_host = 0; PyObject *__pyx_v_keyspace = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("prepare_on_all_hosts (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_excluded_host,&__pyx_mstate_global->__pyx_n_u_keyspace,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3243, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "prepare_on_all_hosts", 0) < (0)) __PYX_ERR(0, 3243, __pyx_L3_error) if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("prepare_on_all_hosts", 0, 3, 4, i); __PYX_ERR(0, 3243, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3243, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3243, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3243, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_query = values[1]; __pyx_v_excluded_host = values[2]; __pyx_v_keyspace = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("prepare_on_all_hosts", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 3243, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.prepare_on_all_hosts", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_60prepare_on_all_hosts(__pyx_self, __pyx_v_self, __pyx_v_query, __pyx_v_excluded_host, __pyx_v_keyspace); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_60prepare_on_all_hosts(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_query, PyObject *__pyx_v_excluded_host, PyObject *__pyx_v_keyspace) { PyObject *__pyx_v_futures = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_future = NULL; PyObject *__pyx_v_request_id = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; Py_ssize_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; 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; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_t_16; int __pyx_t_17; PyObject *(*__pyx_t_18)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prepare_on_all_hosts", 0); /* "cassandra/cluster.py":3248 * Intended for internal use only. * """ * futures = [] # <<<<<<<<<<<<<< * for host in tuple(self._pools.keys()): * if host != excluded_host and host.is_up: */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_futures = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3249 * """ * futures = [] * for host in tuple(self._pools.keys()): # <<<<<<<<<<<<<< * if host != excluded_host and host.is_up: * future = ResponseFuture(self, PrepareMessage(query=query, keyspace=keyspace), */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_keys, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3249, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5)); #else __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); #endif ++__pyx_t_5; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3250 * futures = [] * for host in tuple(self._pools.keys()): * if host != excluded_host and host.is_up: # <<<<<<<<<<<<<< * future = ResponseFuture(self, PrepareMessage(query=query, keyspace=keyspace), * None, self.default_timeout) */ __pyx_t_3 = PyObject_RichCompare(__pyx_v_host, __pyx_v_excluded_host, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3250, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_t_7; __pyx_L6_bool_binop_done:; if (__pyx_t_6) { /* "cassandra/cluster.py":3251 * for host in tuple(self._pools.keys()): * if host != excluded_host and host.is_up: * future = ResponseFuture(self, PrepareMessage(query=query, keyspace=keyspace), # <<<<<<<<<<<<<< * None, self.default_timeout) * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ResponseFuture); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PrepareMessage); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_10, NULL}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_query, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3251, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace, __pyx_t_12, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3251, __pyx_L1_error) __pyx_t_9 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } /* "cassandra/cluster.py":3252 * if host != excluded_host and host.is_up: * future = ResponseFuture(self, PrepareMessage(query=query, keyspace=keyspace), * None, self.default_timeout) # <<<<<<<<<<<<<< * * # we don't care about errors preparing against specific hosts, */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_default_timeout_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_self, __pyx_t_9, Py_None, __pyx_t_11}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (5-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3257 * # since we can always prepare them as needed when the prepared * # statement is used. Just log errors and continue on. * try: # <<<<<<<<<<<<<< * request_id = future._query(host) * except Exception: */ { __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:*/ { /* "cassandra/cluster.py":3258 * # statement is used. Just log errors and continue on. * try: * request_id = future._query(host) # <<<<<<<<<<<<<< * except Exception: * log.exception("Error preparing query for host %s:", host) */ __pyx_t_8 = __pyx_v_future; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_query_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3258, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v_request_id, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3257 * # since we can always prepare them as needed when the prepared * # statement is used. Just log errors and continue on. * try: # <<<<<<<<<<<<<< * request_id = future._query(host) * except Exception: */ } __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_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3259 * try: * request_id = future._query(host) * except Exception: # <<<<<<<<<<<<<< * log.exception("Error preparing query for host %s:", host) * continue */ __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_16) { __Pyx_AddTraceback("cassandra.cluster.Session.prepare_on_all_hosts", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_11) < 0) __PYX_ERR(0, 3259, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_11); /* "cassandra/cluster.py":3260 * request_id = future._query(host) * except Exception: * log.exception("Error preparing query for host %s:", host) # <<<<<<<<<<<<<< * continue * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3260, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3260, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Error_preparing_query_for_host_s, __pyx_v_host}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3260, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3261 * except Exception: * log.exception("Error preparing query for host %s:", host) * continue # <<<<<<<<<<<<<< * * if request_id is None: */ goto __pyx_L16_except_continue; __pyx_L16_except_continue:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14_try_continue; } goto __pyx_L10_except_error; /* "cassandra/cluster.py":3257 * # since we can always prepare them as needed when the prepared * # statement is used. Just log errors and continue on. * try: # <<<<<<<<<<<<<< * request_id = future._query(host) * except Exception: */ __pyx_L10_except_error:; __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_L1_error; __pyx_L14_try_continue:; __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_L3_continue; __pyx_L15_try_end:; } /* "cassandra/cluster.py":3263 * continue * * if request_id is None: # <<<<<<<<<<<<<< * # the error has already been logged by ResponseFuture * log.debug("Failed to prepare query for host %s: %r", */ __pyx_t_6 = (__pyx_v_request_id == Py_None); if (__pyx_t_6) { /* "cassandra/cluster.py":3265 * if request_id is None: * # the error has already been logged by ResponseFuture * log.debug("Failed to prepare query for host %s: %r", # <<<<<<<<<<<<<< * host, future._errors.get(host)) * continue */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3266 * # the error has already been logged by ResponseFuture * log.debug("Failed to prepare query for host %s: %r", * host, future._errors.get(host)) # <<<<<<<<<<<<<< * continue * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __pyx_t_2; __Pyx_INCREF(__pyx_t_10); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Failed_to_prepare_query_for_host, __pyx_v_host, __pyx_t_3}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3267 * log.debug("Failed to prepare query for host %s: %r", * host, future._errors.get(host)) * continue # <<<<<<<<<<<<<< * * futures.append((host, future)) */ goto __pyx_L3_continue; /* "cassandra/cluster.py":3263 * continue * * if request_id is None: # <<<<<<<<<<<<<< * # the error has already been logged by ResponseFuture * log.debug("Failed to prepare query for host %s: %r", */ } /* "cassandra/cluster.py":3269 * continue * * futures.append((host, future)) # <<<<<<<<<<<<<< * * for host, future in futures: */ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_host); __Pyx_GIVEREF(__pyx_v_host); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_host) != (0)) __PYX_ERR(0, 3269, __pyx_L1_error); __Pyx_INCREF(__pyx_v_future); __Pyx_GIVEREF(__pyx_v_future); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_v_future) != (0)) __PYX_ERR(0, 3269, __pyx_L1_error); __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_t_11); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 3269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3250 * futures = [] * for host in tuple(self._pools.keys()): * if host != excluded_host and host.is_up: # <<<<<<<<<<<<<< * future = ResponseFuture(self, PrepareMessage(query=query, keyspace=keyspace), * None, self.default_timeout) */ } /* "cassandra/cluster.py":3249 * """ * futures = [] * for host in tuple(self._pools.keys()): # <<<<<<<<<<<<<< * if host != excluded_host and host.is_up: * future = ResponseFuture(self, PrepareMessage(query=query, keyspace=keyspace), */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3271 * futures.append((host, future)) * * for host, future in futures: # <<<<<<<<<<<<<< * try: * future.result() */ __pyx_t_1 = __pyx_v_futures; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3271, __pyx_L1_error) #endif if (__pyx_t_5 >= __pyx_temp) break; } __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_5, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_5; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3271, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_9); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_18 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); index = 0; __pyx_t_9 = __pyx_t_18(__pyx_t_8); if (unlikely(!__pyx_t_9)) goto __pyx_L22_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_3 = __pyx_t_18(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L22_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_18(__pyx_t_8), 2) < (0)) __PYX_ERR(0, 3271, __pyx_L1_error) __pyx_t_18 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L23_unpacking_done; __pyx_L22_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_18 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3271, __pyx_L1_error) __pyx_L23_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3272 * * for host, future in futures: * try: # <<<<<<<<<<<<<< * future.result() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "cassandra/cluster.py":3273 * for host, future in futures: * try: * future.result() # <<<<<<<<<<<<<< * except Exception: * log.exception("Error preparing query for host %s:", host) */ __pyx_t_3 = __pyx_v_future; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3273, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3272 * * for host, future in futures: * try: # <<<<<<<<<<<<<< * future.result() * except Exception: */ } __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L31_try_end; __pyx_L24_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3274 * try: * future.result() * except Exception: # <<<<<<<<<<<<<< * log.exception("Error preparing query for host %s:", host) * */ __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_16) { __Pyx_AddTraceback("cassandra.cluster.Session.prepare_on_all_hosts", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 3274, __pyx_L26_except_error) __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":3275 * future.result() * except Exception: * log.exception("Error preparing query for host %s:", host) # <<<<<<<<<<<<<< * * def shutdown(self): */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3275, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3275, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Error_preparing_query_for_host_s, __pyx_v_host}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3275, __pyx_L26_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L25_exception_handled; } goto __pyx_L26_except_error; /* "cassandra/cluster.py":3272 * * for host, future in futures: * try: # <<<<<<<<<<<<<< * future.result() * except Exception: */ __pyx_L26_except_error:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); goto __pyx_L1_error; __pyx_L25_exception_handled:; __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13); __pyx_L31_try_end:; } /* "cassandra/cluster.py":3271 * futures.append((host, future)) * * for host, future in futures: # <<<<<<<<<<<<<< * try: * future.result() */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3243 * return prepared_statement * * def prepare_on_all_hosts(self, query, excluded_host, keyspace=None): # <<<<<<<<<<<<<< * """ * Prepare the given query on all hosts, excluding ``excluded_host``. */ /* 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_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("cassandra.cluster.Session.prepare_on_all_hosts", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_futures); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_future); __Pyx_XDECREF(__pyx_v_request_id); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3277 * log.exception("Error preparing query for host %s:", host) * * def shutdown(self): # <<<<<<<<<<<<<< * """ * Close all connections. ``Session`` instances should not be used */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_63shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_62shutdown, "\n Close all connections. ``Session`` instances should not be used\n for any purpose after being shutdown.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_63shutdown = {"shutdown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_63shutdown, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_62shutdown}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_63shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3277, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3277, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "shutdown", 0) < (0)) __PYX_ERR(0, 3277, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, i); __PYX_ERR(0, 3277, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3277, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3277, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_62shutdown(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_62shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_future = NULL; PyObject *__pyx_v_pool = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; Py_ssize_t __pyx_t_13; PyObject *(*__pyx_t_14)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shutdown", 0); /* "cassandra/cluster.py":3282 * for any purpose after being shutdown. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3282, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3282, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":3283 * """ * with self._lock: * if self.is_shutdown: # <<<<<<<<<<<<<< * return * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3283, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3283, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { /* "cassandra/cluster.py":3284 * with self._lock: * if self.is_shutdown: * return # <<<<<<<<<<<<<< * else: * self.is_shutdown = True */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; /* "cassandra/cluster.py":3283 * """ * with self._lock: * if self.is_shutdown: # <<<<<<<<<<<<<< * return * else: */ } /* "cassandra/cluster.py":3286 * return * else: * self.is_shutdown = True # <<<<<<<<<<<<<< * * # PYTHON-673. If shutdown was called shortly after session init, avoid */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown, Py_True) < (0)) __PYX_ERR(0, 3286, __pyx_L7_error) } /* "cassandra/cluster.py":3282 * for any purpose after being shutdown. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ } __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_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("cassandra.cluster.Session.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 3282, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3282, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3282, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10 < (0)) __PYX_ERR(0, 3282, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_10); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 3282, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L11_try_return:; __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_return; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_9 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L17; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":3291 * # a race by cancelling any initial connection attempts haven't started, * # then blocking on any that have. * for future in self._initial_connect_futures: # <<<<<<<<<<<<<< * future.cancel() * wait_futures(self._initial_connect_futures) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_initial_connect_futures); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0; __pyx_t_14 = NULL; } else { __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3291, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3291, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } __pyx_t_5 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_13, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_13; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3291, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13)); #else __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); #endif ++__pyx_t_13; } if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3291, __pyx_L1_error) } else { __pyx_t_5 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3291, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3292 * # then blocking on any that have. * for future in self._initial_connect_futures: * future.cancel() # <<<<<<<<<<<<<< * wait_futures(self._initial_connect_futures) * */ __pyx_t_1 = __pyx_v_future; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3291 * # a race by cancelling any initial connection attempts haven't started, * # then blocking on any that have. * for future in self._initial_connect_futures: # <<<<<<<<<<<<<< * future.cancel() * wait_futures(self._initial_connect_futures) */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3293 * for future in self._initial_connect_futures: * future.cancel() * wait_futures(self._initial_connect_futures) # <<<<<<<<<<<<<< * * if self._monitor_reporter: */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_wait_futures); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_initial_connect_futures); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3295 * wait_futures(self._initial_connect_futures) * * if self._monitor_reporter: # <<<<<<<<<<<<<< * self._monitor_reporter.stop() * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_monitor_reporter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 3295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":3296 * * if self._monitor_reporter: * self._monitor_reporter.stop() # <<<<<<<<<<<<<< * * for pool in tuple(self._pools.values()): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_monitor_reporter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_stop, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3295 * wait_futures(self._initial_connect_futures) * * if self._monitor_reporter: # <<<<<<<<<<<<<< * self._monitor_reporter.stop() * */ } /* "cassandra/cluster.py":3298 * self._monitor_reporter.stop() * * for pool in tuple(self._pools.values()): # <<<<<<<<<<<<<< * pool.shutdown() * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3298, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); #endif ++__pyx_t_13; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_pool, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3299 * * for pool in tuple(self._pools.values()): * pool.shutdown() # <<<<<<<<<<<<<< * * def __enter__(self): */ __pyx_t_4 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3298 * self._monitor_reporter.stop() * * for pool in tuple(self._pools.values()): # <<<<<<<<<<<<<< * pool.shutdown() * */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3277 * log.exception("Error preparing query for host %s:", host) * * def shutdown(self): # <<<<<<<<<<<<<< * """ * Close all connections. ``Session`` instances should not be used */ /* 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("cassandra.cluster.Session.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_future); __Pyx_XDECREF(__pyx_v_pool); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3301 * pool.shutdown() * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_65__enter__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_65__enter__ = {"__enter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_65__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_65__enter__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3301, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3301, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__enter__", 0) < (0)) __PYX_ERR(0, 3301, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, i); __PYX_ERR(0, 3301, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3301, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__enter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3301, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_64__enter__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_64__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__", 0); /* "cassandra/cluster.py":3302 * * def __enter__(self): * return self # <<<<<<<<<<<<<< * * def __exit__(self, *args): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; /* "cassandra/cluster.py":3301 * pool.shutdown() * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3304 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.shutdown() * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_67__exit__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_67__exit__ = {"__exit__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_67__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_67__exit__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_args = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3304, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3304, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, used_pos_args, __pyx_kwds_len, "__exit__", 0) < (0)) __PYX_ERR(0, 3304, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, i); __PYX_ERR(0, 3304, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3304, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 3304, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("cassandra.cluster.Session.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_66__exit__(__pyx_self, __pyx_v_self, __pyx_v_args); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_66__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); /* "cassandra/cluster.py":3305 * * def __exit__(self, *args): * self.shutdown() # <<<<<<<<<<<<<< * * def __del__(self): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3304 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.shutdown() * */ /* 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_AddTraceback("cassandra.cluster.Session.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3307 * self.shutdown() * * def __del__(self): # <<<<<<<<<<<<<< * try: * # Ensure all connections are closed, in case the Session object is deleted by the GC */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_69__del__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_69__del__ = {"__del__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_69__del__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_69__del__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3307, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3307, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__del__", 0) < (0)) __PYX_ERR(0, 3307, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__del__", 1, 1, 1, i); __PYX_ERR(0, 3307, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3307, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__del__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3307, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_68__del__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_68__del__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__del__", 0); /* "cassandra/cluster.py":3308 * * def __del__(self): * try: # <<<<<<<<<<<<<< * # Ensure all connections are closed, in case the Session object is deleted by the GC * self.shutdown() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3310 * try: * # Ensure all connections are closed, in case the Session object is deleted by the GC * self.shutdown() # <<<<<<<<<<<<<< * except: * # Ignore all errors. Shutdown errors can be caught by the user */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3310, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3308 * * def __del__(self): * try: # <<<<<<<<<<<<<< * # Ensure all connections are closed, in case the Session object is deleted by the GC * self.shutdown() */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3311 * # Ensure all connections are closed, in case the Session object is deleted by the GC * self.shutdown() * except: # <<<<<<<<<<<<<< * # Ignore all errors. Shutdown errors can be caught by the user * # when cluster.shutdown() is called explicitly. */ /*except:*/ { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":3307 * self.shutdown() * * def __del__(self): # <<<<<<<<<<<<<< * try: * # Ensure all connections are closed, in case the Session object is deleted by the GC */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3316 * pass * * def add_or_renew_pool(self, host, is_host_addition): # <<<<<<<<<<<<<< * """ * For internal use only. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_71add_or_renew_pool(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_70add_or_renew_pool, "\n For internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_71add_or_renew_pool = {"add_or_renew_pool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_71add_or_renew_pool, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_70add_or_renew_pool}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_71add_or_renew_pool(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_is_host_addition = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_or_renew_pool (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_is_host_addition,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3316, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_or_renew_pool", 0) < (0)) __PYX_ERR(0, 3316, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_or_renew_pool", 1, 3, 3, i); __PYX_ERR(0, 3316, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3316, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3316, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3316, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_is_host_addition = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_or_renew_pool", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3316, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_70add_or_renew_pool(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_is_host_addition); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3324 * return None * * def run_add_or_renew_pool(): # <<<<<<<<<<<<<< * try: * if self._protocol_version >= 3: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_17add_or_renew_pool_1run_add_or_renew_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_17add_or_renew_pool_1run_add_or_renew_pool = {"run_add_or_renew_pool", (PyCFunction)__pyx_pw_9cassandra_7cluster_7Session_17add_or_renew_pool_1run_add_or_renew_pool, METH_NOARGS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_17add_or_renew_pool_1run_add_or_renew_pool(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run_add_or_renew_pool (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_17add_or_renew_pool_run_add_or_renew_pool(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3351 * errors_returned = [] * * def callback(pool, errors): # <<<<<<<<<<<<<< * errors_returned.extend(errors) * set_keyspace_event.set() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_1callback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_1callback = {"callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_1callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_1callback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_pool = 0; PyObject *__pyx_v_errors = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("callback (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_errors,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3351, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3351, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3351, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "callback", 0) < (0)) __PYX_ERR(0, 3351, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("callback", 1, 2, 2, i); __PYX_ERR(0, 3351, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3351, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3351, __pyx_L3_error) } __pyx_v_pool = values[0]; __pyx_v_errors = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("callback", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3351, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool.run_add_or_renew_pool.callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_callback(__pyx_self, __pyx_v_pool, __pyx_v_errors); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_callback(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_pool, PyObject *__pyx_v_errors) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *__pyx_cur_scope; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("callback", 0); __pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "cassandra/cluster.py":3352 * * def callback(pool, errors): * errors_returned.extend(errors) # <<<<<<<<<<<<<< * set_keyspace_event.set() * */ if (unlikely(!__pyx_cur_scope->__pyx_v_errors_returned)) { __Pyx_RaiseClosureNameError("errors_returned"); __PYX_ERR(0, 3352, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_v_errors_returned == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "extend"); __PYX_ERR(0, 3352, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyList_Extend(__pyx_cur_scope->__pyx_v_errors_returned, __pyx_v_errors); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3352, __pyx_L1_error) /* "cassandra/cluster.py":3353 * def callback(pool, errors): * errors_returned.extend(errors) * set_keyspace_event.set() # <<<<<<<<<<<<<< * * new_pool._set_keyspace_for_all_conns(self.keyspace, callback) */ if (unlikely(!__pyx_cur_scope->__pyx_v_set_keyspace_event)) { __Pyx_RaiseClosureNameError("set_keyspace_event"); __PYX_ERR(0, 3353, __pyx_L1_error) } __pyx_t_3 = __pyx_cur_scope->__pyx_v_set_keyspace_event; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3351 * errors_returned = [] * * def callback(pool, errors): # <<<<<<<<<<<<<< * errors_returned.extend(errors) * set_keyspace_event.set() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool.run_add_or_renew_pool.callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3324 * return None * * def run_add_or_renew_pool(): # <<<<<<<<<<<<<< * try: * if self._protocol_version >= 3: */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_17add_or_renew_pool_run_add_or_renew_pool(PyObject *__pyx_self) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *__pyx_cur_scope; PyObject *__pyx_v_new_pool = NULL; PyObject *__pyx_v_auth_exc = NULL; PyObject *__pyx_v_conn_exc = NULL; PyObject *__pyx_v_previous = NULL; PyObject *__pyx_v_callback = 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; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; char const *__pyx_t_23; int __pyx_t_24; int __pyx_t_25; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run_add_or_renew_pool", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3324, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *) __Pyx_CyFunction_GetClosure(__pyx_self); __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); /* "cassandra/cluster.py":3325 * * def run_add_or_renew_pool(): * try: # <<<<<<<<<<<<<< * if self._protocol_version >= 3: * new_pool = HostConnection(host, distance, self) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3326 * def run_add_or_renew_pool(): * try: * if self._protocol_version >= 3: # <<<<<<<<<<<<<< * new_pool = HostConnection(host, distance, self) * else: */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3326, __pyx_L3_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3326, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_mstate_global->__pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3326, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3326, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_6) { /* "cassandra/cluster.py":3327 * try: * if self._protocol_version >= 3: * new_pool = HostConnection(host, distance, self) # <<<<<<<<<<<<<< * else: * # TODO remove host pool again ??? */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_HostConnection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3327, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3327, __pyx_L3_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_distance)) { __Pyx_RaiseClosureNameError("distance"); __PYX_ERR(0, 3327, __pyx_L3_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3327, __pyx_L3_error) } __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_distance, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3327, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_new_pool = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3326 * def run_add_or_renew_pool(): * try: * if self._protocol_version >= 3: # <<<<<<<<<<<<<< * new_pool = HostConnection(host, distance, self) * else: */ goto __pyx_L9; } /* "cassandra/cluster.py":3330 * else: * # TODO remove host pool again ??? * new_pool = HostConnectionPool(host, distance, self) # <<<<<<<<<<<<<< * except AuthenticationFailed as auth_exc: * conn_exc = ConnectionException(str(auth_exc), endpoint=host) */ /*else*/ { __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_HostConnectionPool); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3330, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3330, __pyx_L3_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_distance)) { __Pyx_RaiseClosureNameError("distance"); __PYX_ERR(0, 3330, __pyx_L3_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3330, __pyx_L3_error) } __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_distance, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3330, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_new_pool = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L9:; /* "cassandra/cluster.py":3325 * * def run_add_or_renew_pool(): * try: # <<<<<<<<<<<<<< * if self._protocol_version >= 3: * new_pool = HostConnection(host, distance, self) */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":3331 * # TODO remove host pool again ??? * new_pool = HostConnectionPool(host, distance, self) * except AuthenticationFailed as auth_exc: # <<<<<<<<<<<<<< * conn_exc = ConnectionException(str(auth_exc), endpoint=host) * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) */ __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_AuthenticationFailed); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3331, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_7 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool.run_add_or_renew_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 3331, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_v_auth_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":3332 * new_pool = HostConnectionPool(host, distance, self) * except AuthenticationFailed as auth_exc: * conn_exc = ConnectionException(str(auth_exc), endpoint=host) # <<<<<<<<<<<<<< * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) * return False */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3332, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_Unicode(__pyx_v_auth_exc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3332, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_13); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3332, __pyx_L15_error) } __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_t_13}; __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3332, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_endpoint, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_t_14, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3332, __pyx_L15_error) __pyx_t_9 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3332, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_conn_exc = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3333 * except AuthenticationFailed as auth_exc: * conn_exc = ConnectionException(str(auth_exc), endpoint=host) * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) # <<<<<<<<<<<<<< * return False * except Exception as conn_exc: */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3333, __pyx_L15_error) } __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3333, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = __pyx_t_14; __Pyx_INCREF(__pyx_t_12); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3333, __pyx_L15_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_is_host_addition)) { __Pyx_RaiseClosureNameError("is_host_addition"); __PYX_ERR(0, 3333, __pyx_L15_error) } __pyx_t_8 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_v_conn_exc, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_is_host_addition}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_connection_failure, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3333, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3334 * conn_exc = ConnectionException(str(auth_exc), endpoint=host) * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) * return False # <<<<<<<<<<<<<< * except Exception as conn_exc: * log.warning("Failed to create connection pool for new host %s:", */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L14_return; } /* "cassandra/cluster.py":3331 * # TODO remove host pool again ??? * new_pool = HostConnectionPool(host, distance, self) * except AuthenticationFailed as auth_exc: # <<<<<<<<<<<<<< * conn_exc = ConnectionException(str(auth_exc), endpoint=host) * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) */ /*finally:*/ { __pyx_L15_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_10 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_auth_exc); __pyx_v_auth_exc = 0; } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L5_except_error; } __pyx_L14_return: { __pyx_t_22 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_auth_exc); __pyx_v_auth_exc = 0; __pyx_r = __pyx_t_22; __pyx_t_22 = 0; goto __pyx_L6_except_return; } } } /* "cassandra/cluster.py":3335 * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) * return False * except Exception as conn_exc: # <<<<<<<<<<<<<< * log.warning("Failed to create connection pool for new host %s:", * host, exc_info=conn_exc) */ __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_15) { __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool.run_add_or_renew_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 3335, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_v_conn_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":3336 * return False * except Exception as conn_exc: * log.warning("Failed to create connection pool for new host %s:", # <<<<<<<<<<<<<< * host, exc_info=conn_exc) * # the host itself will still be marked down, so we need to pass */ __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3336, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3336, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3337 * except Exception as conn_exc: * log.warning("Failed to create connection pool for new host %s:", * host, exc_info=conn_exc) # <<<<<<<<<<<<<< * # the host itself will still be marked down, so we need to pass * # a special flag to make sure the reconnector is created */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3337, __pyx_L26_error) } __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_14); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_Failed_to_create_connection_pool, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3336, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, __pyx_v_conn_exc, __pyx_t_12, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3336, __pyx_L26_error) __pyx_t_9 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3336, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3340 * # the host itself will still be marked down, so we need to pass * # a special flag to make sure the reconnector is created * self.cluster.signal_connection_failure( # <<<<<<<<<<<<<< * host, conn_exc, is_host_addition, expect_host_to_be_down=True) * return False */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3340, __pyx_L26_error) } __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3340, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __pyx_t_12; __Pyx_INCREF(__pyx_t_13); /* "cassandra/cluster.py":3341 * # a special flag to make sure the reconnector is created * self.cluster.signal_connection_failure( * host, conn_exc, is_host_addition, expect_host_to_be_down=True) # <<<<<<<<<<<<<< * return False * */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3341, __pyx_L26_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_is_host_addition)) { __Pyx_RaiseClosureNameError("is_host_addition"); __PYX_ERR(0, 3341, __pyx_L26_error) } __pyx_t_8 = 0; { PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_13, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_v_conn_exc, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_is_host_addition}; __pyx_t_14 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3340, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_expect_host_to_be_down, Py_True, __pyx_t_14, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 3340, __pyx_L26_error) __pyx_t_9 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_connection_failure, __pyx_callargs+__pyx_t_8, (4-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_14); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3340, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3342 * self.cluster.signal_connection_failure( * host, conn_exc, is_host_addition, expect_host_to_be_down=True) * return False # <<<<<<<<<<<<<< * * previous = self._pools.get(host) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L25_return; } /* "cassandra/cluster.py":3335 * self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) * return False * except Exception as conn_exc: # <<<<<<<<<<<<<< * log.warning("Failed to create connection pool for new host %s:", * host, exc_info=conn_exc) */ /*finally:*/ { __pyx_L26_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_15 = __pyx_lineno; __pyx_t_10 = __pyx_clineno; __pyx_t_23 = __pyx_filename; { __Pyx_DECREF(__pyx_v_conn_exc); __pyx_v_conn_exc = 0; } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20); __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_23; goto __pyx_L5_except_error; } __pyx_L25_return: { __pyx_t_17 = __pyx_r; __pyx_r = 0; __Pyx_DECREF(__pyx_v_conn_exc); __pyx_v_conn_exc = 0; __pyx_r = __pyx_t_17; __pyx_t_17 = 0; goto __pyx_L6_except_return; } } } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3325 * * def run_add_or_renew_pool(): * try: # <<<<<<<<<<<<<< * if self._protocol_version >= 3: * new_pool = HostConnection(host, distance, self) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L6_except_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L8_try_end:; } /* "cassandra/cluster.py":3344 * return False * * previous = self._pools.get(host) # <<<<<<<<<<<<<< * with self._lock: * while new_pool._keyspace != self.keyspace: */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3344, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3344, __pyx_L1_error) } __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_v_previous = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":3345 * * previous = self._pools.get(host) * with self._lock: # <<<<<<<<<<<<<< * while new_pool._keyspace != self.keyspace: * self._lock.release() */ /*with:*/ { if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3345, __pyx_L1_error) } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3345, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_9))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3345, __pyx_L32_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_1, &__pyx_t_17); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { /* "cassandra/cluster.py":3346 * previous = self._pools.get(host) * with self._lock: * while new_pool._keyspace != self.keyspace: # <<<<<<<<<<<<<< * self._lock.release() * set_keyspace_event = Event() */ while (1) { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_pool, __pyx_mstate_global->__pyx_n_u_keyspace_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3346, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3346, __pyx_L36_error) } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3346, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3346, __pyx_L36_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3346, __pyx_L36_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (!__pyx_t_6) break; /* "cassandra/cluster.py":3347 * with self._lock: * while new_pool._keyspace != self.keyspace: * self._lock.release() # <<<<<<<<<<<<<< * set_keyspace_event = Event() * errors_returned = [] */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3347, __pyx_L36_error) } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3347, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_release, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3347, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3348 * while new_pool._keyspace != self.keyspace: * self._lock.release() * set_keyspace_event = Event() # <<<<<<<<<<<<<< * errors_returned = [] * */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_Event); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3348, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3348, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_set_keyspace_event); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_set_keyspace_event, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3349 * self._lock.release() * set_keyspace_event = Event() * errors_returned = [] # <<<<<<<<<<<<<< * * def callback(pool, errors): */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3349, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_errors_returned); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_errors_returned, ((PyObject*)__pyx_t_9)); __Pyx_GIVEREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3351 * errors_returned = [] * * def callback(pool, errors): # <<<<<<<<<<<<<< * errors_returned.extend(errors) * set_keyspace_event.set() */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_17add_or_renew_pool_21run_add_or_renew_pool_1callback, 0, __pyx_mstate_global->__pyx_n_u_Session_add_or_renew_pool_locals, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3351, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_callback, __pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3355 * set_keyspace_event.set() * * new_pool._set_keyspace_for_all_conns(self.keyspace, callback) # <<<<<<<<<<<<<< * set_keyspace_event.wait(self.cluster.connect_timeout) * if not set_keyspace_event.is_set() or errors_returned: */ __pyx_t_5 = __pyx_v_new_pool; __Pyx_INCREF(__pyx_t_5); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3355, __pyx_L36_error) } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3355, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_callback}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_keyspace_for_all_conns, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3355, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3356 * * new_pool._set_keyspace_for_all_conns(self.keyspace, callback) * set_keyspace_event.wait(self.cluster.connect_timeout) # <<<<<<<<<<<<<< * if not set_keyspace_event.is_set() or errors_returned: * log.warning("Failed setting keyspace for pool after keyspace changed during connect: %s", errors_returned) */ __pyx_t_7 = __pyx_cur_scope->__pyx_v_set_keyspace_event; __Pyx_INCREF(__pyx_t_7); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3356, __pyx_L36_error) } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3356, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_connect_timeout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3356, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_wait, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3356, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3357 * new_pool._set_keyspace_for_all_conns(self.keyspace, callback) * set_keyspace_event.wait(self.cluster.connect_timeout) * if not set_keyspace_event.is_set() or errors_returned: # <<<<<<<<<<<<<< * log.warning("Failed setting keyspace for pool after keyspace changed during connect: %s", errors_returned) * self.cluster.on_down(host, is_host_addition) */ __pyx_t_4 = __pyx_cur_scope->__pyx_v_set_keyspace_event; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_set, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3357, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 3357, __pyx_L36_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_25 = (!__pyx_t_24); if (!__pyx_t_25) { } else { __pyx_t_6 = __pyx_t_25; goto __pyx_L45_bool_binop_done; } { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_errors_returned); if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 3357, __pyx_L36_error) __pyx_t_25 = (__pyx_temp != 0); } __pyx_t_6 = __pyx_t_25; __pyx_L45_bool_binop_done:; if (__pyx_t_6) { /* "cassandra/cluster.py":3358 * set_keyspace_event.wait(self.cluster.connect_timeout) * if not set_keyspace_event.is_set() or errors_returned: * log.warning("Failed setting keyspace for pool after keyspace changed during connect: %s", errors_returned) # <<<<<<<<<<<<<< * self.cluster.on_down(host, is_host_addition) * new_pool.shutdown() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3358, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3358, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Failed_setting_keyspace_for_pool, __pyx_cur_scope->__pyx_v_errors_returned}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3358, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3359 * if not set_keyspace_event.is_set() or errors_returned: * log.warning("Failed setting keyspace for pool after keyspace changed during connect: %s", errors_returned) * self.cluster.on_down(host, is_host_addition) # <<<<<<<<<<<<<< * new_pool.shutdown() * self._lock.acquire() */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3359, __pyx_L36_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3359, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3359, __pyx_L36_error) } if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_is_host_addition)) { __Pyx_RaiseClosureNameError("is_host_addition"); __PYX_ERR(0, 3359, __pyx_L36_error) } __pyx_t_8 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_is_host_addition}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3359, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3360 * log.warning("Failed setting keyspace for pool after keyspace changed during connect: %s", errors_returned) * self.cluster.on_down(host, is_host_addition) * new_pool.shutdown() # <<<<<<<<<<<<<< * self._lock.acquire() * return False */ __pyx_t_4 = __pyx_v_new_pool; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3360, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3361 * self.cluster.on_down(host, is_host_addition) * new_pool.shutdown() * self._lock.acquire() # <<<<<<<<<<<<<< * return False * self._lock.acquire() */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3361, __pyx_L36_error) } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3361, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_acquire, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3361, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3362 * new_pool.shutdown() * self._lock.acquire() * return False # <<<<<<<<<<<<<< * self._lock.acquire() * self._pools[host] = new_pool */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L40_try_return; /* "cassandra/cluster.py":3357 * new_pool._set_keyspace_for_all_conns(self.keyspace, callback) * set_keyspace_event.wait(self.cluster.connect_timeout) * if not set_keyspace_event.is_set() or errors_returned: # <<<<<<<<<<<<<< * log.warning("Failed setting keyspace for pool after keyspace changed during connect: %s", errors_returned) * self.cluster.on_down(host, is_host_addition) */ } /* "cassandra/cluster.py":3363 * self._lock.acquire() * return False * self._lock.acquire() # <<<<<<<<<<<<<< * self._pools[host] = new_pool * */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3363, __pyx_L36_error) } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3363, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_acquire, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3363, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } /* "cassandra/cluster.py":3364 * return False * self._lock.acquire() * self._pools[host] = new_pool # <<<<<<<<<<<<<< * * log.debug("Added pool for host %s to session", host) */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3364, __pyx_L36_error) } __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3364, __pyx_L36_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3364, __pyx_L36_error) } if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host, __pyx_v_new_pool) < 0))) __PYX_ERR(0, 3364, __pyx_L36_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3345 * * previous = self._pools.get(host) * with self._lock: # <<<<<<<<<<<<<< * while new_pool._keyspace != self.keyspace: * self._lock.release() */ } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; goto __pyx_L41_try_end; __pyx_L36_error:; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool.run_add_or_renew_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 3345, __pyx_L38_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_9, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3345, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3345, __pyx_L38_except_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_6 < (0)) __PYX_ERR(0, 3345, __pyx_L38_except_error) __pyx_t_25 = (!__pyx_t_6); if (unlikely(__pyx_t_25)) { __Pyx_GIVEREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_4, __pyx_t_5); __pyx_t_9 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 3345, __pyx_L38_except_error) } __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L37_exception_handled; } __pyx_L38_except_error:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_1, __pyx_t_17); goto __pyx_L1_error; __pyx_L40_try_return:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_1, __pyx_t_17); goto __pyx_L33_return; __pyx_L37_exception_handled:; __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_1, __pyx_t_17); __pyx_L41_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_3) { __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } goto __pyx_L35; } __pyx_L33_return: { __pyx_t_17 = __pyx_r; __pyx_r = 0; if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_r = __pyx_t_17; __pyx_t_17 = 0; goto __pyx_L0; } __pyx_L35:; } goto __pyx_L50; __pyx_L32_error:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L1_error; __pyx_L50:; } /* "cassandra/cluster.py":3366 * self._pools[host] = new_pool * * log.debug("Added pool for host %s to session", host) # <<<<<<<<<<<<<< * if previous: * previous.shutdown() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_host)) { __Pyx_RaiseClosureNameError("host"); __PYX_ERR(0, 3366, __pyx_L1_error) } __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Added_pool_for_host_s_to_session, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3367 * * log.debug("Added pool for host %s to session", host) * if previous: # <<<<<<<<<<<<<< * previous.shutdown() * */ __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_v_previous); if (unlikely((__pyx_t_25 < 0))) __PYX_ERR(0, 3367, __pyx_L1_error) if (__pyx_t_25) { /* "cassandra/cluster.py":3368 * log.debug("Added pool for host %s to session", host) * if previous: * previous.shutdown() # <<<<<<<<<<<<<< * * return True */ __pyx_t_7 = __pyx_v_previous; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3367 * * log.debug("Added pool for host %s to session", host) * if previous: # <<<<<<<<<<<<<< * previous.shutdown() * */ } /* "cassandra/cluster.py":3370 * previous.shutdown() * * return True # <<<<<<<<<<<<<< * * return self.submit(run_add_or_renew_pool) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "cassandra/cluster.py":3324 * return None * * def run_add_or_renew_pool(): # <<<<<<<<<<<<<< * try: * if self._protocol_version >= 3: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool.run_add_or_renew_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_new_pool); __Pyx_XDECREF(__pyx_v_auth_exc); __Pyx_XDECREF(__pyx_v_conn_exc); __Pyx_XDECREF(__pyx_v_previous); __Pyx_XDECREF(__pyx_v_callback); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3316 * pass * * def add_or_renew_pool(self, host, is_host_addition): # <<<<<<<<<<<<<< * """ * For internal use only. */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_70add_or_renew_pool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_is_host_addition) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *__pyx_cur_scope; PyObject *__pyx_v_run_add_or_renew_pool = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_or_renew_pool", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3316, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); __pyx_cur_scope->__pyx_v_host = __pyx_v_host; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_host); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_host); __pyx_cur_scope->__pyx_v_is_host_addition = __pyx_v_is_host_addition; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_is_host_addition); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_is_host_addition); /* "cassandra/cluster.py":3320 * For internal use only. * """ * distance = self._profile_manager.distance(host) # <<<<<<<<<<<<<< * if distance == HostDistance.IGNORED: * return None */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_cur_scope->__pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_distance = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3321 * """ * distance = self._profile_manager.distance(host) * if distance == HostDistance.IGNORED: # <<<<<<<<<<<<<< * return None * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_distance, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":3322 * distance = self._profile_manager.distance(host) * if distance == HostDistance.IGNORED: * return None # <<<<<<<<<<<<<< * * def run_add_or_renew_pool(): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":3321 * """ * distance = self._profile_manager.distance(host) * if distance == HostDistance.IGNORED: # <<<<<<<<<<<<<< * return None * */ } /* "cassandra/cluster.py":3324 * return None * * def run_add_or_renew_pool(): # <<<<<<<<<<<<<< * try: * if self._protocol_version >= 3: */ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_17add_or_renew_pool_1run_add_or_renew_pool, 0, __pyx_mstate_global->__pyx_n_u_Session_add_or_renew_pool_locals_2, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_run_add_or_renew_pool = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3372 * return True * * return self.submit(run_add_or_renew_pool) # <<<<<<<<<<<<<< * * def remove_pool(self, host): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_run_add_or_renew_pool}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submit, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3316 * pass * * def add_or_renew_pool(self, host, is_host_addition): # <<<<<<<<<<<<<< * """ * For internal use only. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Session.add_or_renew_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_run_add_or_renew_pool); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3374 * return self.submit(run_add_or_renew_pool) * * def remove_pool(self, host): # <<<<<<<<<<<<<< * pool = self._pools.pop(host, None) * if pool: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_73remove_pool(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_73remove_pool = {"remove_pool", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_73remove_pool, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_73remove_pool(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("remove_pool (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3374, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3374, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3374, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "remove_pool", 0) < (0)) __PYX_ERR(0, 3374, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("remove_pool", 1, 2, 2, i); __PYX_ERR(0, 3374, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3374, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3374, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("remove_pool", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3374, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.remove_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_72remove_pool(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_72remove_pool(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_pool = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("remove_pool", 0); /* "cassandra/cluster.py":3375 * * def remove_pool(self, host): * pool = self._pools.pop(host, None) # <<<<<<<<<<<<<< * if pool: * log.debug("Removed connection pool for %r", host) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_host, Py_None}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pop, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_pool = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3376 * def remove_pool(self, host): * pool = self._pools.pop(host, None) * if pool: # <<<<<<<<<<<<<< * log.debug("Removed connection pool for %r", host) * return self.submit(pool.shutdown) */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_pool); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3376, __pyx_L1_error) if (__pyx_t_5) { /* "cassandra/cluster.py":3377 * pool = self._pools.pop(host, None) * if pool: * log.debug("Removed connection pool for %r", host) # <<<<<<<<<<<<<< * return self.submit(pool.shutdown) * else: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Removed_connection_pool_for_r, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3378 * if pool: * log.debug("Removed connection pool for %r", host) * return self.submit(pool.shutdown) # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_shutdown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submit, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3376 * def remove_pool(self, host): * pool = self._pools.pop(host, None) * if pool: # <<<<<<<<<<<<<< * log.debug("Removed connection pool for %r", host) * return self.submit(pool.shutdown) */ } /* "cassandra/cluster.py":3380 * return self.submit(pool.shutdown) * else: * return None # <<<<<<<<<<<<<< * * def update_created_pools(self): */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "cassandra/cluster.py":3374 * return self.submit(run_add_or_renew_pool) * * def remove_pool(self, host): # <<<<<<<<<<<<<< * pool = self._pools.pop(host, None) * if pool: */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.Session.remove_pool", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pool); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3382 * return None * * def update_created_pools(self): # <<<<<<<<<<<<<< * """ * When the set of live nodes change, the loadbalancer will change its */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_75update_created_pools(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_74update_created_pools, "\n When the set of live nodes change, the loadbalancer will change its\n mind on host distances. It might change it on the node that came/left\n but also on other nodes (for instance, if a node dies, another\n previously ignored node may be now considered).\n\n This method ensures that all hosts for which a pool should exist\n have one, and hosts that shouldn't don't.\n\n For internal use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_75update_created_pools = {"update_created_pools", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_75update_created_pools, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_74update_created_pools}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_75update_created_pools(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("update_created_pools (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3382, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3382, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "update_created_pools", 0) < (0)) __PYX_ERR(0, 3382, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("update_created_pools", 1, 1, 1, i); __PYX_ERR(0, 3382, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3382, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("update_created_pools", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3382, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.update_created_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_74update_created_pools(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_74update_created_pools(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_futures = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_distance = NULL; PyObject *__pyx_v_pool = NULL; PyObject *__pyx_v_future = 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; size_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; int __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("update_created_pools", 0); /* "cassandra/cluster.py":3394 * For internal use only. * """ * futures = set() # <<<<<<<<<<<<<< * for host in self.cluster.metadata.all_hosts(): * distance = self._profile_manager.distance(host) */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_futures = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3395 * """ * futures = set() * for host in self.cluster.metadata.all_hosts(): # <<<<<<<<<<<<<< * distance = self._profile_manager.distance(host) * pool = self._pools.get(host) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } 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(0, 3395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3395, __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))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3395, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_4, __pyx_t_6, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_6; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3395, __pyx_L1_error) #endif if (__pyx_t_6 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); #endif ++__pyx_t_6; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3395, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3395, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3396 * futures = set() * for host in self.cluster.metadata.all_hosts(): * distance = self._profile_manager.distance(host) # <<<<<<<<<<<<<< * pool = self._pools.get(host) * future = None */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_profile_manager_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_distance, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_distance, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3397 * for host in self.cluster.metadata.all_hosts(): * distance = self._profile_manager.distance(host) * pool = self._pools.get(host) # <<<<<<<<<<<<<< * future = None * if not pool or pool.is_shutdown: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_pool, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3398 * distance = self._profile_manager.distance(host) * pool = self._pools.get(host) * future = None # <<<<<<<<<<<<<< * if not pool or pool.is_shutdown: * # we don't eagerly set is_up on previously ignored hosts. None is included here */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_future, Py_None); /* "cassandra/cluster.py":3399 * pool = self._pools.get(host) * future = None * if not pool or pool.is_shutdown: # <<<<<<<<<<<<<< * # we don't eagerly set is_up on previously ignored hosts. None is included here * # to allow us to attempt connections to hosts that have gone from ignored to something */ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_pool); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3399, __pyx_L1_error) __pyx_t_10 = (!__pyx_t_9); if (!__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_10; __pyx_L6_bool_binop_done:; if (__pyx_t_8) { /* "cassandra/cluster.py":3403 * # to allow us to attempt connections to hosts that have gone from ignored to something * # else. * if distance != HostDistance.IGNORED and host.is_up in (True, None): # <<<<<<<<<<<<<< * future = self.add_or_renew_pool(host, False) * elif distance != pool.host_distance: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_distance, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L9_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, Py_True, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3403, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_9) { } else { __pyx_t_10 = __pyx_t_9; goto __pyx_L11_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3403, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 3403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __pyx_t_9; __pyx_L11_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_t_10; __pyx_t_8 = __pyx_t_9; __pyx_L9_bool_binop_done:; if (__pyx_t_8) { /* "cassandra/cluster.py":3404 * # else. * if distance != HostDistance.IGNORED and host.is_up in (True, None): * future = self.add_or_renew_pool(host, False) # <<<<<<<<<<<<<< * elif distance != pool.host_distance: * # the distance has changed */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_host, Py_False}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_or_renew_pool, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_future, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3403 * # to allow us to attempt connections to hosts that have gone from ignored to something * # else. * if distance != HostDistance.IGNORED and host.is_up in (True, None): # <<<<<<<<<<<<<< * future = self.add_or_renew_pool(host, False) * elif distance != pool.host_distance: */ } /* "cassandra/cluster.py":3399 * pool = self._pools.get(host) * future = None * if not pool or pool.is_shutdown: # <<<<<<<<<<<<<< * # we don't eagerly set is_up on previously ignored hosts. None is included here * # to allow us to attempt connections to hosts that have gone from ignored to something */ goto __pyx_L5; } /* "cassandra/cluster.py":3405 * if distance != HostDistance.IGNORED and host.is_up in (True, None): * future = self.add_or_renew_pool(host, False) * elif distance != pool.host_distance: # <<<<<<<<<<<<<< * # the distance has changed * if distance == HostDistance.IGNORED: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_host_distance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_v_distance, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3405, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":3407 * elif distance != pool.host_distance: * # the distance has changed * if distance == HostDistance.IGNORED: # <<<<<<<<<<<<<< * future = self.remove_pool(host) * else: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_HostDistance); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_IGNORED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_v_distance, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":3408 * # the distance has changed * if distance == HostDistance.IGNORED: * future = self.remove_pool(host) # <<<<<<<<<<<<<< * else: * pool.host_distance = distance */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_pool, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_future, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3407 * elif distance != pool.host_distance: * # the distance has changed * if distance == HostDistance.IGNORED: # <<<<<<<<<<<<<< * future = self.remove_pool(host) * else: */ goto __pyx_L13; } /* "cassandra/cluster.py":3410 * future = self.remove_pool(host) * else: * pool.host_distance = distance # <<<<<<<<<<<<<< * if future: * futures.add(future) */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_host_distance, __pyx_v_distance) < (0)) __PYX_ERR(0, 3410, __pyx_L1_error) } __pyx_L13:; /* "cassandra/cluster.py":3405 * if distance != HostDistance.IGNORED and host.is_up in (True, None): * future = self.add_or_renew_pool(host, False) * elif distance != pool.host_distance: # <<<<<<<<<<<<<< * # the distance has changed * if distance == HostDistance.IGNORED: */ } __pyx_L5:; /* "cassandra/cluster.py":3411 * else: * pool.host_distance = distance * if future: # <<<<<<<<<<<<<< * futures.add(future) * return futures */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_future); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 3411, __pyx_L1_error) if (__pyx_t_8) { /* "cassandra/cluster.py":3412 * pool.host_distance = distance * if future: * futures.add(future) # <<<<<<<<<<<<<< * return futures * */ __pyx_t_11 = PySet_Add(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 3412, __pyx_L1_error) /* "cassandra/cluster.py":3411 * else: * pool.host_distance = distance * if future: # <<<<<<<<<<<<<< * futures.add(future) * return futures */ } /* "cassandra/cluster.py":3395 * """ * futures = set() * for host in self.cluster.metadata.all_hosts(): # <<<<<<<<<<<<<< * distance = self._profile_manager.distance(host) * pool = self._pools.get(host) */ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3413 * if future: * futures.add(future) * return futures # <<<<<<<<<<<<<< * * def on_down(self, host): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_futures); __pyx_r = __pyx_v_futures; goto __pyx_L0; /* "cassandra/cluster.py":3382 * return None * * def update_created_pools(self): # <<<<<<<<<<<<<< * """ * When the set of live nodes change, the loadbalancer will change its */ /* 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("cassandra.cluster.Session.update_created_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_futures); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_distance); __Pyx_XDECREF(__pyx_v_pool); __Pyx_XDECREF(__pyx_v_future); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3415 * return futures * * def on_down(self, host): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when a node is marked down. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_77on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_76on_down, "\n Called by the parent Cluster instance when a node is marked down.\n Only intended for internal use.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_77on_down = {"on_down", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_77on_down, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_76on_down}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_77on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_down (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3415, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3415, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3415, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_down", 0) < (0)) __PYX_ERR(0, 3415, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_down", 1, 2, 2, i); __PYX_ERR(0, 3415, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3415, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3415, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_down", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3415, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_76on_down(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3422 * future = self.remove_pool(host) * if future: * future.add_done_callback(lambda f: self.update_created_pools()) # <<<<<<<<<<<<<< * * def on_remove(self, host): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_7on_down_lambda8(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_7on_down_lambda8 = {"lambda8", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_7on_down_lambda8, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_7on_down_lambda8(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_f = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lambda8 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_f,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3422, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3422, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "lambda8", 0) < (0)) __PYX_ERR(0, 3422, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("lambda8", 1, 1, 1, i); __PYX_ERR(0, 3422, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3422, __pyx_L3_error) } __pyx_v_f = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("lambda8", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3422, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.on_down.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_lambda_funcdef_lambda8(__pyx_self, __pyx_v_f); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_lambda_funcdef_lambda8(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_f) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *__pyx_cur_scope; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda8", 0); __pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3422, __pyx_L1_error) } __pyx_t_2 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_created_pools, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3422, __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_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Session.on_down.lambda8", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3415 * return futures * * def on_down(self, host): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when a node is marked down. */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_76on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *__pyx_cur_scope; PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_down", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_11_on_down(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3415, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); /* "cassandra/cluster.py":3420 * Only intended for internal use. * """ * future = self.remove_pool(host) # <<<<<<<<<<<<<< * if future: * future.add_done_callback(lambda f: self.update_created_pools()) */ __pyx_t_2 = __pyx_cur_scope->__pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_pool, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_future = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3421 * """ * future = self.remove_pool(host) * if future: # <<<<<<<<<<<<<< * future.add_done_callback(lambda f: self.update_created_pools()) * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_future); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3421, __pyx_L1_error) if (__pyx_t_4) { /* "cassandra/cluster.py":3422 * future = self.remove_pool(host) * if future: * future.add_done_callback(lambda f: self.update_created_pools()) # <<<<<<<<<<<<<< * * def on_remove(self, host): */ __pyx_t_2 = __pyx_v_future; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_7on_down_lambda8, 0, __pyx_mstate_global->__pyx_n_u_Session_on_down_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_done_callback, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3421 * """ * future = self.remove_pool(host) * if future: # <<<<<<<<<<<<<< * future.add_done_callback(lambda f: self.update_created_pools()) * */ } /* "cassandra/cluster.py":3415 * return futures * * def on_down(self, host): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when a node is marked down. */ /* 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_AddTraceback("cassandra.cluster.Session.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_future); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3424 * future.add_done_callback(lambda f: self.update_created_pools()) * * def on_remove(self, host): # <<<<<<<<<<<<<< * """ Internal """ * self.on_down(host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_79on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_78on_remove, " Internal "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_79on_remove = {"on_remove", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_79on_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_78on_remove}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_79on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_remove (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3424, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3424, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3424, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_remove", 0) < (0)) __PYX_ERR(0, 3424, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, i); __PYX_ERR(0, 3424, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3424, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3424, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3424, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_78on_remove(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_78on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_remove", 0); /* "cassandra/cluster.py":3426 * def on_remove(self, host): * """ Internal """ * self.on_down(host) # <<<<<<<<<<<<<< * * def set_keyspace(self, keyspace): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3424 * future.add_done_callback(lambda f: self.update_created_pools()) * * def on_remove(self, host): # <<<<<<<<<<<<<< * """ Internal """ * self.on_down(host) */ /* 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_AddTraceback("cassandra.cluster.Session.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3428 * self.on_down(host) * * def set_keyspace(self, keyspace): # <<<<<<<<<<<<<< * """ * Set the default keyspace for all queries made through this Session. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_81set_keyspace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_80set_keyspace, "\n Set the default keyspace for all queries made through this Session.\n This operation blocks until complete.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_81set_keyspace = {"set_keyspace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_81set_keyspace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_80set_keyspace}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_81set_keyspace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_keyspace (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3428, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3428, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3428, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_keyspace", 0) < (0)) __PYX_ERR(0, 3428, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_keyspace", 1, 2, 2, i); __PYX_ERR(0, 3428, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3428, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3428, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_keyspace", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3428, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.set_keyspace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_80set_keyspace(__pyx_self, __pyx_v_self, __pyx_v_keyspace); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_80set_keyspace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace) { 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; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_keyspace", 0); /* "cassandra/cluster.py":3433 * This operation blocks until complete. * """ * self.execute('USE %s' % (protect_name(keyspace),)) # <<<<<<<<<<<<<< * * def _set_keyspace_for_all_pools(self, keyspace, callback): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_protect_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_keyspace}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_3), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_USE, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_execute, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3428 * self.on_down(host) * * def set_keyspace(self, keyspace): # <<<<<<<<<<<<<< * """ * Set the default keyspace for all queries made through this Session. */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.Session.set_keyspace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3435 * self.execute('USE %s' % (protect_name(keyspace),)) * * def _set_keyspace_for_all_pools(self, keyspace, callback): # <<<<<<<<<<<<<< * """ * Asynchronously sets the keyspace on all pools. When all */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_83_set_keyspace_for_all_pools(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_82_set_keyspace_for_all_pools, "\n Asynchronously sets the keyspace on all pools. When all\n pools have set all of their connections, `callback` will be\n called with a dictionary of all errors that occurred, keyed\n by the `Host` that they occurred against.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_83_set_keyspace_for_all_pools = {"_set_keyspace_for_all_pools", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_83_set_keyspace_for_all_pools, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_82_set_keyspace_for_all_pools}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_83_set_keyspace_for_all_pools(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_callback = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_keyspace_for_all_pools (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_callback,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3435, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_keyspace_for_all_pools", 0) < (0)) __PYX_ERR(0, 3435, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_keyspace_for_all_pools", 1, 3, 3, i); __PYX_ERR(0, 3435, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3435, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3435, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3435, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_callback = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_keyspace_for_all_pools", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3435, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._set_keyspace_for_all_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_82_set_keyspace_for_all_pools(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_callback); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3451 * return * * def pool_finished_setting_keyspace(pool, host_errors): # <<<<<<<<<<<<<< * remaining_callbacks.remove(pool) * if host_errors: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_1pool_finished_setting_keyspace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_1pool_finished_setting_keyspace = {"pool_finished_setting_keyspace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_1pool_finished_setting_keyspace, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_1pool_finished_setting_keyspace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_pool = 0; PyObject *__pyx_v_host_errors = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pool_finished_setting_keyspace (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_host_errors,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3451, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3451, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3451, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "pool_finished_setting_keyspace", 0) < (0)) __PYX_ERR(0, 3451, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("pool_finished_setting_keyspace", 1, 2, 2, i); __PYX_ERR(0, 3451, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3451, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3451, __pyx_L3_error) } __pyx_v_pool = values[0]; __pyx_v_host_errors = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("pool_finished_setting_keyspace", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3451, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._set_keyspace_for_all_pools.pool_finished_setting_keyspace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_pool_finished_setting_keyspace(__pyx_self, __pyx_v_pool, __pyx_v_host_errors); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_pool_finished_setting_keyspace(PyObject *__pyx_self, PyObject *__pyx_v_pool, PyObject *__pyx_v_host_errors) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *__pyx_cur_scope; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pool_finished_setting_keyspace", 0); __pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "cassandra/cluster.py":3452 * * def pool_finished_setting_keyspace(pool, host_errors): * remaining_callbacks.remove(pool) # <<<<<<<<<<<<<< * if host_errors: * errors[pool.host] = host_errors */ if (unlikely(!__pyx_cur_scope->__pyx_v_remaining_callbacks)) { __Pyx_RaiseClosureNameError("remaining_callbacks"); __PYX_ERR(0, 3452, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_v_remaining_callbacks == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "remove"); __PYX_ERR(0, 3452, __pyx_L1_error) } __pyx_t_1 = __Pyx_PySet_Remove(__pyx_cur_scope->__pyx_v_remaining_callbacks, __pyx_v_pool); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 3452, __pyx_L1_error) /* "cassandra/cluster.py":3453 * def pool_finished_setting_keyspace(pool, host_errors): * remaining_callbacks.remove(pool) * if host_errors: # <<<<<<<<<<<<<< * errors[pool.host] = host_errors * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_host_errors); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 3453, __pyx_L1_error) if (__pyx_t_2) { /* "cassandra/cluster.py":3454 * remaining_callbacks.remove(pool) * if host_errors: * errors[pool.host] = host_errors # <<<<<<<<<<<<<< * * if not remaining_callbacks: */ if (unlikely(!__pyx_cur_scope->__pyx_v_errors)) { __Pyx_RaiseClosureNameError("errors"); __PYX_ERR(0, 3454, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_v_errors == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 3454, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_host); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyDict_SetItem(__pyx_cur_scope->__pyx_v_errors, __pyx_t_3, __pyx_v_host_errors) < 0))) __PYX_ERR(0, 3454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3453 * def pool_finished_setting_keyspace(pool, host_errors): * remaining_callbacks.remove(pool) * if host_errors: # <<<<<<<<<<<<<< * errors[pool.host] = host_errors * */ } /* "cassandra/cluster.py":3456 * errors[pool.host] = host_errors * * if not remaining_callbacks: # <<<<<<<<<<<<<< * callback(host_errors) * */ if (unlikely(!__pyx_cur_scope->__pyx_v_remaining_callbacks)) { __Pyx_RaiseClosureNameError("remaining_callbacks"); __PYX_ERR(0, 3456, __pyx_L1_error) } if (__pyx_cur_scope->__pyx_v_remaining_callbacks == Py_None) __pyx_t_2 = 0; else { Py_ssize_t __pyx_temp = __Pyx_PySet_GET_SIZE(__pyx_cur_scope->__pyx_v_remaining_callbacks); if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 3456, __pyx_L1_error) __pyx_t_2 = (__pyx_temp != 0); } __pyx_t_4 = (!__pyx_t_2); if (__pyx_t_4) { /* "cassandra/cluster.py":3457 * * if not remaining_callbacks: * callback(host_errors) # <<<<<<<<<<<<<< * * for pool in tuple(self._pools.values()): */ __pyx_t_5 = NULL; if (unlikely(!__pyx_cur_scope->__pyx_v_callback)) { __Pyx_RaiseClosureNameError("callback"); __PYX_ERR(0, 3457, __pyx_L1_error) } __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callback); __pyx_t_6 = __pyx_cur_scope->__pyx_v_callback; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host_errors}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3456 * errors[pool.host] = host_errors * * if not remaining_callbacks: # <<<<<<<<<<<<<< * callback(host_errors) * */ } /* "cassandra/cluster.py":3451 * return * * def pool_finished_setting_keyspace(pool, host_errors): # <<<<<<<<<<<<<< * remaining_callbacks.remove(pool) * if host_errors: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.Session._set_keyspace_for_all_pools.pool_finished_setting_keyspace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3435 * self.execute('USE %s' % (protect_name(keyspace),)) * * def _set_keyspace_for_all_pools(self, keyspace, callback): # <<<<<<<<<<<<<< * """ * Asynchronously sets the keyspace on all pools. When all */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_82_set_keyspace_for_all_pools(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_callback) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *__pyx_cur_scope; PyObject *__pyx_v_pool_finished_setting_keyspace = 0; PyObject *__pyx_v_pool = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; 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; Py_ssize_t __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_keyspace_for_all_pools", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3435, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_callback = __pyx_v_callback; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callback); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_callback); /* "cassandra/cluster.py":3442 * by the `Host` that they occurred against. * """ * with self._lock: # <<<<<<<<<<<<<< * self.keyspace = keyspace * remaining_callbacks = set(self._pools.values()) */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3442, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3442, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":3443 * """ * with self._lock: * self.keyspace = keyspace # <<<<<<<<<<<<<< * remaining_callbacks = set(self._pools.values()) * errors = {} */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_keyspace) < (0)) __PYX_ERR(0, 3443, __pyx_L7_error) /* "cassandra/cluster.py":3444 * with self._lock: * self.keyspace = keyspace * remaining_callbacks = set(self._pools.values()) # <<<<<<<<<<<<<< * errors = {} * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3444, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3444, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3444, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_remaining_callbacks = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3442 * by the `Host` that they occurred against. * """ * with self._lock: # <<<<<<<<<<<<<< * self.keyspace = keyspace * remaining_callbacks = set(self._pools.values()) */ } __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_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("cassandra.cluster.Session._set_keyspace_for_all_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 3442, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3442, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3442, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 3442, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_1, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 3442, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_7); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9); goto __pyx_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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:; } /* "cassandra/cluster.py":3445 * self.keyspace = keyspace * remaining_callbacks = set(self._pools.values()) * errors = {} # <<<<<<<<<<<<<< * * if not remaining_callbacks: */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_errors = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3447 * errors = {} * * if not remaining_callbacks: # <<<<<<<<<<<<<< * callback(errors) * return */ if (unlikely(!__pyx_cur_scope->__pyx_v_remaining_callbacks)) { __Pyx_RaiseUnboundLocalError("remaining_callbacks"); __PYX_ERR(0, 3447, __pyx_L1_error) } { Py_ssize_t __pyx_temp = __Pyx_PySet_GET_SIZE(__pyx_cur_scope->__pyx_v_remaining_callbacks); if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 3447, __pyx_L1_error) __pyx_t_12 = (__pyx_temp != 0); } __pyx_t_11 = (!__pyx_t_12); if (__pyx_t_11) { /* "cassandra/cluster.py":3448 * * if not remaining_callbacks: * callback(errors) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_callback); __pyx_t_5 = __pyx_cur_scope->__pyx_v_callback; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_errors}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3449 * if not remaining_callbacks: * callback(errors) * return # <<<<<<<<<<<<<< * * def pool_finished_setting_keyspace(pool, host_errors): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":3447 * errors = {} * * if not remaining_callbacks: # <<<<<<<<<<<<<< * callback(errors) * return */ } /* "cassandra/cluster.py":3451 * return * * def pool_finished_setting_keyspace(pool, host_errors): # <<<<<<<<<<<<<< * remaining_callbacks.remove(pool) * if host_errors: */ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_27_set_keyspace_for_all_pools_1pool_finished_setting_keyspace, 0, __pyx_mstate_global->__pyx_n_u_Session__set_keyspace_for_all_po, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_pool_finished_setting_keyspace = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":3459 * callback(host_errors) * * for pool in tuple(self._pools.values()): # <<<<<<<<<<<<<< * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3459, __pyx_L1_error) #endif if (__pyx_t_13 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_13); #endif ++__pyx_t_13; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_pool, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3460 * * for pool in tuple(self._pools.values()): * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) # <<<<<<<<<<<<<< * * def user_type_registered(self, keyspace, user_type, klass): */ __pyx_t_5 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_keyspace, __pyx_v_pool_finished_setting_keyspace}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_keyspace_for_all_conns, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3459 * callback(host_errors) * * for pool in tuple(self._pools.values()): # <<<<<<<<<<<<<< * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3435 * self.execute('USE %s' % (protect_name(keyspace),)) * * def _set_keyspace_for_all_pools(self, keyspace, callback): # <<<<<<<<<<<<<< * """ * Asynchronously sets the keyspace on all pools. When all */ /* 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("cassandra.cluster.Session._set_keyspace_for_all_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pool_finished_setting_keyspace); __Pyx_XDECREF(__pyx_v_pool); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3462 * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * * def user_type_registered(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when the user registers a new */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_85user_type_registered(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_84user_type_registered, "\n Called by the parent Cluster instance when the user registers a new\n mapping from a user-defined type to a class. Intended for internal\n use only.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_85user_type_registered = {"user_type_registered", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_85user_type_registered, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_84user_type_registered}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_85user_type_registered(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_keyspace = 0; PyObject *__pyx_v_user_type = 0; PyObject *__pyx_v_klass = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("user_type_registered (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_keyspace,&__pyx_mstate_global->__pyx_n_u_user_type,&__pyx_mstate_global->__pyx_n_u_klass,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3462, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3462, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3462, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3462, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3462, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "user_type_registered", 0) < (0)) __PYX_ERR(0, 3462, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("user_type_registered", 1, 4, 4, i); __PYX_ERR(0, 3462, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3462, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3462, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3462, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3462, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_keyspace = values[1]; __pyx_v_user_type = values[2]; __pyx_v_klass = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("user_type_registered", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 3462, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_84user_type_registered(__pyx_self, __pyx_v_self, __pyx_v_keyspace, __pyx_v_user_type, __pyx_v_klass); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3482 * field_names = type_meta.field_names * * def encode(val): # <<<<<<<<<<<<<< * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_20user_type_registered_1encode(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_20user_type_registered_1encode = {"encode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_20user_type_registered_1encode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_20user_type_registered_1encode(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_val = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_val,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3482, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3482, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encode", 0) < (0)) __PYX_ERR(0, 3482, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, i); __PYX_ERR(0, 3482, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3482, __pyx_L3_error) } __pyx_v_val = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("encode", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3482, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_20user_type_registered_encode(__pyx_self, __pyx_v_val); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_20user_type_registered_6encode_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":3483 * * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( # <<<<<<<<<<<<<< * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_20user_type_registered_6encode_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_15_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3483, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_7Session_20user_type_registered_6encode_2generator6, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Session_user_type_registered_loc, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered.encode.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_20user_type_registered_6encode_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8[3]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3483, __pyx_L1_error) __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); /* "cassandra/cluster.py":3486 * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) * ) for field_name in field_names) # <<<<<<<<<<<<<< * * self.encoder.mapping[klass] = encode */ if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 3486, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3486, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3486, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3486, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3486, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_field_name); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_field_name, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3484 * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, # <<<<<<<<<<<<<< * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) * ) for field_name in field_names) */ __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_cur_scope->__pyx_v_field_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":3485 * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) # <<<<<<<<<<<<<< * ) for field_name in field_names) * */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 3485, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cql_encode_all_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_val)) { __Pyx_RaiseClosureNameError("val"); __PYX_ERR(0, 3485, __pyx_L1_error) } __pyx_t_5 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_val; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = __Pyx_GetAttr3(__pyx_t_5, __pyx_cur_scope->__pyx_v_field_name, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8[0] = __pyx_t_4; __pyx_t_8[1] = __pyx_mstate_global->__pyx_kp_u__6; __pyx_t_8[2] = __pyx_t_7; /* "cassandra/cluster.py":3483 * * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( # <<<<<<<<<<<<<< * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) */ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3486 * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) * ) for field_name in field_names) # <<<<<<<<<<<<<< * * self.encoder.mapping[klass] = encode */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "cassandra/cluster.py":3483 * * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( # <<<<<<<<<<<<<< * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __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); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3482 * field_names = type_meta.field_names * * def encode(val): # <<<<<<<<<<<<<< * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_20user_type_registered_encode(PyObject *__pyx_self, PyObject *__pyx_v_val) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *__pyx_cur_scope; PyObject *__pyx_gb_9cassandra_7cluster_7Session_20user_type_registered_6encode_2generator6 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("encode", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_14_encode(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3482, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *) __Pyx_CyFunction_GetClosure(__pyx_self); __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_v_val = __pyx_v_val; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_val); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_val); /* "cassandra/cluster.py":3483 * * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( # <<<<<<<<<<<<<< * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) */ __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":3486 * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) * ) for field_name in field_names) # <<<<<<<<<<<<<< * * self.encoder.mapping[klass] = encode */ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_field_names)) { __Pyx_RaiseClosureNameError("field_names"); __PYX_ERR(0, 3486, __pyx_L1_error) } /* "cassandra/cluster.py":3483 * * def encode(val): * return '{ %s }' % ' , '.join('%s : %s' % ( # <<<<<<<<<<<<<< * field_name, * self.encoder.cql_encode_all_types(getattr(val, field_name, None)) */ __pyx_t_1 = __pyx_pf_9cassandra_7cluster_7Session_20user_type_registered_6encode_genexpr(((PyObject*)__pyx_cur_scope), __pyx_cur_scope->__pyx_outer_scope->__pyx_v_field_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_Generator_GetInlinedResult(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u__7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_s_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3483, __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; /* "cassandra/cluster.py":3482 * field_names = type_meta.field_names * * def encode(val): # <<<<<<<<<<<<<< * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_7Session_20user_type_registered_6encode_2generator6); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3462 * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * * def user_type_registered(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when the user registers a new */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_84user_type_registered(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_keyspace, PyObject *__pyx_v_user_type, PyObject *__pyx_v_klass) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *__pyx_cur_scope; PyObject *__pyx_v_ks_meta = NULL; PyObject *__pyx_v_type_meta = NULL; PyObject *__pyx_v_encode = 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; PyObject *__pyx_t_5 = NULL; 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; PyObject *__pyx_t_12[3]; PyObject *__pyx_t_13 = NULL; size_t __pyx_t_14; PyObject *__pyx_t_15[4]; PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("user_type_registered", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3462, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); /* "cassandra/cluster.py":3468 * use only. * """ * try: # <<<<<<<<<<<<<< * ks_meta = self.cluster.metadata.keyspaces[keyspace] * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3469 * """ * try: * ks_meta = self.cluster.metadata.keyspaces[keyspace] # <<<<<<<<<<<<<< * except KeyError: * raise UserTypeDoesNotExist( */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3469, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3469, __pyx_L3_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_mstate_global->__pyx_n_u_keyspaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3469, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_keyspace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3469, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ks_meta = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3468 * use only. * """ * try: # <<<<<<<<<<<<<< * ks_meta = self.cluster.metadata.keyspaces[keyspace] * except KeyError: */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3470 * try: * ks_meta = self.cluster.metadata.keyspaces[keyspace] * except KeyError: # <<<<<<<<<<<<<< * raise UserTypeDoesNotExist( * 'Keyspace %s does not exist or has not been discovered by the driver' % (keyspace,)) */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError)))); if (__pyx_t_6) { __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 3470, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); /* "cassandra/cluster.py":3471 * ks_meta = self.cluster.metadata.keyspaces[keyspace] * except KeyError: * raise UserTypeDoesNotExist( # <<<<<<<<<<<<<< * 'Keyspace %s does not exist or has not been discovered by the driver' % (keyspace,)) * */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_UserTypeDoesNotExist); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3471, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); /* "cassandra/cluster.py":3472 * except KeyError: * raise UserTypeDoesNotExist( * 'Keyspace %s does not exist or has not been discovered by the driver' % (keyspace,)) # <<<<<<<<<<<<<< * * try: */ __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_keyspace), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3472, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12[0] = __pyx_mstate_global->__pyx_kp_u_Keyspace; __pyx_t_12[1] = __pyx_t_11; __pyx_t_12[2] = __pyx_mstate_global->__pyx_kp_u_does_not_exist_or_has_not_been; __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, 9 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11) + 56, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3472, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_13}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3471, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 3471, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3468 * use only. * """ * try: # <<<<<<<<<<<<<< * ks_meta = self.cluster.metadata.keyspaces[keyspace] * except KeyError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "cassandra/cluster.py":3474 * 'Keyspace %s does not exist or has not been discovered by the driver' % (keyspace,)) * * try: # <<<<<<<<<<<<<< * type_meta = ks_meta.user_types[user_type] * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "cassandra/cluster.py":3475 * * try: * type_meta = ks_meta.user_types[user_type] # <<<<<<<<<<<<<< * except KeyError: * raise UserTypeDoesNotExist( */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ks_meta, __pyx_mstate_global->__pyx_n_u_user_types_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3475, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_user_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3475, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_type_meta = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":3474 * 'Keyspace %s does not exist or has not been discovered by the driver' % (keyspace,)) * * try: # <<<<<<<<<<<<<< * type_meta = ks_meta.user_types[user_type] * except KeyError: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L16_try_end; __pyx_L11_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __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; /* "cassandra/cluster.py":3476 * try: * type_meta = ks_meta.user_types[user_type] * except KeyError: # <<<<<<<<<<<<<< * raise UserTypeDoesNotExist( * 'User type %s does not exist in keyspace %s' % (user_type, keyspace)) */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError)))); if (__pyx_t_6) { __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 3476, __pyx_L13_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); /* "cassandra/cluster.py":3477 * type_meta = ks_meta.user_types[user_type] * except KeyError: * raise UserTypeDoesNotExist( # <<<<<<<<<<<<<< * 'User type %s does not exist in keyspace %s' % (user_type, keyspace)) * */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_UserTypeDoesNotExist); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3477, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_13); /* "cassandra/cluster.py":3478 * except KeyError: * raise UserTypeDoesNotExist( * 'User type %s does not exist in keyspace %s' % (user_type, keyspace)) # <<<<<<<<<<<<<< * * field_names = type_meta.field_names */ __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_user_type), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3478, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_keyspace), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3478, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_User_type; __pyx_t_15[1] = __pyx_t_9; __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u_does_not_exist_in_keyspace; __pyx_t_15[3] = __pyx_t_11; __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 10 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 28 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3478, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_16}; __pyx_t_8 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3477, __pyx_L13_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(0, 3477, __pyx_L13_except_error) } goto __pyx_L13_except_error; /* "cassandra/cluster.py":3474 * 'Keyspace %s does not exist or has not been discovered by the driver' % (keyspace,)) * * try: # <<<<<<<<<<<<<< * type_meta = ks_meta.user_types[user_type] * except KeyError: */ __pyx_L13_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1); goto __pyx_L1_error; __pyx_L16_try_end:; } /* "cassandra/cluster.py":3480 * 'User type %s does not exist in keyspace %s' % (user_type, keyspace)) * * field_names = type_meta.field_names # <<<<<<<<<<<<<< * * def encode(val): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_type_meta, __pyx_mstate_global->__pyx_n_u_field_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_field_names = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3482 * field_names = type_meta.field_names * * def encode(val): # <<<<<<<<<<<<<< * return '{ %s }' % ' , '.join('%s : %s' % ( * field_name, */ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_20user_type_registered_1encode, 0, __pyx_mstate_global->__pyx_n_u_Session_user_type_registered_loc_2, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_encode = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3488 * ) for field_name in field_names) * * self.encoder.mapping[klass] = encode # <<<<<<<<<<<<<< * * def submit(self, fn, *args, **kwargs): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_mstate_global->__pyx_n_u_encoder); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_mapping); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely((PyObject_SetItem(__pyx_t_7, __pyx_v_klass, __pyx_v_encode) < 0))) __PYX_ERR(0, 3488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":3462 * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * * def user_type_registered(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when the user registers a new */ /* 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_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_XDECREF(__pyx_t_16); __Pyx_AddTraceback("cassandra.cluster.Session.user_type_registered", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ks_meta); __Pyx_XDECREF(__pyx_v_type_meta); __Pyx_XDECREF(__pyx_v_encode); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3490 * self.encoder.mapping[klass] = encode * * def submit(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ Internal """ * if not self.is_shutdown: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_87submit(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_7Session_86submit, " Internal "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_87submit = {"submit", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_87submit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_7Session_86submit}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_87submit(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("submit (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3490, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3490, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3490, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "submit", 1) < (0)) __PYX_ERR(0, 3490, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("submit", 0, 2, 2, i); __PYX_ERR(0, 3490, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3490, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3490, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_fn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("submit", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 3490, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.Session.submit", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_86submit(__pyx_self, __pyx_v_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_86submit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { 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; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("submit", 0); /* "cassandra/cluster.py":3492 * def submit(self, fn, *args, **kwargs): * """ Internal """ * if not self.is_shutdown: # <<<<<<<<<<<<<< * return self.cluster.executor.submit(fn, *args, **kwargs) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __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(0, 3492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (!__pyx_t_2); if (__pyx_t_3) { /* "cassandra/cluster.py":3493 * """ Internal """ * if not self.is_shutdown: * return self.cluster.executor.submit(fn, *args, **kwargs) # <<<<<<<<<<<<<< * * def get_pool_state(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_executor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 3493, __pyx_L1_error); __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3492 * def submit(self, fn, *args, **kwargs): * """ Internal """ * if not self.is_shutdown: # <<<<<<<<<<<<<< * return self.cluster.executor.submit(fn, *args, **kwargs) * */ } /* "cassandra/cluster.py":3490 * self.encoder.mapping[klass] = encode * * def submit(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ Internal """ * if not self.is_shutdown: */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.Session.submit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3495 * return self.cluster.executor.submit(fn, *args, **kwargs) * * def get_pool_state(self): # <<<<<<<<<<<<<< * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_89get_pool_state(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_89get_pool_state = {"get_pool_state", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_89get_pool_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_89get_pool_state(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pool_state (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3495, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3495, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_pool_state", 0) < (0)) __PYX_ERR(0, 3495, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_pool_state", 1, 1, 1, i); __PYX_ERR(0, 3495, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3495, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pool_state", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3495, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.get_pool_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_88get_pool_state(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_14get_pool_state_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":3496 * * def get_pool_state(self): * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) # <<<<<<<<<<<<<< * * def get_pools(self): */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_14get_pool_state_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_16_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 3496, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_7Session_14get_pool_state_2generator7, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_Session_get_pool_state_locals_ge, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.Session.get_pool_state.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_7Session_14get_pool_state_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *(*__pyx_t_7)(PyObject *); size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 3496, __pyx_L1_error) __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 3496, __pyx_L1_error) } __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3496, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); #endif ++__pyx_t_3; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error) __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(0, 3496, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_5); } else { __pyx_t_4 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_5); } #else __pyx_t_4 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < (0)) __PYX_ERR(0, 3496, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3496, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_host); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_host, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_pool); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_pool, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __pyx_cur_scope->__pyx_v_pool; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_state, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_host, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3495 * return self.cluster.executor.submit(fn, *args, **kwargs) * * def get_pool_state(self): # <<<<<<<<<<<<<< * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * */ static PyObject *__pyx_pf_9cassandra_7cluster_7Session_88get_pool_state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_gb_9cassandra_7cluster_7Session_14get_pool_state_2generator7 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pool_state", 0); /* "cassandra/cluster.py":3496 * * def get_pool_state(self): * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) # <<<<<<<<<<<<<< * * def get_pools(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_items, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_3 = __pyx_pf_9cassandra_7cluster_7Session_14get_pool_state_genexpr(NULL, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3495 * return self.cluster.executor.submit(fn, *args, **kwargs) * * def get_pool_state(self): # <<<<<<<<<<<<<< * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Session.get_pool_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_7Session_14get_pool_state_2generator7); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3498 * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * * def get_pools(self): # <<<<<<<<<<<<<< * return self._pools.values() * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_91get_pools(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_91get_pools = {"get_pools", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_91get_pools, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_91get_pools(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_pools (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3498, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3498, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_pools", 0) < (0)) __PYX_ERR(0, 3498, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_pools", 1, 1, 1, i); __PYX_ERR(0, 3498, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3498, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_pools", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3498, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session.get_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_90get_pools(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_90get_pools(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_pools", 0); /* "cassandra/cluster.py":3499 * * def get_pools(self): * return self._pools.values() # <<<<<<<<<<<<<< * * def _validate_set_legacy_config(self, attr_name, value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_values, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3498 * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * * def get_pools(self): # <<<<<<<<<<<<<< * return self._pools.values() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.Session.get_pools", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3501 * return self._pools.values() * * def _validate_set_legacy_config(self, attr_name, value): # <<<<<<<<<<<<<< * if self.cluster._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_7Session_93_validate_set_legacy_config(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_7Session_93_validate_set_legacy_config = {"_validate_set_legacy_config", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_7Session_93_validate_set_legacy_config, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_7Session_93_validate_set_legacy_config(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_attr_name = 0; PyObject *__pyx_v_value = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_validate_set_legacy_config (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_attr_name,&__pyx_mstate_global->__pyx_n_u_value,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3501, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3501, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3501, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3501, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_validate_set_legacy_config", 0) < (0)) __PYX_ERR(0, 3501, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_validate_set_legacy_config", 1, 3, 3, i); __PYX_ERR(0, 3501, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3501, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3501, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3501, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_attr_name = values[1]; __pyx_v_value = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_validate_set_legacy_config", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3501, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.Session._validate_set_legacy_config", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_7Session_92_validate_set_legacy_config(__pyx_self, __pyx_v_self, __pyx_v_attr_name, __pyx_v_value); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_7Session_92_validate_set_legacy_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_attr_name, 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; int __pyx_t_4; PyObject *__pyx_t_5[3]; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_validate_set_legacy_config", 0); /* "cassandra/cluster.py":3502 * * def _validate_set_legacy_config(self, attr_name, value): * if self.cluster._config_mode == _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) * setattr(self, '_' + attr_name, value) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PROFILES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 3502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_4)) { /* "cassandra/cluster.py":3503 * def _validate_set_legacy_config(self, attr_name, value): * if self.cluster._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) # <<<<<<<<<<<<<< * setattr(self, '_' + attr_name, value) * self.cluster._config_mode = _ConfigMode.LEGACY */ __pyx_t_3 = NULL; __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_attr_name), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5[0] = __pyx_mstate_global->__pyx_kp_u_Cannot_set_Session; __pyx_t_5[1] = __pyx_t_2; __pyx_t_5[2] = __pyx_mstate_global->__pyx_kp_u_while_using_Configuration_Profi; __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, 19 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 67, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3503, __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(0, 3503, __pyx_L1_error) /* "cassandra/cluster.py":3502 * * def _validate_set_legacy_config(self, attr_name, value): * if self.cluster._config_mode == _ConfigMode.PROFILES: # <<<<<<<<<<<<<< * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) * setattr(self, '_' + attr_name, value) */ } /* "cassandra/cluster.py":3504 * if self.cluster._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) * setattr(self, '_' + attr_name, value) # <<<<<<<<<<<<<< * self.cluster._config_mode = _ConfigMode.LEGACY * */ __pyx_t_1 = PyNumber_Add(__pyx_mstate_global->__pyx_n_u__8, __pyx_v_attr_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_SetAttr(__pyx_v_self, __pyx_t_1, __pyx_v_value); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3505 * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) * setattr(self, '_' + attr_name, value) * self.cluster._config_mode = _ConfigMode.LEGACY # <<<<<<<<<<<<<< * * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_config_mode, __pyx_t_6) < (0)) __PYX_ERR(0, 3505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3501 * return self._pools.values() * * def _validate_set_legacy_config(self, attr_name, value): # <<<<<<<<<<<<<< * if self.cluster._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.Session._validate_set_legacy_config", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3522 * """ * * def __init__(self, control_connection, *args, **kwargs): # <<<<<<<<<<<<<< * _ReconnectionHandler.__init__(self, *args, **kwargs) * self.control_connection = weakref.proxy(control_connection) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_control_connection = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_control_connection,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3522, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3522, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3522, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "__init__", 1) < (0)) __PYX_ERR(0, 3522, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, i); __PYX_ERR(0, 3522, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3522, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3522, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_control_connection = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 3522, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster._ControlReconnectionHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler___init__(__pyx_self, __pyx_v_self, __pyx_v_control_connection, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_control_connection, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":3523 * * def __init__(self, control_connection, *args, **kwargs): * _ReconnectionHandler.__init__(self, *args, **kwargs) # <<<<<<<<<<<<<< * self.control_connection = weakref.proxy(control_connection) * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ReconnectionHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3523, __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(0, 3523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self) != (0)) __PYX_ERR(0, 3523, __pyx_L1_error); __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3523, __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; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3524 * def __init__(self, control_connection, *args, **kwargs): * _ReconnectionHandler.__init__(self, *args, **kwargs) * self.control_connection = weakref.proxy(control_connection) # <<<<<<<<<<<<<< * * def try_reconnect(self): */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_proxy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_control_connection}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection, __pyx_t_4) < (0)) __PYX_ERR(0, 3524, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3522 * """ * * def __init__(self, control_connection, *args, **kwargs): # <<<<<<<<<<<<<< * _ReconnectionHandler.__init__(self, *args, **kwargs) * self.control_connection = weakref.proxy(control_connection) */ /* 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_AddTraceback("cassandra.cluster._ControlReconnectionHandler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3526 * self.control_connection = weakref.proxy(control_connection) * * def try_reconnect(self): # <<<<<<<<<<<<<< * return self.control_connection._reconnect_internal() * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_3try_reconnect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_3try_reconnect = {"try_reconnect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_3try_reconnect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_3try_reconnect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("try_reconnect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3526, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3526, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "try_reconnect", 0) < (0)) __PYX_ERR(0, 3526, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("try_reconnect", 1, 1, 1, i); __PYX_ERR(0, 3526, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3526, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("try_reconnect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3526, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._ControlReconnectionHandler.try_reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_2try_reconnect(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_2try_reconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("try_reconnect", 0); /* "cassandra/cluster.py":3527 * * def try_reconnect(self): * return self.control_connection._reconnect_internal() # <<<<<<<<<<<<<< * * def on_reconnection(self, connection): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_internal, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3526 * self.control_connection = weakref.proxy(control_connection) * * def try_reconnect(self): # <<<<<<<<<<<<<< * return self.control_connection._reconnect_internal() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster._ControlReconnectionHandler.try_reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3529 * return self.control_connection._reconnect_internal() * * def on_reconnection(self, connection): # <<<<<<<<<<<<<< * self.control_connection._set_new_connection(connection) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_5on_reconnection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_5on_reconnection = {"on_reconnection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_5on_reconnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_5on_reconnection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_connection = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_reconnection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_connection_2,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3529, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3529, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3529, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_reconnection", 0) < (0)) __PYX_ERR(0, 3529, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_reconnection", 1, 2, 2, i); __PYX_ERR(0, 3529, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3529, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3529, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_connection = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_reconnection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3529, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._ControlReconnectionHandler.on_reconnection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_4on_reconnection(__pyx_self, __pyx_v_self, __pyx_v_connection); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_4on_reconnection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_reconnection", 0); /* "cassandra/cluster.py":3530 * * def on_reconnection(self, connection): * self.control_connection._set_new_connection(connection) # <<<<<<<<<<<<<< * * def on_exception(self, exc, next_delay): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_connection}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_new_connection, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3529 * return self.control_connection._reconnect_internal() * * def on_reconnection(self, connection): # <<<<<<<<<<<<<< * self.control_connection._set_new_connection(connection) * */ /* 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("cassandra.cluster._ControlReconnectionHandler.on_reconnection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3532 * self.control_connection._set_new_connection(connection) * * def on_exception(self, exc, next_delay): # <<<<<<<<<<<<<< * # TODO only overridden to add logging, so add logging * if isinstance(exc, AuthenticationFailed): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_7on_exception(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_7on_exception = {"on_exception", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_7on_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_27_ControlReconnectionHandler_7on_exception(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_exc = 0; CYTHON_UNUSED PyObject *__pyx_v_next_delay = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_exception (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_exc,&__pyx_mstate_global->__pyx_n_u_next_delay,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3532, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3532, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3532, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3532, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_exception", 0) < (0)) __PYX_ERR(0, 3532, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_exception", 1, 3, 3, i); __PYX_ERR(0, 3532, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3532, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3532, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3532, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_exc = values[1]; __pyx_v_next_delay = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_exception", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 3532, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._ControlReconnectionHandler.on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_6on_exception(__pyx_self, __pyx_v_self, __pyx_v_exc, __pyx_v_next_delay); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_27_ControlReconnectionHandler_6on_exception(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_exc, CYTHON_UNUSED PyObject *__pyx_v_next_delay) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_exception", 0); /* "cassandra/cluster.py":3534 * def on_exception(self, exc, next_delay): * # TODO only overridden to add logging, so add logging * if isinstance(exc, AuthenticationFailed): # <<<<<<<<<<<<<< * return False * else: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_AuthenticationFailed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_exc, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3534, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":3535 * # TODO only overridden to add logging, so add logging * if isinstance(exc, AuthenticationFailed): * return False # <<<<<<<<<<<<<< * else: * log.debug("Error trying to reconnect control connection: %r", exc) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":3534 * def on_exception(self, exc, next_delay): * # TODO only overridden to add logging, so add logging * if isinstance(exc, AuthenticationFailed): # <<<<<<<<<<<<<< * return False * else: */ } /* "cassandra/cluster.py":3537 * return False * else: * log.debug("Error trying to reconnect control connection: %r", exc) # <<<<<<<<<<<<<< * return True * */ /*else*/ { __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Error_trying_to_reconnect_contro, __pyx_v_exc}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3538 * else: * log.debug("Error trying to reconnect control connection: %r", exc) * return True # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; } /* "cassandra/cluster.py":3532 * self.control_connection._set_new_connection(connection) * * def on_exception(self, exc, next_delay): # <<<<<<<<<<<<<< * # TODO only overridden to add logging, so add logging * if isinstance(exc, AuthenticationFailed): */ /* function exit code */ __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("cassandra.cluster._ControlReconnectionHandler.on_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3541 * * * def _watch_callback(obj_weakref, method_name, *args, **kwargs): # <<<<<<<<<<<<<< * """ * A callback handler for the ControlConnection that tolerates */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_31_watch_callback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_30_watch_callback, "\n A callback handler for the ControlConnection that tolerates\n weak references.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_31_watch_callback = {"_watch_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_31_watch_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_30_watch_callback}; static PyObject *__pyx_pw_9cassandra_7cluster_31_watch_callback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_obj_weakref = 0; PyObject *__pyx_v_method_name = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_watch_callback (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj_weakref,&__pyx_mstate_global->__pyx_n_u_method_name,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3541, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3541, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3541, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "_watch_callback", 1) < (0)) __PYX_ERR(0, 3541, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_watch_callback", 0, 2, 2, i); __PYX_ERR(0, 3541, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3541, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3541, __pyx_L3_error) } __pyx_v_obj_weakref = values[0]; __pyx_v_method_name = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_watch_callback", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 3541, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster._watch_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_30_watch_callback(__pyx_self, __pyx_v_obj_weakref, __pyx_v_method_name, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_30_watch_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj_weakref, PyObject *__pyx_v_method_name, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_watch_callback", 0); /* "cassandra/cluster.py":3546 * weak references. * """ * obj = obj_weakref() # <<<<<<<<<<<<<< * if obj is None: * return */ __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_obj_weakref); __pyx_t_3 = __pyx_v_obj_weakref; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_obj = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3547 * """ * obj = obj_weakref() * if obj is None: # <<<<<<<<<<<<<< * return * getattr(obj, method_name)(*args, **kwargs) */ __pyx_t_5 = (__pyx_v_obj == Py_None); if (__pyx_t_5) { /* "cassandra/cluster.py":3548 * obj = obj_weakref() * if obj is None: * return # <<<<<<<<<<<<<< * getattr(obj, method_name)(*args, **kwargs) * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":3547 * """ * obj = obj_weakref() * if obj is None: # <<<<<<<<<<<<<< * return * getattr(obj, method_name)(*args, **kwargs) */ } /* "cassandra/cluster.py":3549 * if obj is None: * return * getattr(obj, method_name)(*args, **kwargs) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __Pyx_GetAttr(__pyx_v_obj, __pyx_v_method_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3549, __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; /* "cassandra/cluster.py":3541 * * * def _watch_callback(obj_weakref, method_name, *args, **kwargs): # <<<<<<<<<<<<<< * """ * A callback handler for the ControlConnection that tolerates */ /* 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("cassandra.cluster._watch_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3552 * * * def _clear_watcher(conn, expiring_weakref): # <<<<<<<<<<<<<< * """ * Called when the ControlConnection object is about to be finalized. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_33_clear_watcher(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_32_clear_watcher, "\n Called when the ControlConnection object is about to be finalized.\n This clears watchers on the underlying Connection object.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_33_clear_watcher = {"_clear_watcher", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_33_clear_watcher, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_32_clear_watcher}; static PyObject *__pyx_pw_9cassandra_7cluster_33_clear_watcher(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_conn = 0; CYTHON_UNUSED PyObject *__pyx_v_expiring_weakref = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_clear_watcher (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_conn,&__pyx_mstate_global->__pyx_n_u_expiring_weakref,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3552, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3552, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3552, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_clear_watcher", 0) < (0)) __PYX_ERR(0, 3552, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_clear_watcher", 1, 2, 2, i); __PYX_ERR(0, 3552, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3552, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3552, __pyx_L3_error) } __pyx_v_conn = values[0]; __pyx_v_expiring_weakref = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_clear_watcher", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3552, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._clear_watcher", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_32_clear_watcher(__pyx_self, __pyx_v_conn, __pyx_v_expiring_weakref); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_32_clear_watcher(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_conn, CYTHON_UNUSED PyObject *__pyx_v_expiring_weakref) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_clear_watcher", 0); /* "cassandra/cluster.py":3557 * This clears watchers on the underlying Connection object. * """ * try: # <<<<<<<<<<<<<< * conn.control_conn_disposed() * except ReferenceError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3558 * """ * try: * conn.control_conn_disposed() # <<<<<<<<<<<<<< * except ReferenceError: * pass */ __pyx_t_5 = __pyx_v_conn; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_control_conn_disposed, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3558, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3557 * This clears watchers on the underlying Connection object. * """ * try: # <<<<<<<<<<<<<< * conn.control_conn_disposed() * except ReferenceError: */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3559 * try: * conn.control_conn_disposed() * except ReferenceError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ReferenceError)))); if (__pyx_t_7) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3557 * This clears watchers on the underlying Connection object. * """ * try: # <<<<<<<<<<<<<< * conn.control_conn_disposed() * except ReferenceError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":3552 * * * def _clear_watcher(conn, expiring_weakref): # <<<<<<<<<<<<<< * """ * Called when the ControlConnection object is about to be finalized. */ /* 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("cassandra.cluster._clear_watcher", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3605 * _time = time * * def __init__(self, cluster, timeout, # <<<<<<<<<<<<<< * schema_event_refresh_window, * topology_event_refresh_window, */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_cluster = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_v_schema_event_refresh_window = 0; PyObject *__pyx_v_topology_event_refresh_window = 0; PyObject *__pyx_v_status_event_refresh_window = 0; PyObject *__pyx_v_schema_meta_enabled = 0; PyObject *__pyx_v_token_meta_enabled = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[8] = {0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_cluster,&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_schema_event_refresh_window,&__pyx_mstate_global->__pyx_n_u_topology_event_refresh_window,&__pyx_mstate_global->__pyx_n_u_status_event_refresh_window,&__pyx_mstate_global->__pyx_n_u_schema_meta_enabled_2,&__pyx_mstate_global->__pyx_n_u_token_meta_enabled_2,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3605, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 3605, __pyx_L3_error) /* "cassandra/cluster.py":3609 * topology_event_refresh_window, * status_event_refresh_window, * schema_meta_enabled=True, # <<<<<<<<<<<<<< * token_meta_enabled=True): * # use a weak reference to allow the Cluster instance to be GC'ed (and */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); /* "cassandra/cluster.py":3610 * status_event_refresh_window, * schema_meta_enabled=True, * token_meta_enabled=True): # <<<<<<<<<<<<<< * # use a weak reference to allow the Cluster instance to be GC'ed (and * # shutdown) since implementing __del__ disables the cycle detector */ if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); for (Py_ssize_t i = __pyx_nargs; i < 6; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 8, i); __PYX_ERR(0, 3605, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 3605, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 3605, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3605, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3605, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3605, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3605, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3605, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); if (!values[7]) values[7] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); } __pyx_v_self = values[0]; __pyx_v_cluster = values[1]; __pyx_v_timeout = values[2]; __pyx_v_schema_event_refresh_window = values[3]; __pyx_v_topology_event_refresh_window = values[4]; __pyx_v_status_event_refresh_window = values[5]; __pyx_v_schema_meta_enabled = values[6]; __pyx_v_token_meta_enabled = values[7]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 6, 8, __pyx_nargs); __PYX_ERR(0, 3605, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection___init__(__pyx_self, __pyx_v_self, __pyx_v_cluster, __pyx_v_timeout, __pyx_v_schema_event_refresh_window, __pyx_v_topology_event_refresh_window, __pyx_v_status_event_refresh_window, __pyx_v_schema_meta_enabled, __pyx_v_token_meta_enabled); /* "cassandra/cluster.py":3605 * _time = time * * def __init__(self, cluster, timeout, # <<<<<<<<<<<<<< * schema_event_refresh_window, * topology_event_refresh_window, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cluster, PyObject *__pyx_v_timeout, PyObject *__pyx_v_schema_event_refresh_window, PyObject *__pyx_v_topology_event_refresh_window, PyObject *__pyx_v_status_event_refresh_window, PyObject *__pyx_v_schema_meta_enabled, PyObject *__pyx_v_token_meta_enabled) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":3613 * # use a weak reference to allow the Cluster instance to be GC'ed (and * # shutdown) since implementing __del__ disables the cycle detector * self._cluster = weakref.proxy(cluster) # <<<<<<<<<<<<<< * self._connection = None * self._timeout = timeout */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_proxy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_cluster}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2, __pyx_t_1) < (0)) __PYX_ERR(0, 3613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3614 * # shutdown) since implementing __del__ disables the cycle detector * self._cluster = weakref.proxy(cluster) * self._connection = None # <<<<<<<<<<<<<< * self._timeout = timeout * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection, Py_None) < (0)) __PYX_ERR(0, 3614, __pyx_L1_error) /* "cassandra/cluster.py":3615 * self._cluster = weakref.proxy(cluster) * self._connection = None * self._timeout = timeout # <<<<<<<<<<<<<< * * self._schema_event_refresh_window = schema_event_refresh_window */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2, __pyx_v_timeout) < (0)) __PYX_ERR(0, 3615, __pyx_L1_error) /* "cassandra/cluster.py":3617 * self._timeout = timeout * * self._schema_event_refresh_window = schema_event_refresh_window # <<<<<<<<<<<<<< * self._topology_event_refresh_window = topology_event_refresh_window * self._status_event_refresh_window = status_event_refresh_window */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window_2, __pyx_v_schema_event_refresh_window) < (0)) __PYX_ERR(0, 3617, __pyx_L1_error) /* "cassandra/cluster.py":3618 * * self._schema_event_refresh_window = schema_event_refresh_window * self._topology_event_refresh_window = topology_event_refresh_window # <<<<<<<<<<<<<< * self._status_event_refresh_window = status_event_refresh_window * self._schema_meta_enabled = schema_meta_enabled */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window_2, __pyx_v_topology_event_refresh_window) < (0)) __PYX_ERR(0, 3618, __pyx_L1_error) /* "cassandra/cluster.py":3619 * self._schema_event_refresh_window = schema_event_refresh_window * self._topology_event_refresh_window = topology_event_refresh_window * self._status_event_refresh_window = status_event_refresh_window # <<<<<<<<<<<<<< * self._schema_meta_enabled = schema_meta_enabled * self._token_meta_enabled = token_meta_enabled */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status_event_refresh_window_2, __pyx_v_status_event_refresh_window) < (0)) __PYX_ERR(0, 3619, __pyx_L1_error) /* "cassandra/cluster.py":3620 * self._topology_event_refresh_window = topology_event_refresh_window * self._status_event_refresh_window = status_event_refresh_window * self._schema_meta_enabled = schema_meta_enabled # <<<<<<<<<<<<<< * self._token_meta_enabled = token_meta_enabled * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_meta_enabled, __pyx_v_schema_meta_enabled) < (0)) __PYX_ERR(0, 3620, __pyx_L1_error) /* "cassandra/cluster.py":3621 * self._status_event_refresh_window = status_event_refresh_window * self._schema_meta_enabled = schema_meta_enabled * self._token_meta_enabled = token_meta_enabled # <<<<<<<<<<<<<< * * self._lock = RLock() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled, __pyx_v_token_meta_enabled) < (0)) __PYX_ERR(0, 3621, __pyx_L1_error) /* "cassandra/cluster.py":3623 * self._token_meta_enabled = token_meta_enabled * * self._lock = RLock() # <<<<<<<<<<<<<< * self._schema_agreement_lock = Lock() * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock, __pyx_t_1) < (0)) __PYX_ERR(0, 3623, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3624 * * self._lock = RLock() * self._schema_agreement_lock = Lock() # <<<<<<<<<<<<<< * * self._reconnection_handler = None */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_agreement_lock, __pyx_t_1) < (0)) __PYX_ERR(0, 3624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3626 * self._schema_agreement_lock = Lock() * * self._reconnection_handler = None # <<<<<<<<<<<<<< * self._reconnection_lock = RLock() * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler, Py_None) < (0)) __PYX_ERR(0, 3626, __pyx_L1_error) /* "cassandra/cluster.py":3627 * * self._reconnection_handler = None * self._reconnection_lock = RLock() # <<<<<<<<<<<<<< * * self._event_schedule_times = {} */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_RLock); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_lock, __pyx_t_1) < (0)) __PYX_ERR(0, 3627, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3629 * self._reconnection_lock = RLock() * * self._event_schedule_times = {} # <<<<<<<<<<<<<< * * def connect(self): */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_schedule_times, __pyx_t_1) < (0)) __PYX_ERR(0, 3629, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3605 * _time = time * * def __init__(self, cluster, timeout, # <<<<<<<<<<<<<< * schema_event_refresh_window, * topology_event_refresh_window, */ /* 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_AddTraceback("cassandra.cluster.ControlConnection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3631 * self._event_schedule_times = {} * * def connect(self): # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_3connect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_3connect = {"connect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_3connect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_3connect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3631, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3631, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "connect", 0) < (0)) __PYX_ERR(0, 3631, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("connect", 1, 1, 1, i); __PYX_ERR(0, 3631, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3631, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("connect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3631, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_2connect(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_2connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 0); /* "cassandra/cluster.py":3632 * * def connect(self): * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3632, __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(0, 3632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":3633 * def connect(self): * if self._is_shutdown: * return # <<<<<<<<<<<<<< * * self._protocol_version = self._cluster.protocol_version */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":3632 * * def connect(self): * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":3635 * return * * self._protocol_version = self._cluster.protocol_version # <<<<<<<<<<<<<< * self._set_new_connection(self._reconnect_internal()) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_version_2, __pyx_t_3) < (0)) __PYX_ERR(0, 3635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3636 * * self._protocol_version = self._cluster.protocol_version * self._set_new_connection(self._reconnect_internal()) # <<<<<<<<<<<<<< * * self._cluster.metadata.dbaas = self._connection._product_type == dscloud.DATASTAX_CLOUD_PRODUCT_TYPE */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_internal, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_4}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_new_connection, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3638 * self._set_new_connection(self._reconnect_internal()) * * self._cluster.metadata.dbaas = self._connection._product_type == dscloud.DATASTAX_CLOUD_PRODUCT_TYPE # <<<<<<<<<<<<<< * * def _set_new_connection(self, conn): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_product_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dscloud); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_DATASTAX_CLOUD_PRODUCT_TYPE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dbaas, __pyx_t_3) < (0)) __PYX_ERR(0, 3638, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3631 * self._event_schedule_times = {} * * def connect(self): # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /* 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("cassandra.cluster.ControlConnection.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3640 * self._cluster.metadata.dbaas = self._connection._product_type == dscloud.DATASTAX_CLOUD_PRODUCT_TYPE * * def _set_new_connection(self, conn): # <<<<<<<<<<<<<< * """ * Replace existing connection (if there is one) and close it. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_5_set_new_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_17ControlConnection_4_set_new_connection, "\n Replace existing connection (if there is one) and close it.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_5_set_new_connection = {"_set_new_connection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_5_set_new_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_17ControlConnection_4_set_new_connection}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_5_set_new_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_conn = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_new_connection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_conn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3640, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3640, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3640, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_new_connection", 0) < (0)) __PYX_ERR(0, 3640, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_new_connection", 1, 2, 2, i); __PYX_ERR(0, 3640, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3640, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3640, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_conn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_new_connection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3640, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._set_new_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_4_set_new_connection(__pyx_self, __pyx_v_self, __pyx_v_conn); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_4_set_new_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_conn) { PyObject *__pyx_v_old = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_new_connection", 0); /* "cassandra/cluster.py":3644 * Replace existing connection (if there is one) and close it. * """ * with self._lock: # <<<<<<<<<<<<<< * old = self._connection * self._connection = conn */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3644, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3644, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":3645 * """ * with self._lock: * old = self._connection # <<<<<<<<<<<<<< * self._connection = conn * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3645, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_old = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3646 * with self._lock: * old = self._connection * self._connection = conn # <<<<<<<<<<<<<< * * if old: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection, __pyx_v_conn) < (0)) __PYX_ERR(0, 3646, __pyx_L7_error) /* "cassandra/cluster.py":3644 * Replace existing connection (if there is one) and close it. * """ * with self._lock: # <<<<<<<<<<<<<< * old = self._connection * self._connection = conn */ } __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_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("cassandra.cluster.ControlConnection._set_new_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 3644, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3644, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3644, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 3644, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 3644, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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:; } /* "cassandra/cluster.py":3648 * self._connection = conn * * if old: # <<<<<<<<<<<<<< * log.debug("[control connection] Closing old connection %r, replacing with %r", old, conn) * old.close() */ if (unlikely(!__pyx_v_old)) { __Pyx_RaiseUnboundLocalError("old"); __PYX_ERR(0, 3648, __pyx_L1_error) } __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_old); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 3648, __pyx_L1_error) if (__pyx_t_12) { /* "cassandra/cluster.py":3649 * * if old: * log.debug("[control connection] Closing old connection %r, replacing with %r", old, conn) # <<<<<<<<<<<<<< * old.close() * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_v_old)) { __Pyx_RaiseUnboundLocalError("old"); __PYX_ERR(0, 3649, __pyx_L1_error) } __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_control_connection_Closing_old, __pyx_v_old, __pyx_v_conn}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3650 * if old: * log.debug("[control connection] Closing old connection %r, replacing with %r", old, conn) * old.close() # <<<<<<<<<<<<<< * * def _reconnect_internal(self): */ if (unlikely(!__pyx_v_old)) { __Pyx_RaiseUnboundLocalError("old"); __PYX_ERR(0, 3650, __pyx_L1_error) } __pyx_t_4 = __pyx_v_old; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3648 * self._connection = conn * * if old: # <<<<<<<<<<<<<< * log.debug("[control connection] Closing old connection %r, replacing with %r", old, conn) * old.close() */ } /* "cassandra/cluster.py":3640 * self._cluster.metadata.dbaas = self._connection._product_type == dscloud.DATASTAX_CLOUD_PRODUCT_TYPE * * def _set_new_connection(self, conn): # <<<<<<<<<<<<<< * """ * Replace existing connection (if there is one) and close it. */ /* 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("cassandra.cluster.ControlConnection._set_new_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_old); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3652 * old.close() * * def _reconnect_internal(self): # <<<<<<<<<<<<<< * """ * Tries to connect to each host in the query plan until one succeeds */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_7_reconnect_internal(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_17ControlConnection_6_reconnect_internal, "\n Tries to connect to each host in the query plan until one succeeds\n or every attempt fails. If successful, a new Connection will be\n returned. Otherwise, :exc:`NoHostAvailable` will be raised\n with an \"errors\" arg that is a dict mapping host addresses\n to the exception that was raised when an attempt was made to open\n a connection to that host.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_7_reconnect_internal = {"_reconnect_internal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_7_reconnect_internal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_17ControlConnection_6_reconnect_internal}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_7_reconnect_internal(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_reconnect_internal (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3652, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3652, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reconnect_internal", 0) < (0)) __PYX_ERR(0, 3652, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reconnect_internal", 1, 1, 1, i); __PYX_ERR(0, 3652, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3652, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_reconnect_internal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3652, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_6_reconnect_internal(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_6_reconnect_internal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_errors = NULL; PyObject *__pyx_v_lbp = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_exc = 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; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_t_17; char const *__pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; char const *__pyx_t_25; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reconnect_internal", 0); /* "cassandra/cluster.py":3661 * a connection to that host. * """ * errors = {} # <<<<<<<<<<<<<< * lbp = ( * self._cluster.load_balancing_policy */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_errors = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3664 * lbp = ( * self._cluster.load_balancing_policy * if self._cluster._config_mode == _ConfigMode.LEGACY else # <<<<<<<<<<<<<< * self._cluster._default_load_balancing_policy * ) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_config_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LEGACY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3664, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3664, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":3663 * errors = {} * lbp = ( * self._cluster.load_balancing_policy # <<<<<<<<<<<<<< * if self._cluster._config_mode == _ConfigMode.LEGACY else * self._cluster._default_load_balancing_policy */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } else { /* "cassandra/cluster.py":3665 * self._cluster.load_balancing_policy * if self._cluster._config_mode == _ConfigMode.LEGACY else * self._cluster._default_load_balancing_policy # <<<<<<<<<<<<<< * ) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_default_load_balancing_policy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; } __pyx_v_lbp = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3668 * ) * * for host in lbp.make_query_plan(): # <<<<<<<<<<<<<< * try: * return self._try_connect(host) */ __pyx_t_2 = __pyx_v_lbp; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_query_plan, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3668, __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_7 = 0; __pyx_t_8 = NULL; } else { __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3668, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_2))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3668, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_7, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_7; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3668, __pyx_L1_error) #endif if (__pyx_t_7 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); #endif ++__pyx_t_7; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3668, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_8(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3668, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3669 * * for host in lbp.make_query_plan(): * try: # <<<<<<<<<<<<<< * return self._try_connect(host) * except ConnectionException as exc: */ { __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:*/ { /* "cassandra/cluster.py":3670 * for host in lbp.make_query_plan(): * try: * return self._try_connect(host) # <<<<<<<<<<<<<< * except ConnectionException as exc: * errors[str(host.endpoint)] = exc */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_try_connect, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3670, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_try_return; /* "cassandra/cluster.py":3669 * * for host in lbp.make_query_plan(): * try: # <<<<<<<<<<<<<< * return self._try_connect(host) * except ConnectionException as exc: */ } __pyx_L5_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; /* "cassandra/cluster.py":3671 * try: * return self._try_connect(host) * except ConnectionException as exc: # <<<<<<<<<<<<<< * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3671, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_4, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; if (__pyx_t_13) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 3671, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":3672 * return self._try_connect(host) * except ConnectionException as exc: * errors[str(host.endpoint)] = exc # <<<<<<<<<<<<<< * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * self._cluster.signal_connection_failure(host, exc, is_host_addition=False) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3672, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = __Pyx_PyObject_Unicode(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3672, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely((PyDict_SetItem(__pyx_v_errors, __pyx_t_14, __pyx_v_exc) < 0))) __PYX_ERR(0, 3672, __pyx_L18_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3673 * except ConnectionException as exc: * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) # <<<<<<<<<<<<<< * self._cluster.signal_connection_failure(host, exc, is_host_addition=False) * except Exception as exc: */ __pyx_t_12 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3673, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3673, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_16))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_16); assert(__pyx_t_12); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_16, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_mstate_global->__pyx_kp_u_control_connection_Error_connec, __pyx_v_host}; __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3673, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_15); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_15, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3673, __pyx_L18_error) __pyx_t_14 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3673, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_14); } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3674 * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * self._cluster.signal_connection_failure(host, exc, is_host_addition=False) # <<<<<<<<<<<<<< * except Exception as exc: * errors[str(host.endpoint)] = exc */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3674, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __pyx_t_15; __Pyx_INCREF(__pyx_t_16); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_16, __pyx_v_host, __pyx_v_exc}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3674, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_False, __pyx_t_12, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3674, __pyx_L18_error) __pyx_t_14 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_connection_failure, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3674, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_14); } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } /* "cassandra/cluster.py":3671 * try: * return self._try_connect(host) * except ConnectionException as exc: # <<<<<<<<<<<<<< * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L19; } __pyx_L18_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __pyx_t_13 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; goto __pyx_L7_except_error; } __pyx_L19:; } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_exception_handled; } /* "cassandra/cluster.py":3675 * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * self._cluster.signal_connection_failure(host, exc, is_host_addition=False) * except Exception as exc: # <<<<<<<<<<<<<< * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) */ __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_17) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 3675, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":3676 * self._cluster.signal_connection_failure(host, exc, is_host_addition=False) * except Exception as exc: * errors[str(host.endpoint)] = exc # <<<<<<<<<<<<<< * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * if self._is_shutdown: */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3676, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyObject_Unicode(__pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3676, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely((PyDict_SetItem(__pyx_v_errors, __pyx_t_15, __pyx_v_exc) < 0))) __PYX_ERR(0, 3676, __pyx_L29_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3677 * except Exception as exc: * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) # <<<<<<<<<<<<<< * if self._is_shutdown: * raise DriverException("[control connection] Reconnection in progress during shutdown") */ __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3677, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3677, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_16))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_16); assert(__pyx_t_14); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_16, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_control_connection_Error_connec, __pyx_v_host}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3677, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_12, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3677, __pyx_L29_error) __pyx_t_15 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3677, __pyx_L29_error) __Pyx_GOTREF(__pyx_t_15); } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } /* "cassandra/cluster.py":3675 * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * self._cluster.signal_connection_failure(host, exc, is_host_addition=False) * except Exception as exc: # <<<<<<<<<<<<<< * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L30; } __pyx_L29_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_17 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_25 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22); __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_25; goto __pyx_L7_except_error; } __pyx_L30:; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; /* "cassandra/cluster.py":3669 * * for host in lbp.make_query_plan(): * try: # <<<<<<<<<<<<<< * return self._try_connect(host) * except ConnectionException as exc: */ __pyx_L7_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_L9_try_return:; __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_L0; __pyx_L6_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); } /* "cassandra/cluster.py":3678 * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * if self._is_shutdown: # <<<<<<<<<<<<<< * raise DriverException("[control connection] Reconnection in progress during shutdown") * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_5)) { /* "cassandra/cluster.py":3679 * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * if self._is_shutdown: * raise DriverException("[control connection] Reconnection in progress during shutdown") # <<<<<<<<<<<<<< * * raise NoHostAvailable("Unable to connect to any servers", errors) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Reconnection}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 3679, __pyx_L1_error) /* "cassandra/cluster.py":3678 * errors[str(host.endpoint)] = exc * log.warning("[control connection] Error connecting to %s:", host, exc_info=True) * if self._is_shutdown: # <<<<<<<<<<<<<< * raise DriverException("[control connection] Reconnection in progress during shutdown") * */ } /* "cassandra/cluster.py":3668 * ) * * for host in lbp.make_query_plan(): # <<<<<<<<<<<<<< * try: * return self._try_connect(host) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3681 * raise DriverException("[control connection] Reconnection in progress during shutdown") * * raise NoHostAvailable("Unable to connect to any servers", errors) # <<<<<<<<<<<<<< * * def _try_connect(self, host): */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NoHostAvailable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Unable_to_connect_to_any_servers, __pyx_v_errors}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 3681, __pyx_L1_error) /* "cassandra/cluster.py":3652 * old.close() * * def _reconnect_internal(self): # <<<<<<<<<<<<<< * """ * Tries to connect to each host in the query plan until one succeeds */ /* 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_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect_internal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_errors); __Pyx_XDECREF(__pyx_v_lbp); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3683 * raise NoHostAvailable("Unable to connect to any servers", errors) * * def _try_connect(self, host): # <<<<<<<<<<<<<< * """ * Creates a new Connection, registers for pushed events, and refreshes */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_9_try_connect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_17ControlConnection_8_try_connect, "\n Creates a new Connection, registers for pushed events, and refreshes\n node/token and schema metadata.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_9_try_connect = {"_try_connect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_9_try_connect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_17ControlConnection_8_try_connect}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_9_try_connect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_try_connect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3683, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3683, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3683, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_try_connect", 0) < (0)) __PYX_ERR(0, 3683, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_try_connect", 1, 2, 2, i); __PYX_ERR(0, 3683, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3683, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3683, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_try_connect", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3683, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._try_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_8_try_connect(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_8_try_connect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_connection = NULL; PyObject *__pyx_v_e = NULL; PyObject *__pyx_v_self_weakref = NULL; PyObject *__pyx_v_sel_peers = NULL; PyObject *__pyx_v_sel_local = NULL; PyObject *__pyx_v_peers_query = NULL; PyObject *__pyx_v_local_query = NULL; PyObject *__pyx_v_peers_success = NULL; PyObject *__pyx_v_peers_result = NULL; PyObject *__pyx_v_local_success = NULL; PyObject *__pyx_v_local_result = NULL; PyObject *__pyx_v_shared_results = 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; size_t __pyx_t_5; 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; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; char const *__pyx_t_16; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; int __pyx_t_23; int __pyx_t_24; PyObject *__pyx_t_25 = NULL; char const *__pyx_t_26; PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *(*__pyx_t_29)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_try_connect", 0); /* "cassandra/cluster.py":3688 * node/token and schema metadata. * """ * log.debug("[control connection] Opening new connection to %s", host) # <<<<<<<<<<<<<< * * while True: */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_control_connection_Opening_new, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3690 * log.debug("[control connection] Opening new connection to %s", host) * * while True: # <<<<<<<<<<<<<< * try: * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) */ while (1) { /* "cassandra/cluster.py":3691 * * while True: * try: # <<<<<<<<<<<<<< * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) * if self._is_shutdown: */ { __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:*/ { /* "cassandra/cluster.py":3692 * while True: * try: * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) # <<<<<<<<<<<<<< * if self._is_shutdown: * connection.close() */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3692, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3692, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_3}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3692, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_control_connection, Py_True, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3692, __pyx_L5_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_connection_factory, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3692, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_connection, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3693 * try: * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) * if self._is_shutdown: # <<<<<<<<<<<<<< * connection.close() * raise DriverException("Reconnecting during shutdown") */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3693, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3693, __pyx_L5_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_10)) { /* "cassandra/cluster.py":3694 * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) * if self._is_shutdown: * connection.close() # <<<<<<<<<<<<<< * raise DriverException("Reconnecting during shutdown") * break */ __pyx_t_2 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3694, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3695 * if self._is_shutdown: * connection.close() * raise DriverException("Reconnecting during shutdown") # <<<<<<<<<<<<<< * break * except ProtocolVersionUnsupported as e: */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3695, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Reconnecting_during_shutdown}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3695, __pyx_L5_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(0, 3695, __pyx_L5_error) /* "cassandra/cluster.py":3693 * try: * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) * if self._is_shutdown: # <<<<<<<<<<<<<< * connection.close() * raise DriverException("Reconnecting during shutdown") */ } /* "cassandra/cluster.py":3696 * connection.close() * raise DriverException("Reconnecting during shutdown") * break # <<<<<<<<<<<<<< * except ProtocolVersionUnsupported as e: * self._cluster.protocol_downgrade(host.endpoint, e.startup_version) */ goto __pyx_L10_try_break; /* "cassandra/cluster.py":3691 * * while True: * try: # <<<<<<<<<<<<<< * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) * if self._is_shutdown: */ } __pyx_L5_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_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3697 * raise DriverException("Reconnecting during shutdown") * break * except ProtocolVersionUnsupported as e: # <<<<<<<<<<<<<< * self._cluster.protocol_downgrade(host.endpoint, e.startup_version) * except ProtocolException as e: */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ProtocolVersionUnsupported); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3697, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_2 = 0; if (__pyx_t_11) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._try_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 3697, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_9); __pyx_v_e = __pyx_t_9; /*try:*/ { /* "cassandra/cluster.py":3698 * break * except ProtocolVersionUnsupported as e: * self._cluster.protocol_downgrade(host.endpoint, e.startup_version) # <<<<<<<<<<<<<< * except ProtocolException as e: * # protocol v5 is out of beta in C* >=4.0-beta5 and is now the default driver */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3698, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3698, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_mstate_global->__pyx_n_u_startup_version); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3698, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_13, __pyx_t_14}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_protocol_downgrade, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3698, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "cassandra/cluster.py":3697 * raise DriverException("Reconnecting during shutdown") * break * except ProtocolVersionUnsupported as e: # <<<<<<<<<<<<<< * self._cluster.protocol_downgrade(host.endpoint, e.startup_version) * except ProtocolException as e: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; goto __pyx_L20; } __pyx_L19_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); if ( unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __pyx_t_11 = __pyx_lineno; __pyx_t_15 = __pyx_clineno; __pyx_t_16 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_15; __pyx_filename = __pyx_t_16; goto __pyx_L7_except_error; } __pyx_L20:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_exception_handled; } /* "cassandra/cluster.py":3699 * except ProtocolVersionUnsupported as e: * self._cluster.protocol_downgrade(host.endpoint, e.startup_version) * except ProtocolException as e: # <<<<<<<<<<<<<< * # protocol v5 is out of beta in C* >=4.0-beta5 and is now the default driver * # protocol version. If the protocol version was not explicitly specified, */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ProtocolException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3699, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_2 = 0; if (__pyx_t_15) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._try_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 3699, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_9); __pyx_v_e = __pyx_t_9; /*try:*/ { /* "cassandra/cluster.py":3703 * # protocol version. If the protocol version was not explicitly specified, * # and that the server raises a beta protocol error, we should downgrade. * if not self._cluster._protocol_version_explicit and e.is_beta_protocol_error: # <<<<<<<<<<<<<< * self._cluster.protocol_downgrade(host.endpoint, self._cluster.protocol_version) * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3703, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_protocol_version_explicit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3703, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_23 < 0))) __PYX_ERR(0, 3703, __pyx_L30_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_24 = (!__pyx_t_23); if (__pyx_t_24) { } else { __pyx_t_10 = __pyx_t_24; goto __pyx_L33_bool_binop_done; } __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_mstate_global->__pyx_n_u_is_beta_protocol_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3703, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 3703, __pyx_L30_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __pyx_t_24; __pyx_L33_bool_binop_done:; if (likely(__pyx_t_10)) { /* "cassandra/cluster.py":3704 * # and that the server raises a beta protocol error, we should downgrade. * if not self._cluster._protocol_version_explicit and e.is_beta_protocol_error: * self._cluster.protocol_downgrade(host.endpoint, self._cluster.protocol_version) # <<<<<<<<<<<<<< * else: * raise */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3704, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_3 = __pyx_t_14; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3704, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3704, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3704, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_13, __pyx_t_25}; __pyx_t_12 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_protocol_downgrade, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3704, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_12); } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3703 * # protocol version. If the protocol version was not explicitly specified, * # and that the server raises a beta protocol error, we should downgrade. * if not self._cluster._protocol_version_explicit and e.is_beta_protocol_error: # <<<<<<<<<<<<<< * self._cluster.protocol_downgrade(host.endpoint, self._cluster.protocol_version) * else: */ goto __pyx_L32; } /* "cassandra/cluster.py":3706 * self._cluster.protocol_downgrade(host.endpoint, self._cluster.protocol_version) * else: * raise # <<<<<<<<<<<<<< * * log.debug("[control connection] Established new connection %r, " */ /*else*/ { __Pyx_GIVEREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_9, __pyx_t_1); __pyx_t_2 = 0; __pyx_t_9 = 0; __pyx_t_1 = 0; __PYX_ERR(0, 3706, __pyx_L30_error) } __pyx_L32:; } /* "cassandra/cluster.py":3699 * except ProtocolVersionUnsupported as e: * self._cluster.protocol_downgrade(host.endpoint, e.startup_version) * except ProtocolException as e: # <<<<<<<<<<<<<< * # protocol v5 is out of beta in C* >=4.0-beta5 and is now the default driver * # protocol version. If the protocol version was not explicitly specified, */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; goto __pyx_L31; } __pyx_L30_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_18, &__pyx_t_17); if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __pyx_t_15 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_26 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_18, __pyx_t_17); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_21, __pyx_t_20); __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_lineno = __pyx_t_15; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_26; goto __pyx_L7_except_error; } __pyx_L31:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; /* "cassandra/cluster.py":3691 * * while True: * try: # <<<<<<<<<<<<<< * connection = self._cluster.connection_factory(host.endpoint, is_control_connection=True) * if self._is_shutdown: */ __pyx_L7_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_L10_try_break:; __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_L4_break; __pyx_L6_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_L4_break:; /* "cassandra/cluster.py":3708 * raise * * log.debug("[control connection] Established new connection %r, " # <<<<<<<<<<<<<< * "registering watchers and refreshing schema and topology", * connection) */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3710 * log.debug("[control connection] Established new connection %r, " * "registering watchers and refreshing schema and topology", * connection) # <<<<<<<<<<<<<< * * # use weak references in both directions */ if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3710, __pyx_L1_error) } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_control_connection_Established, __pyx_v_connection}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3716 * # _watch_callback will get the actual callback from the Connection and relay it to * # this object (after a dereferencing a weakref) * self_weakref = weakref.ref(self, partial(_clear_watcher, weakref.proxy(connection))) # <<<<<<<<<<<<<< * try: * connection.register_watchers({ */ __pyx_t_12 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_clear_watcher); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_weakref); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_27); __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_27, __pyx_mstate_global->__pyx_n_u_proxy); if (unlikely(!__pyx_t_28)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_28); __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3716, __pyx_L1_error) } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_28))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_28); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_28); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_28, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_connection}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_28, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_28); __pyx_t_28 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_25); assert(__pyx_t_14); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_25, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_t_13, __pyx_t_3}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_25, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_12); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_12, __pyx_v_self, __pyx_t_9}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_self_weakref = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3717 * # this object (after a dereferencing a weakref) * self_weakref = weakref.ref(self, partial(_clear_watcher, weakref.proxy(connection))) * try: # <<<<<<<<<<<<<< * connection.register_watchers({ * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":3718 * self_weakref = weakref.ref(self, partial(_clear_watcher, weakref.proxy(connection))) * try: * connection.register_watchers({ # <<<<<<<<<<<<<< * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), * "STATUS_CHANGE": partial(_watch_callback, self_weakref, '_handle_status_change'), */ if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3718, __pyx_L39_error) } __pyx_t_2 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_2); /* "cassandra/cluster.py":3719 * try: * connection.register_watchers({ * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), # <<<<<<<<<<<<<< * "STATUS_CHANGE": partial(_watch_callback, self_weakref, '_handle_status_change'), * "SCHEMA_CHANGE": partial(_watch_callback, self_weakref, '_handle_schema_change') */ __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_25 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_watch_callback); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_25); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_25, __pyx_t_13, __pyx_v_self_weakref, __pyx_mstate_global->__pyx_n_u_handle_topology_change}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); } if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_TOPOLOGY_CHANGE, __pyx_t_12) < (0)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3720 * connection.register_watchers({ * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), * "STATUS_CHANGE": partial(_watch_callback, self_weakref, '_handle_status_change'), # <<<<<<<<<<<<<< * "SCHEMA_CHANGE": partial(_watch_callback, self_weakref, '_handle_schema_change') * }, register_timeout=self._timeout) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3720, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_watch_callback); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3720, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_t_25, __pyx_v_self_weakref, __pyx_mstate_global->__pyx_n_u_handle_status_change}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3720, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); } if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_STATUS_CHANGE, __pyx_t_12) < (0)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3721 * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), * "STATUS_CHANGE": partial(_watch_callback, self_weakref, '_handle_status_change'), * "SCHEMA_CHANGE": partial(_watch_callback, self_weakref, '_handle_schema_change') # <<<<<<<<<<<<<< * }, register_timeout=self._timeout) * */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3721, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_watch_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3721, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_25); assert(__pyx_t_13); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_25, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_t_3, __pyx_v_self_weakref, __pyx_mstate_global->__pyx_n_u_handle_schema_change}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_25, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3721, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); } if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SCHEMA_CHANGE, __pyx_t_12) < (0)) __PYX_ERR(0, 3719, __pyx_L39_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3722 * "STATUS_CHANGE": partial(_watch_callback, self_weakref, '_handle_status_change'), * "SCHEMA_CHANGE": partial(_watch_callback, self_weakref, '_handle_schema_change') * }, register_timeout=self._timeout) # <<<<<<<<<<<<<< * * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3722, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_t_9}; __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3718, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_register_timeout, __pyx_t_12, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3718, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_register_watchers, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3718, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3724 * }, register_timeout=self._timeout) * * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) # <<<<<<<<<<<<<< * sel_local = self._SELECT_LOCAL if self._token_meta_enabled else self._SELECT_LOCAL_NO_TOKENS * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) */ __pyx_t_25 = __pyx_v_self; __Pyx_INCREF(__pyx_t_25); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3724, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_PEERS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3724, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3724, __pyx_L39_error) } __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_25, __pyx_t_9, __pyx_v_connection}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_peers_query, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3724, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_sel_peers = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3725 * * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * sel_local = self._SELECT_LOCAL if self._token_meta_enabled else self._SELECT_LOCAL_NO_TOKENS # <<<<<<<<<<<<<< * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * local_query = QueryMessage(query=sel_local, consistency_level=ConsistencyLevel.ONE) */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3725, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3725, __pyx_L39_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_10) { __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3725, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __pyx_t_9; __pyx_t_9 = 0; } else { __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL_NO_TOKENS); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3725, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = __pyx_t_9; __pyx_t_9 = 0; } __pyx_v_sel_local = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3726 * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * sel_local = self._SELECT_LOCAL if self._token_meta_enabled else self._SELECT_LOCAL_NO_TOKENS * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) # <<<<<<<<<<<<<< * local_query = QueryMessage(query=sel_local, consistency_level=ConsistencyLevel.ONE) * (peers_success, peers_result), (local_success, local_result) = connection.wait_for_responses( */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_25, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3726, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3726, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ONE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3726, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_25))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_25); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_25); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_25, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, NULL}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3726, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_sel_peers, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3726, __pyx_L39_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_2, __pyx_t_12, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3726, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_25, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3726, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_peers_query = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3727 * sel_local = self._SELECT_LOCAL if self._token_meta_enabled else self._SELECT_LOCAL_NO_TOKENS * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * local_query = QueryMessage(query=sel_local, consistency_level=ConsistencyLevel.ONE) # <<<<<<<<<<<<<< * (peers_success, peers_result), (local_success, local_result) = connection.wait_for_responses( * peers_query, local_query, timeout=self._timeout, fail_on_error=False) */ __pyx_t_25 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3727, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3727, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ONE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3727, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_25); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_25); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_25, NULL}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3727, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_sel_local, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3727, __pyx_L39_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_9, __pyx_t_2, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3727, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3727, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_local_query = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3728 * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * local_query = QueryMessage(query=sel_local, consistency_level=ConsistencyLevel.ONE) * (peers_success, peers_result), (local_success, local_result) = connection.wait_for_responses( # <<<<<<<<<<<<<< * peers_query, local_query, timeout=self._timeout, fail_on_error=False) * */ if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3728, __pyx_L39_error) } __pyx_t_12 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_12); /* "cassandra/cluster.py":3729 * local_query = QueryMessage(query=sel_local, consistency_level=ConsistencyLevel.ONE) * (peers_success, peers_result), (local_success, local_result) = connection.wait_for_responses( * peers_query, local_query, timeout=self._timeout, fail_on_error=False) # <<<<<<<<<<<<<< * * if not local_success: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3729, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_12, __pyx_v_peers_query, __pyx_v_local_query}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_2, __pyx_t_9, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3728, __pyx_L39_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fail_on_error, Py_False, __pyx_t_9, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_wait_for_responses, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3728, __pyx_L39_error) __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(0, 3728, __pyx_L39_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_9); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_XGOTREF(__pyx_t_2); } #else __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_29 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_12); index = 0; __pyx_t_9 = __pyx_t_29(__pyx_t_12); if (unlikely(!__pyx_t_9)) goto __pyx_L45_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_2 = __pyx_t_29(__pyx_t_12); if (unlikely(!__pyx_t_2)) goto __pyx_L45_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_12), 2) < (0)) __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_t_29 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L46_unpacking_done; __pyx_L45_unpacking_failed:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_29 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_L46_unpacking_done:; } /* "cassandra/cluster.py":3728 * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * local_query = QueryMessage(query=sel_local, consistency_level=ConsistencyLevel.ONE) * (peers_success, peers_result), (local_success, local_result) = connection.wait_for_responses( # <<<<<<<<<<<<<< * peers_query, local_query, timeout=self._timeout, fail_on_error=False) * */ if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3728, __pyx_L39_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_12); __pyx_t_25 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_25); } else { __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_XGOTREF(__pyx_t_12); __pyx_t_25 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_XGOTREF(__pyx_t_25); } #else __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_25 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_29 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); index = 0; __pyx_t_12 = __pyx_t_29(__pyx_t_3); if (unlikely(!__pyx_t_12)) goto __pyx_L47_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); index = 1; __pyx_t_25 = __pyx_t_29(__pyx_t_3); if (unlikely(!__pyx_t_25)) goto __pyx_L47_unpacking_failed; __Pyx_GOTREF(__pyx_t_25); if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_t_29 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L48_unpacking_done; __pyx_L47_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_29 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_L48_unpacking_done:; } __pyx_v_peers_success = __pyx_t_12; __pyx_t_12 = 0; __pyx_v_peers_result = __pyx_t_25; __pyx_t_25 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3728, __pyx_L39_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_25 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_25); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_12); } else { __pyx_t_25 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_XGOTREF(__pyx_t_25); __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_XGOTREF(__pyx_t_12); } #else __pyx_t_25 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3728, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_29 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); index = 0; __pyx_t_25 = __pyx_t_29(__pyx_t_3); if (unlikely(!__pyx_t_25)) goto __pyx_L49_unpacking_failed; __Pyx_GOTREF(__pyx_t_25); index = 1; __pyx_t_12 = __pyx_t_29(__pyx_t_3); if (unlikely(!__pyx_t_12)) goto __pyx_L49_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_t_29 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L50_unpacking_done; __pyx_L49_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_29 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3728, __pyx_L39_error) __pyx_L50_unpacking_done:; } __pyx_v_local_success = __pyx_t_25; __pyx_t_25 = 0; __pyx_v_local_result = __pyx_t_12; __pyx_t_12 = 0; /* "cassandra/cluster.py":3731 * peers_query, local_query, timeout=self._timeout, fail_on_error=False) * * if not local_success: # <<<<<<<<<<<<<< * raise local_result * */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_local_success); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3731, __pyx_L39_error) __pyx_t_24 = (!__pyx_t_10); if (unlikely(__pyx_t_24)) { /* "cassandra/cluster.py":3732 * * if not local_success: * raise local_result # <<<<<<<<<<<<<< * * if not peers_success: */ __Pyx_Raise(__pyx_v_local_result, 0, 0, 0); __PYX_ERR(0, 3732, __pyx_L39_error) /* "cassandra/cluster.py":3731 * peers_query, local_query, timeout=self._timeout, fail_on_error=False) * * if not local_success: # <<<<<<<<<<<<<< * raise local_result * */ } /* "cassandra/cluster.py":3734 * raise local_result * * if not peers_success: # <<<<<<<<<<<<<< * # error with the peers v2 query, fallback to peers v1 * self._uses_peers_v2 = False */ __pyx_t_24 = __Pyx_PyObject_IsTrue(__pyx_v_peers_success); if (unlikely((__pyx_t_24 < 0))) __PYX_ERR(0, 3734, __pyx_L39_error) __pyx_t_10 = (!__pyx_t_24); if (__pyx_t_10) { /* "cassandra/cluster.py":3736 * if not peers_success: * # error with the peers v2 query, fallback to peers v1 * self._uses_peers_v2 = False # <<<<<<<<<<<<<< * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_uses_peers_v2, Py_False) < (0)) __PYX_ERR(0, 3736, __pyx_L39_error) /* "cassandra/cluster.py":3737 * # error with the peers v2 query, fallback to peers v1 * self._uses_peers_v2 = False * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) # <<<<<<<<<<<<<< * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * peers_result = connection.wait_for_response( */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3737, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PEERS); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3737, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3737, __pyx_L39_error) } __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_12, __pyx_v_connection}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_peers_query, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3737, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_sel_peers, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3738 * self._uses_peers_v2 = False * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) # <<<<<<<<<<<<<< * peers_result = connection.wait_for_response( * peers_query, timeout=self._timeout) */ __pyx_t_12 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3738, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3738, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ONE); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3738, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_12); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_12, NULL}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3738, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_sel_peers, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3738, __pyx_L39_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_25, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3738, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3738, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_peers_query, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3739 * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * peers_result = connection.wait_for_response( # <<<<<<<<<<<<<< * peers_query, timeout=self._timeout) * */ if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3739, __pyx_L39_error) } __pyx_t_2 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_2); /* "cassandra/cluster.py":3740 * peers_query = QueryMessage(query=sel_peers, consistency_level=ConsistencyLevel.ONE) * peers_result = connection.wait_for_response( * peers_query, timeout=self._timeout) # <<<<<<<<<<<<<< * * shared_results = (peers_result, local_result) */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3740, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_peers_query}; __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3739, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_9, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3739, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_wait_for_response, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3739, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_peers_result, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3734 * raise local_result * * if not peers_success: # <<<<<<<<<<<<<< * # error with the peers v2 query, fallback to peers v1 * self._uses_peers_v2 = False */ } /* "cassandra/cluster.py":3742 * peers_query, timeout=self._timeout) * * shared_results = (peers_result, local_result) # <<<<<<<<<<<<<< * self._refresh_node_list_and_token_map(connection, preloaded_results=shared_results) * self._refresh_schema(connection, preloaded_results=shared_results, schema_agreement_wait=-1) */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3742, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_peers_result); __Pyx_GIVEREF(__pyx_v_peers_result); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_peers_result) != (0)) __PYX_ERR(0, 3742, __pyx_L39_error); __Pyx_INCREF(__pyx_v_local_result); __Pyx_GIVEREF(__pyx_v_local_result); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_local_result) != (0)) __PYX_ERR(0, 3742, __pyx_L39_error); __pyx_v_shared_results = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3743 * * shared_results = (peers_result, local_result) * self._refresh_node_list_and_token_map(connection, preloaded_results=shared_results) # <<<<<<<<<<<<<< * self._refresh_schema(connection, preloaded_results=shared_results, schema_agreement_wait=-1) * except Exception: */ __pyx_t_25 = __pyx_v_self; __Pyx_INCREF(__pyx_t_25); if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3743, __pyx_L39_error) } __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_25, __pyx_v_connection}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3743, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_preloaded_results, __pyx_v_shared_results, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3743, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3743, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3744 * shared_results = (peers_result, local_result) * self._refresh_node_list_and_token_map(connection, preloaded_results=shared_results) * self._refresh_schema(connection, preloaded_results=shared_results, schema_agreement_wait=-1) # <<<<<<<<<<<<<< * except Exception: * connection.close() */ __pyx_t_9 = __pyx_v_self; __Pyx_INCREF(__pyx_t_9); if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3744, __pyx_L39_error) } __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, __pyx_v_connection}; __pyx_t_25 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 3744, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_25); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_preloaded_results, __pyx_v_shared_results, __pyx_t_25, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3744, __pyx_L39_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_schema_agreement_wait, __pyx_mstate_global->__pyx_int_neg_1, __pyx_t_25, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3744, __pyx_L39_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_schema_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_25); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3744, __pyx_L39_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3717 * # this object (after a dereferencing a weakref) * self_weakref = weakref.ref(self, partial(_clear_watcher, weakref.proxy(connection))) * try: # <<<<<<<<<<<<<< * connection.register_watchers({ * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), */ } __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L44_try_end; __pyx_L39_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0; __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_28); __pyx_t_28 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3745 * self._refresh_node_list_and_token_map(connection, preloaded_results=shared_results) * self._refresh_schema(connection, preloaded_results=shared_results, schema_agreement_wait=-1) * except Exception: # <<<<<<<<<<<<<< * connection.close() * raise */ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_11) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._try_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_25, &__pyx_t_9) < 0) __PYX_ERR(0, 3745, __pyx_L41_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":3746 * self._refresh_schema(connection, preloaded_results=shared_results, schema_agreement_wait=-1) * except Exception: * connection.close() # <<<<<<<<<<<<<< * raise * */ if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3746, __pyx_L41_except_error) } __pyx_t_12 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_12); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3746, __pyx_L41_except_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3747 * except Exception: * connection.close() * raise # <<<<<<<<<<<<<< * * return connection */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_25, __pyx_t_9); __pyx_t_1 = 0; __pyx_t_25 = 0; __pyx_t_9 = 0; __PYX_ERR(0, 3747, __pyx_L41_except_error) } goto __pyx_L41_except_error; /* "cassandra/cluster.py":3717 * # this object (after a dereferencing a weakref) * self_weakref = weakref.ref(self, partial(_clear_watcher, weakref.proxy(connection))) * try: # <<<<<<<<<<<<<< * connection.register_watchers({ * "TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'), */ __pyx_L41_except_error:; __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6); goto __pyx_L1_error; __pyx_L44_try_end:; } /* "cassandra/cluster.py":3749 * raise * * return connection # <<<<<<<<<<<<<< * * def reconnect(self): */ __Pyx_XDECREF(__pyx_r); if (unlikely(!__pyx_v_connection)) { __Pyx_RaiseUnboundLocalError("connection"); __PYX_ERR(0, 3749, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_connection); __pyx_r = __pyx_v_connection; goto __pyx_L0; /* "cassandra/cluster.py":3683 * raise NoHostAvailable("Unable to connect to any servers", errors) * * def _try_connect(self, host): # <<<<<<<<<<<<<< * """ * Creates a new Connection, registers for pushed events, and refreshes */ /* 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_9); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_25); __Pyx_XDECREF(__pyx_t_27); __Pyx_XDECREF(__pyx_t_28); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._try_connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_connection); __Pyx_XDECREF(__pyx_v_e); __Pyx_XDECREF(__pyx_v_self_weakref); __Pyx_XDECREF(__pyx_v_sel_peers); __Pyx_XDECREF(__pyx_v_sel_local); __Pyx_XDECREF(__pyx_v_peers_query); __Pyx_XDECREF(__pyx_v_local_query); __Pyx_XDECREF(__pyx_v_peers_success); __Pyx_XDECREF(__pyx_v_peers_result); __Pyx_XDECREF(__pyx_v_local_success); __Pyx_XDECREF(__pyx_v_local_result); __Pyx_XDECREF(__pyx_v_shared_results); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3751 * return connection * * def reconnect(self): # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_11reconnect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_11reconnect = {"reconnect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_11reconnect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_11reconnect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reconnect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3751, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3751, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "reconnect", 0) < (0)) __PYX_ERR(0, 3751, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("reconnect", 1, 1, 1, i); __PYX_ERR(0, 3751, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3751, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("reconnect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3751, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_10reconnect(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_10reconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reconnect", 0); /* "cassandra/cluster.py":3752 * * def reconnect(self): * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3752, __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(0, 3752, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":3753 * def reconnect(self): * if self._is_shutdown: * return # <<<<<<<<<<<<<< * * self._submit(self._reconnect) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":3752 * * def reconnect(self): * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":3755 * return * * self._submit(self._reconnect) # <<<<<<<<<<<<<< * * def _reconnect(self): */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submit_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 3755, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3751 * return connection * * def reconnect(self): # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /* 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_AddTraceback("cassandra.cluster.ControlConnection.reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3757 * self._submit(self._reconnect) * * def _reconnect(self): # <<<<<<<<<<<<<< * log.debug("[control connection] Attempting to reconnect") * try: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_13_reconnect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_13_reconnect = {"_reconnect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_13_reconnect, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_13_reconnect(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_reconnect (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3757, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3757, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reconnect", 0) < (0)) __PYX_ERR(0, 3757, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reconnect", 1, 1, 1, i); __PYX_ERR(0, 3757, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3757, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_reconnect", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3757, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_12_reconnect(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_12_reconnect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_schedule = 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; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; 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; PyObject *__pyx_t_16 = NULL; int __pyx_t_17; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_t_21; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reconnect", 0); /* "cassandra/cluster.py":3758 * * def _reconnect(self): * log.debug("[control connection] Attempting to reconnect") # <<<<<<<<<<<<<< * try: * self._set_new_connection(self._reconnect_internal()) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_control_connection_Attempting_t}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3759 * def _reconnect(self): * log.debug("[control connection] Attempting to reconnect") * try: # <<<<<<<<<<<<<< * self._set_new_connection(self._reconnect_internal()) * except NoHostAvailable: */ { __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:*/ { /* "cassandra/cluster.py":3760 * log.debug("[control connection] Attempting to reconnect") * try: * self._set_new_connection(self._reconnect_internal()) # <<<<<<<<<<<<<< * except NoHostAvailable: * # make a retry schedule (which includes backoff) */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_internal, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3760, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_new_connection, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3760, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3759 * def _reconnect(self): * log.debug("[control connection] Attempting to reconnect") * try: # <<<<<<<<<<<<<< * self._set_new_connection(self._reconnect_internal()) * except NoHostAvailable: */ } __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_L8_try_end; __pyx_L3_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; /* "cassandra/cluster.py":3761 * try: * self._set_new_connection(self._reconnect_internal()) * except NoHostAvailable: # <<<<<<<<<<<<<< * # make a retry schedule (which includes backoff) * schedule = self._cluster.reconnection_policy.new_schedule() */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NoHostAvailable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3761, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ErrRestore(__pyx_t_1, __pyx_t_2, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; if (__pyx_t_9) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 3761, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); /* "cassandra/cluster.py":3763 * except NoHostAvailable: * # make a retry schedule (which includes backoff) * schedule = self._cluster.reconnection_policy.new_schedule() # <<<<<<<<<<<<<< * * with self._reconnection_lock: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3763, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_reconnection_policy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3763, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_10 = __pyx_t_12; __Pyx_INCREF(__pyx_t_10); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new_schedule, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3763, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_schedule = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":3765 * schedule = self._cluster.reconnection_policy.new_schedule() * * with self._reconnection_lock: # <<<<<<<<<<<<<< * * # cancel existing reconnection attempts */ /*with:*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3765, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3765, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = NULL; __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3765, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3765, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_12); } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_15); __Pyx_XGOTREF(__pyx_t_16); /*try:*/ { /* "cassandra/cluster.py":3768 * * # cancel existing reconnection attempts * if self._reconnection_handler: # <<<<<<<<<<<<<< * self._reconnection_handler.cancel() * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3768, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 3768, __pyx_L17_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_17) { /* "cassandra/cluster.py":3769 * # cancel existing reconnection attempts * if self._reconnection_handler: * self._reconnection_handler.cancel() # <<<<<<<<<<<<<< * * # when a connection is successfully made, _set_new_connection */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3769, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __pyx_t_11; __Pyx_INCREF(__pyx_t_12); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3769, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3768 * * # cancel existing reconnection attempts * if self._reconnection_handler: # <<<<<<<<<<<<<< * self._reconnection_handler.cancel() * */ } /* "cassandra/cluster.py":3774 * # will be called with the new connection and then our * # _reconnection_handler will be cleared out * self._reconnection_handler = _ControlReconnectionHandler( # <<<<<<<<<<<<<< * self, self._cluster.scheduler, schedule, * self._get_and_set_reconnection_handler, */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3774, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_12); /* "cassandra/cluster.py":3775 * # _reconnection_handler will be cleared out * self._reconnection_handler = _ControlReconnectionHandler( * self, self._cluster.scheduler, schedule, # <<<<<<<<<<<<<< * self._get_and_set_reconnection_handler, * new_handler=None) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3775, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 3775, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":3776 * self._reconnection_handler = _ControlReconnectionHandler( * self, self._cluster.scheduler, schedule, * self._get_and_set_reconnection_handler, # <<<<<<<<<<<<<< * new_handler=None) * self._reconnection_handler.start() */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_get_and_set_reconnection_handle); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3776, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_10); /* "cassandra/cluster.py":3777 * self, self._cluster.scheduler, schedule, * self._get_and_set_reconnection_handler, * new_handler=None) # <<<<<<<<<<<<<< * self._reconnection_handler.start() * except Exception: */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[5 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_v_self, __pyx_t_18, __pyx_v_schedule, __pyx_t_10}; __pyx_t_19 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3774, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_19); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_new_handler, Py_None, __pyx_t_19, __pyx_callargs+5, 0) < (0)) __PYX_ERR(0, 3774, __pyx_L17_error) __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_5, (5-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_19); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3774, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); } /* "cassandra/cluster.py":3774 * # will be called with the new connection and then our * # _reconnection_handler will be cleared out * self._reconnection_handler = _ControlReconnectionHandler( # <<<<<<<<<<<<<< * self, self._cluster.scheduler, schedule, * self._get_and_set_reconnection_handler, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler, __pyx_t_3) < (0)) __PYX_ERR(0, 3774, __pyx_L17_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3778 * self._get_and_set_reconnection_handler, * new_handler=None) * self._reconnection_handler.start() # <<<<<<<<<<<<<< * except Exception: * log.debug("[control connection] error reconnecting", exc_info=True) */ __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3778, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_12 = __pyx_t_19; __Pyx_INCREF(__pyx_t_12); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3778, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3765 * schedule = self._cluster.reconnection_policy.new_schedule() * * with self._reconnection_lock: # <<<<<<<<<<<<<< * * # cancel existing reconnection attempts */ } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L24_try_end; __pyx_L17_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_19, &__pyx_t_12) < 0) __PYX_ERR(0, 3765, __pyx_L19_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_12); __pyx_t_10 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_19, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3765, __pyx_L19_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_10, NULL); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 3765, __pyx_L19_except_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_t_20); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_17 < (0)) __PYX_ERR(0, 3765, __pyx_L19_except_error) __pyx_t_21 = (!__pyx_t_17); if (unlikely(__pyx_t_21)) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_19, __pyx_t_12); __pyx_t_3 = 0; __pyx_t_19 = 0; __pyx_t_12 = 0; __PYX_ERR(0, 3765, __pyx_L19_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L18_exception_handled; } __pyx_L19_except_error:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); goto __pyx_L5_except_error; __pyx_L18_exception_handled:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_15); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); __pyx_L24_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_13) { __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 3765, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } goto __pyx_L16; } __pyx_L16:; } goto __pyx_L29; __pyx_L11_error:; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L5_except_error; __pyx_L29:; } __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L4_exception_handled; } /* "cassandra/cluster.py":3779 * new_handler=None) * self._reconnection_handler.start() * except Exception: # <<<<<<<<<<<<<< * log.debug("[control connection] error reconnecting", exc_info=True) * raise */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_9) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 3779, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); /* "cassandra/cluster.py":3780 * self._reconnection_handler.start() * except Exception: * log.debug("[control connection] error reconnecting", exc_info=True) # <<<<<<<<<<<<<< * raise * */ __pyx_t_19 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3780, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3780, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_19); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_19, __pyx_mstate_global->__pyx_kp_u_control_connection_error_reconn}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3780, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_3, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3780, __pyx_L5_except_error) __pyx_t_12 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3780, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); } __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":3781 * except Exception: * log.debug("[control connection] error reconnecting", exc_info=True) * raise # <<<<<<<<<<<<<< * * def _get_and_set_reconnection_handler(self, new_handler): */ __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_2, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_4 = 0; __PYX_ERR(0, 3781, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3759 * def _reconnect(self): * log.debug("[control connection] Attempting to reconnect") * try: # <<<<<<<<<<<<<< * self._set_new_connection(self._reconnect_internal()) * except NoHostAvailable: */ __pyx_L5_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_L4_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_L8_try_end:; } /* "cassandra/cluster.py":3757 * self._submit(self._reconnect) * * def _reconnect(self): # <<<<<<<<<<<<<< * log.debug("[control connection] Attempting to reconnect") * try: */ /* 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_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._reconnect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_schedule); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3783 * raise * * def _get_and_set_reconnection_handler(self, new_handler): # <<<<<<<<<<<<<< * """ * Called by the _ControlReconnectionHandler when a new connection */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_15_get_and_set_reconnection_handler(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_17ControlConnection_14_get_and_set_reconnection_handler, "\n Called by the _ControlReconnectionHandler when a new connection\n is successfully created. Clears out the _reconnection_handler on\n this ControlConnection.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_15_get_and_set_reconnection_handler = {"_get_and_set_reconnection_handler", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_15_get_and_set_reconnection_handler, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_17ControlConnection_14_get_and_set_reconnection_handler}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_15_get_and_set_reconnection_handler(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_new_handler = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_and_set_reconnection_handler (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_new_handler,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3783, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3783, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3783, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_and_set_reconnection_handler", 0) < (0)) __PYX_ERR(0, 3783, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_and_set_reconnection_handler", 1, 2, 2, i); __PYX_ERR(0, 3783, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3783, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3783, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_new_handler = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_and_set_reconnection_handler", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 3783, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._get_and_set_reconnection_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_14_get_and_set_reconnection_handler(__pyx_self, __pyx_v_self, __pyx_v_new_handler); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_14_get_and_set_reconnection_handler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_handler) { PyObject *__pyx_v_old = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_and_set_reconnection_handler", 0); /* "cassandra/cluster.py":3789 * this ControlConnection. * """ * with self._reconnection_lock: # <<<<<<<<<<<<<< * old = self._reconnection_handler * self._reconnection_handler = new_handler */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3789, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3789, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":3790 * """ * with self._reconnection_lock: * old = self._reconnection_handler # <<<<<<<<<<<<<< * self._reconnection_handler = new_handler * return old */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3790, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_old = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":3791 * with self._reconnection_lock: * old = self._reconnection_handler * self._reconnection_handler = new_handler # <<<<<<<<<<<<<< * return old * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler, __pyx_v_new_handler) < (0)) __PYX_ERR(0, 3791, __pyx_L7_error) /* "cassandra/cluster.py":3792 * old = self._reconnection_handler * self._reconnection_handler = new_handler * return old # <<<<<<<<<<<<<< * * def _submit(self, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_old); __pyx_r = __pyx_v_old; goto __pyx_L11_try_return; /* "cassandra/cluster.py":3789 * this ControlConnection. * """ * with self._reconnection_lock: # <<<<<<<<<<<<<< * old = self._reconnection_handler * self._reconnection_handler = new_handler */ } __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("cassandra.cluster.ControlConnection._get_and_set_reconnection_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 3789, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3789, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3789, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 3789, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 3789, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L11_try_return:; __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_return; __pyx_L8_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); } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_9 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L16; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L16:; } /* "cassandra/cluster.py":3783 * raise * * def _get_and_set_reconnection_handler(self, new_handler): # <<<<<<<<<<<<<< * """ * Called by the _ControlReconnectionHandler when a new connection */ /* 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("cassandra.cluster.ControlConnection._get_and_set_reconnection_handler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_old); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3794 * return old * * def _submit(self, *args, **kwargs): # <<<<<<<<<<<<<< * try: * if not self._cluster.is_shutdown: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_17_submit(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_17_submit = {"_submit", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_17_submit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_17_submit(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_submit (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3794, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3794, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "_submit", 1) < (0)) __PYX_ERR(0, 3794, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_submit", 0, 1, 1, i); __PYX_ERR(0, 3794, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3794, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_submit", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 3794, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.ControlConnection._submit", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_16_submit(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_16_submit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { 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; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_submit", 0); /* "cassandra/cluster.py":3795 * * def _submit(self, *args, **kwargs): * try: # <<<<<<<<<<<<<< * if not self._cluster.is_shutdown: * return self._cluster.executor.submit(*args, **kwargs) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3796 * def _submit(self, *args, **kwargs): * try: * if not self._cluster.is_shutdown: # <<<<<<<<<<<<<< * return self._cluster.executor.submit(*args, **kwargs) * except ReferenceError: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3796, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3796, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3796, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { /* "cassandra/cluster.py":3797 * try: * if not self._cluster.is_shutdown: * return self._cluster.executor.submit(*args, **kwargs) # <<<<<<<<<<<<<< * except ReferenceError: * pass */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3797, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_executor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3797, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3797, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3797, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_v_args, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3797, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":3796 * def _submit(self, *args, **kwargs): * try: * if not self._cluster.is_shutdown: # <<<<<<<<<<<<<< * return self._cluster.executor.submit(*args, **kwargs) * except ReferenceError: */ } /* "cassandra/cluster.py":3795 * * def _submit(self, *args, **kwargs): * try: # <<<<<<<<<<<<<< * if not self._cluster.is_shutdown: * return self._cluster.executor.submit(*args, **kwargs) */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":3798 * if not self._cluster.is_shutdown: * return self._cluster.executor.submit(*args, **kwargs) * except ReferenceError: # <<<<<<<<<<<<<< * pass * return None */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ReferenceError)))); if (__pyx_t_9) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3795 * * def _submit(self, *args, **kwargs): * try: # <<<<<<<<<<<<<< * if not self._cluster.is_shutdown: * return self._cluster.executor.submit(*args, **kwargs) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":3800 * except ReferenceError: * pass * return None # <<<<<<<<<<<<<< * * def shutdown(self): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":3794 * return old * * def _submit(self, *args, **kwargs): # <<<<<<<<<<<<<< * try: * if not self._cluster.is_shutdown: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._submit", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3802 * return None * * def shutdown(self): # <<<<<<<<<<<<<< * # stop trying to reconnect (if we are) * with self._reconnection_lock: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_19shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_19shutdown = {"shutdown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_19shutdown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_19shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3802, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3802, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "shutdown", 0) < (0)) __PYX_ERR(0, 3802, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, i); __PYX_ERR(0, 3802, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3802, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3802, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_18shutdown(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_18shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shutdown", 0); /* "cassandra/cluster.py":3804 * def shutdown(self): * # stop trying to reconnect (if we are) * with self._reconnection_lock: # <<<<<<<<<<<<<< * if self._reconnection_handler: * self._reconnection_handler.cancel() */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3804, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3804, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":3805 * # stop trying to reconnect (if we are) * with self._reconnection_lock: * if self._reconnection_handler: # <<<<<<<<<<<<<< * self._reconnection_handler.cancel() * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3805, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 3805, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { /* "cassandra/cluster.py":3806 * with self._reconnection_lock: * if self._reconnection_handler: * self._reconnection_handler.cancel() # <<<<<<<<<<<<<< * * with self._lock: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3806, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3806, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":3805 * # stop trying to reconnect (if we are) * with self._reconnection_lock: * if self._reconnection_handler: # <<<<<<<<<<<<<< * self._reconnection_handler.cancel() * */ } /* "cassandra/cluster.py":3804 * def shutdown(self): * # stop trying to reconnect (if we are) * with self._reconnection_lock: # <<<<<<<<<<<<<< * if self._reconnection_handler: * self._reconnection_handler.cancel() */ } __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_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("cassandra.cluster.ControlConnection.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 3804, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3804, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3804, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10 < (0)) __PYX_ERR(0, 3804, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_10); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_5, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_3 = 0; __PYX_ERR(0, 3804, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L17; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":3808 * self._reconnection_handler.cancel() * * with self._lock: # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /*with:*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3808, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3808, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_8, &__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { /* "cassandra/cluster.py":3809 * * with self._lock: * if self._is_shutdown: # <<<<<<<<<<<<<< * return * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3809, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 3809, __pyx_L22_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":3810 * with self._lock: * if self._is_shutdown: * return # <<<<<<<<<<<<<< * else: * self._is_shutdown = True */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L26_try_return; /* "cassandra/cluster.py":3809 * * with self._lock: * if self._is_shutdown: # <<<<<<<<<<<<<< * return * else: */ } /* "cassandra/cluster.py":3812 * return * else: * self._is_shutdown = True # <<<<<<<<<<<<<< * * log.debug("Shutting down control connection") */ /*else*/ { if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2, Py_True) < (0)) __PYX_ERR(0, 3812, __pyx_L22_error) } /* "cassandra/cluster.py":3814 * self._is_shutdown = True * * log.debug("Shutting down control connection") # <<<<<<<<<<<<<< * if self._connection: * self._connection.close() */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3814, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3814, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Shutting_down_control_connection}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3814, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3815 * * log.debug("Shutting down control connection") * if self._connection: # <<<<<<<<<<<<<< * self._connection.close() * self._connection = None */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3815, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 3815, __pyx_L22_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { /* "cassandra/cluster.py":3816 * log.debug("Shutting down control connection") * if self._connection: * self._connection.close() # <<<<<<<<<<<<<< * self._connection = None * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3816, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_close, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3816, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3817 * if self._connection: * self._connection.close() * self._connection = None # <<<<<<<<<<<<<< * * def refresh_schema(self, force=False, **kwargs): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection, Py_None) < (0)) __PYX_ERR(0, 3817, __pyx_L22_error) /* "cassandra/cluster.py":3815 * * log.debug("Shutting down control connection") * if self._connection: # <<<<<<<<<<<<<< * self._connection.close() * self._connection = None */ } /* "cassandra/cluster.py":3808 * self._reconnection_handler.cancel() * * with self._lock: # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ } __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; goto __pyx_L27_try_end; __pyx_L22_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("cassandra.cluster.ControlConnection.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 3808, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3808, __pyx_L24_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3808, __pyx_L24_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12 < (0)) __PYX_ERR(0, 3808, __pyx_L24_except_error) __pyx_t_10 = (!__pyx_t_12); if (unlikely(__pyx_t_10)) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_5, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_1 = 0; __PYX_ERR(0, 3808, __pyx_L24_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L23_exception_handled; } __pyx_L24_except_error:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); goto __pyx_L1_error; __pyx_L26_try_return:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); goto __pyx_L19_return; __pyx_L23_exception_handled:; __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_8, __pyx_t_7); __pyx_L27_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } goto __pyx_L21; } __pyx_L19_return: { __pyx_t_7 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; } __pyx_L21:; } goto __pyx_L33; __pyx_L18_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L33:; } /* "cassandra/cluster.py":3802 * return None * * def shutdown(self): # <<<<<<<<<<<<<< * # stop trying to reconnect (if we are) * with self._reconnection_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("cassandra.cluster.ControlConnection.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3819 * self._connection = None * * def refresh_schema(self, force=False, **kwargs): # <<<<<<<<<<<<<< * try: * if self._connection: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_21refresh_schema(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_21refresh_schema = {"refresh_schema", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_21refresh_schema, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_21refresh_schema(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_force = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_schema (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_force,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3819, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3819, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3819, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "refresh_schema", 1) < (0)) __PYX_ERR(0, 3819, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_schema", 0, 1, 2, i); __PYX_ERR(0, 3819, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3819, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3819, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_force = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_schema", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3819, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.ControlConnection.refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_20refresh_schema(__pyx_self, __pyx_v_self, __pyx_v_force, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_20refresh_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_force, PyObject *__pyx_v_kwargs) { 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; size_t __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_schema", 0); /* "cassandra/cluster.py":3820 * * def refresh_schema(self, force=False, **kwargs): * try: # <<<<<<<<<<<<<< * if self._connection: * return self._refresh_schema(self._connection, force=force, **kwargs) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3821 * def refresh_schema(self, force=False, **kwargs): * try: * if self._connection: # <<<<<<<<<<<<<< * return self._refresh_schema(self._connection, force=force, **kwargs) * except ReferenceError: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3821, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3821, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":3822 * try: * if self._connection: * return self._refresh_schema(self._connection, force=force, **kwargs) # <<<<<<<<<<<<<< * except ReferenceError: * pass # our weak reference to the Cluster is no good */ __Pyx_XDECREF(__pyx_r); __pyx_t_6 = NULL; __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_refresh_schema_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3822, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3822, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3822, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_force, __pyx_v_force) < (0)) __PYX_ERR(0, 3822, __pyx_L3_error) __pyx_t_9 = __pyx_t_10; __pyx_t_10 = 0; if (__Pyx_MergeKeywords(__pyx_t_9, __pyx_v_kwargs) < (0)) __PYX_ERR(0, 3822, __pyx_L3_error) __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; __pyx_t_4 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3822, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":3821 * def refresh_schema(self, force=False, **kwargs): * try: * if self._connection: # <<<<<<<<<<<<<< * return self._refresh_schema(self._connection, force=force, **kwargs) * except ReferenceError: */ } /* "cassandra/cluster.py":3820 * * def refresh_schema(self, force=False, **kwargs): * try: # <<<<<<<<<<<<<< * if self._connection: * return self._refresh_schema(self._connection, force=force, **kwargs) */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __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; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3823 * if self._connection: * return self._refresh_schema(self._connection, force=force, **kwargs) * except ReferenceError: # <<<<<<<<<<<<<< * pass # our weak reference to the Cluster is no good * except Exception: */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ReferenceError)))); if (__pyx_t_12) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } /* "cassandra/cluster.py":3825 * except ReferenceError: * pass # our weak reference to the Cluster is no good * except Exception: # <<<<<<<<<<<<<< * log.debug("[control connection] Error refreshing schema", exc_info=True) * self._signal_error() */ __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_12) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection.refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 3825, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":3826 * pass # our weak reference to the Cluster is no good * except Exception: * log.debug("[control connection] Error refreshing schema", exc_info=True) # <<<<<<<<<<<<<< * self._signal_error() * return False */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3826, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3826, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_control_connection_Error_refres}; __pyx_t_10 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3826, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_10); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_10, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3826, __pyx_L5_except_error) __pyx_t_8 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3826, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "cassandra/cluster.py":3827 * except Exception: * log.debug("[control connection] Error refreshing schema", exc_info=True) * self._signal_error() # <<<<<<<<<<<<<< * return False * */ __pyx_t_13 = __pyx_v_self; __Pyx_INCREF(__pyx_t_13); __pyx_t_11 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_8 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_error, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3827, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3820 * * def refresh_schema(self, force=False, **kwargs): * try: # <<<<<<<<<<<<<< * if self._connection: * return self._refresh_schema(self._connection, force=force, **kwargs) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":3828 * log.debug("[control connection] Error refreshing schema", exc_info=True) * self._signal_error() * return False # <<<<<<<<<<<<<< * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":3819 * self._connection = None * * def refresh_schema(self, force=False, **kwargs): # <<<<<<<<<<<<<< * try: * if self._connection: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __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_13); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3830 * return False * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): # <<<<<<<<<<<<<< * if self._cluster.is_shutdown: * return False */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_23_refresh_schema(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_23_refresh_schema = {"_refresh_schema", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_23_refresh_schema, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_23_refresh_schema(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_preloaded_results = 0; PyObject *__pyx_v_schema_agreement_wait = 0; PyObject *__pyx_v_force = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_refresh_schema (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_preloaded_results,&__pyx_mstate_global->__pyx_n_u_schema_agreement_wait,&__pyx_mstate_global->__pyx_n_u_force,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3830, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "_refresh_schema", 1) < (0)) __PYX_ERR(0, 3830, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_refresh_schema", 0, 2, 5, i); __PYX_ERR(0, 3830, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3830, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3830, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3830, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_connection = values[1]; __pyx_v_preloaded_results = values[2]; __pyx_v_schema_agreement_wait = values[3]; __pyx_v_force = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_refresh_schema", 0, 2, 5, __pyx_nargs); __PYX_ERR(0, 3830, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.ControlConnection._refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_22_refresh_schema(__pyx_self, __pyx_v_self, __pyx_v_connection, __pyx_v_preloaded_results, __pyx_v_schema_agreement_wait, __pyx_v_force, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_22_refresh_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_preloaded_results, PyObject *__pyx_v_schema_agreement_wait, PyObject *__pyx_v_force, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_agreed = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_refresh_schema", 0); /* "cassandra/cluster.py":3831 * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): * if self._cluster.is_shutdown: # <<<<<<<<<<<<<< * return False * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":3832 * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): * if self._cluster.is_shutdown: * return False # <<<<<<<<<<<<<< * * agreed = self.wait_for_schema_agreement(connection, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":3831 * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): * if self._cluster.is_shutdown: # <<<<<<<<<<<<<< * return False * */ } /* "cassandra/cluster.py":3834 * return False * * agreed = self.wait_for_schema_agreement(connection, # <<<<<<<<<<<<<< * preloaded_results=preloaded_results, * wait_time=schema_agreement_wait) */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); /* "cassandra/cluster.py":3836 * agreed = self.wait_for_schema_agreement(connection, * preloaded_results=preloaded_results, * wait_time=schema_agreement_wait) # <<<<<<<<<<<<<< * * if not self._schema_meta_enabled and not force: */ __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, __pyx_v_connection}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_preloaded_results, __pyx_v_preloaded_results, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3834, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_wait_time, __pyx_v_schema_agreement_wait, __pyx_t_5, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3834, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_wait_for_schema_agreement, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_agreed = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3838 * wait_time=schema_agreement_wait) * * if not self._schema_meta_enabled and not force: # <<<<<<<<<<<<<< * log.debug("[control connection] Skipping schema refresh because schema metadata is disabled") * return False */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_meta_enabled); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 3838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (!__pyx_t_6); if (__pyx_t_7) { } else { __pyx_t_3 = __pyx_t_7; goto __pyx_L5_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3838, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_7); __pyx_t_3 = __pyx_t_6; __pyx_L5_bool_binop_done:; if (__pyx_t_3) { /* "cassandra/cluster.py":3839 * * if not self._schema_meta_enabled and not force: * log.debug("[control connection] Skipping schema refresh because schema metadata is disabled") # <<<<<<<<<<<<<< * return False * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_control_connection_Skipping_sch}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3840 * if not self._schema_meta_enabled and not force: * log.debug("[control connection] Skipping schema refresh because schema metadata is disabled") * return False # <<<<<<<<<<<<<< * * if not agreed: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":3838 * wait_time=schema_agreement_wait) * * if not self._schema_meta_enabled and not force: # <<<<<<<<<<<<<< * log.debug("[control connection] Skipping schema refresh because schema metadata is disabled") * return False */ } /* "cassandra/cluster.py":3842 * return False * * if not agreed: # <<<<<<<<<<<<<< * log.debug("Skipping schema refresh due to lack of schema agreement") * return False */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_agreed); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 3842, __pyx_L1_error) __pyx_t_6 = (!__pyx_t_3); if (__pyx_t_6) { /* "cassandra/cluster.py":3843 * * if not agreed: * log.debug("Skipping schema refresh due to lack of schema agreement") # <<<<<<<<<<<<<< * return False * */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_mstate_global->__pyx_kp_u_Skipping_schema_refresh_due_to_l}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3844 * if not agreed: * log.debug("Skipping schema refresh due to lack of schema agreement") * return False # <<<<<<<<<<<<<< * * self._cluster.metadata.refresh(connection, self._timeout, **kwargs) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":3842 * return False * * if not agreed: # <<<<<<<<<<<<<< * log.debug("Skipping schema refresh due to lack of schema agreement") * return False */ } /* "cassandra/cluster.py":3846 * return False * * self._cluster.metadata.refresh(connection, self._timeout, **kwargs) # <<<<<<<<<<<<<< * * return True */ __pyx_t_1 = NULL; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_refresh); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_connection, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3848 * self._cluster.metadata.refresh(connection, self._timeout, **kwargs) * * return True # <<<<<<<<<<<<<< * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "cassandra/cluster.py":3830 * return False * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): # <<<<<<<<<<<<<< * if self._cluster.is_shutdown: * return False */ /* 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_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._refresh_schema", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_agreed); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3850 * return True * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): # <<<<<<<<<<<<<< * try: * if self._connection: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_25refresh_node_list_and_token_map(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_25refresh_node_list_and_token_map = {"refresh_node_list_and_token_map", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_25refresh_node_list_and_token_map, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_25refresh_node_list_and_token_map(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_force_token_rebuild = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_node_list_and_token_map (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_force_token_rebuild,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3850, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3850, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3850, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "refresh_node_list_and_token_map", 0) < (0)) __PYX_ERR(0, 3850, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_node_list_and_token_map", 0, 1, 2, i); __PYX_ERR(0, 3850, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3850, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3850, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_force_token_rebuild = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_node_list_and_token_map", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 3850, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.refresh_node_list_and_token_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_24refresh_node_list_and_token_map(__pyx_self, __pyx_v_self, __pyx_v_force_token_rebuild); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_24refresh_node_list_and_token_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_force_token_rebuild) { 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; size_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_node_list_and_token_map", 0); /* "cassandra/cluster.py":3851 * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): * try: # <<<<<<<<<<<<<< * if self._connection: * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":3852 * def refresh_node_list_and_token_map(self, force_token_rebuild=False): * try: * if self._connection: # <<<<<<<<<<<<<< * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) * return True */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3852, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 3852, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":3853 * try: * if self._connection: * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) # <<<<<<<<<<<<<< * return True * except ReferenceError: */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3853, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, __pyx_t_7}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3853, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force_token_rebuild, __pyx_v_force_token_rebuild, __pyx_t_9, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3853, __pyx_L3_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map_2, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3853, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3854 * if self._connection: * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) * return True # <<<<<<<<<<<<<< * except ReferenceError: * pass # our weak reference to the Cluster is no good */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L7_try_return; /* "cassandra/cluster.py":3852 * def refresh_node_list_and_token_map(self, force_token_rebuild=False): * try: * if self._connection: # <<<<<<<<<<<<<< * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) * return True */ } /* "cassandra/cluster.py":3851 * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): * try: # <<<<<<<<<<<<<< * if self._connection: * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3855 * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) * return True * except ReferenceError: # <<<<<<<<<<<<<< * pass # our weak reference to the Cluster is no good * except Exception: */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ReferenceError)))); if (__pyx_t_10) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } /* "cassandra/cluster.py":3857 * except ReferenceError: * pass # our weak reference to the Cluster is no good * except Exception: # <<<<<<<<<<<<<< * log.debug("[control connection] Error refreshing node list and token map", exc_info=True) * self._signal_error() */ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_10) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection.refresh_node_list_and_token_map", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_7) < 0) __PYX_ERR(0, 3857, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); /* "cassandra/cluster.py":3858 * pass # our weak reference to the Cluster is no good * except Exception: * log.debug("[control connection] Error refreshing node list and token map", exc_info=True) # <<<<<<<<<<<<<< * self._signal_error() * return False */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_control_connection_Error_refres_2}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3858, __pyx_L5_except_error) __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3858, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":3859 * except Exception: * log.debug("[control connection] Error refreshing node list and token map", exc_info=True) * self._signal_error() # <<<<<<<<<<<<<< * return False * */ __pyx_t_13 = __pyx_v_self; __Pyx_INCREF(__pyx_t_13); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_error, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3859, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":3851 * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): * try: # <<<<<<<<<<<<<< * if self._connection: * self._refresh_node_list_and_token_map(self._connection, force_token_rebuild=force_token_rebuild) */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":3860 * log.debug("[control connection] Error refreshing node list and token map", exc_info=True) * self._signal_error() * return False # <<<<<<<<<<<<<< * * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":3850 * return True * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): # <<<<<<<<<<<<<< * try: * if self._connection: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.refresh_node_list_and_token_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3862 * return False * * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, # <<<<<<<<<<<<<< * force_token_rebuild=False): * if preloaded_results: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_27_refresh_node_list_and_token_map(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_27_refresh_node_list_and_token_map = {"_refresh_node_list_and_token_map", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_27_refresh_node_list_and_token_map, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_27_refresh_node_list_and_token_map(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_preloaded_results = 0; PyObject *__pyx_v_force_token_rebuild = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_refresh_node_list_and_token_map (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_preloaded_results,&__pyx_mstate_global->__pyx_n_u_force_token_rebuild,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3862, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3862, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3862, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3862, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3862, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_refresh_node_list_and_token_map", 0) < (0)) __PYX_ERR(0, 3862, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":3863 * * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, * force_token_rebuild=False): # <<<<<<<<<<<<<< * if preloaded_results: * log.debug("[control connection] Refreshing node list and token map using preloaded results") */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_refresh_node_list_and_token_map", 0, 2, 4, i); __PYX_ERR(0, 3862, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 3862, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 3862, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 3862, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3862, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "cassandra/cluster.py":3862 * return False * * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, # <<<<<<<<<<<<<< * force_token_rebuild=False): * if preloaded_results: */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_False))); } __pyx_v_self = values[0]; __pyx_v_connection = values[1]; __pyx_v_preloaded_results = values[2]; __pyx_v_force_token_rebuild = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_refresh_node_list_and_token_map", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 3862, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._refresh_node_list_and_token_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_26_refresh_node_list_and_token_map(__pyx_self, __pyx_v_self, __pyx_v_connection, __pyx_v_preloaded_results, __pyx_v_force_token_rebuild); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_26_refresh_node_list_and_token_map(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_preloaded_results, PyObject *__pyx_v_force_token_rebuild) { PyObject *__pyx_v_peers_result = NULL; PyObject *__pyx_v_local_result = NULL; PyObject *__pyx_v_cl = NULL; PyObject *__pyx_v_sel_peers = NULL; PyObject *__pyx_v_sel_local = NULL; PyObject *__pyx_v_peers_query = NULL; PyObject *__pyx_v_local_query = NULL; PyObject *__pyx_v_partitioner = NULL; PyObject *__pyx_v_token_map = NULL; PyObject *__pyx_v_found_hosts = NULL; PyObject *__pyx_v_local_rows = NULL; PyObject *__pyx_v_local_row = NULL; PyObject *__pyx_v_cluster_name = NULL; PyObject *__pyx_v_tokens = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_datacenter = NULL; PyObject *__pyx_v_rack = NULL; PyObject *__pyx_v_local_rpc_address_query = NULL; PyObject *__pyx_v_success = NULL; PyObject *__pyx_v_local_rpc_address_result = NULL; PyObject *__pyx_v_row = NULL; PyObject *__pyx_v_should_rebuild_token_map = NULL; PyObject *__pyx_v_endpoint = NULL; CYTHON_UNUSED PyObject *__pyx_v__ = NULL; PyObject *__pyx_v_old_host = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; PyObject *(*__pyx_t_8)(PyObject *); PyObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; PyObject *(*__pyx_t_13)(PyObject *); PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_refresh_node_list_and_token_map", 0); /* "cassandra/cluster.py":3864 * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, * force_token_rebuild=False): * if preloaded_results: # <<<<<<<<<<<<<< * log.debug("[control connection] Refreshing node list and token map using preloaded results") * peers_result = preloaded_results[0] */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_preloaded_results); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3864, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":3865 * force_token_rebuild=False): * if preloaded_results: * log.debug("[control connection] Refreshing node list and token map using preloaded results") # <<<<<<<<<<<<<< * peers_result = preloaded_results[0] * local_result = preloaded_results[1] */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_control_connection_Refreshing_n}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":3866 * if preloaded_results: * log.debug("[control connection] Refreshing node list and token map using preloaded results") * peers_result = preloaded_results[0] # <<<<<<<<<<<<<< * local_result = preloaded_results[1] * else: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_preloaded_results, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_peers_result = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3867 * log.debug("[control connection] Refreshing node list and token map using preloaded results") * peers_result = preloaded_results[0] * local_result = preloaded_results[1] # <<<<<<<<<<<<<< * else: * cl = ConsistencyLevel.ONE */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_preloaded_results, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_local_result = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":3864 * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, * force_token_rebuild=False): * if preloaded_results: # <<<<<<<<<<<<<< * log.debug("[control connection] Refreshing node list and token map using preloaded results") * peers_result = preloaded_results[0] */ goto __pyx_L3; } /* "cassandra/cluster.py":3869 * local_result = preloaded_results[1] * else: * cl = ConsistencyLevel.ONE # <<<<<<<<<<<<<< * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * if not self._token_meta_enabled: */ /*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ONE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_cl = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3870 * else: * cl = ConsistencyLevel.ONE * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) # <<<<<<<<<<<<<< * if not self._token_meta_enabled: * log.debug("[control connection] Refreshing node list without token map") */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PEERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_connection}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_peers_query, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_sel_peers = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3871 * cl = ConsistencyLevel.ONE * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * if not self._token_meta_enabled: # <<<<<<<<<<<<<< * log.debug("[control connection] Refreshing node list without token map") * sel_local = self._SELECT_LOCAL_NO_TOKENS */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (!__pyx_t_1); if (__pyx_t_7) { /* "cassandra/cluster.py":3872 * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * if not self._token_meta_enabled: * log.debug("[control connection] Refreshing node list without token map") # <<<<<<<<<<<<<< * sel_local = self._SELECT_LOCAL_NO_TOKENS * else: */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Refreshing_n_2}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3873 * if not self._token_meta_enabled: * log.debug("[control connection] Refreshing node list without token map") * sel_local = self._SELECT_LOCAL_NO_TOKENS # <<<<<<<<<<<<<< * else: * log.debug("[control connection] Refreshing node list and token map") */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL_NO_TOKENS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_sel_local = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3871 * cl = ConsistencyLevel.ONE * sel_peers = self._get_peers_query(self.PeersQueryType.PEERS, connection) * if not self._token_meta_enabled: # <<<<<<<<<<<<<< * log.debug("[control connection] Refreshing node list without token map") * sel_local = self._SELECT_LOCAL_NO_TOKENS */ goto __pyx_L4; } /* "cassandra/cluster.py":3875 * sel_local = self._SELECT_LOCAL_NO_TOKENS * else: * log.debug("[control connection] Refreshing node list and token map") # <<<<<<<<<<<<<< * sel_local = self._SELECT_LOCAL * peers_query = QueryMessage(query=sel_peers, consistency_level=cl) */ /*else*/ { __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_control_connection_Refreshing_n_3}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3876 * else: * log.debug("[control connection] Refreshing node list and token map") * sel_local = self._SELECT_LOCAL # <<<<<<<<<<<<<< * peers_query = QueryMessage(query=sel_peers, consistency_level=cl) * local_query = QueryMessage(query=sel_local, consistency_level=cl) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_sel_local = __pyx_t_5; __pyx_t_5 = 0; } __pyx_L4:; /* "cassandra/cluster.py":3877 * log.debug("[control connection] Refreshing node list and token map") * sel_local = self._SELECT_LOCAL * peers_query = QueryMessage(query=sel_peers, consistency_level=cl) # <<<<<<<<<<<<<< * local_query = QueryMessage(query=sel_local, consistency_level=cl) * peers_result, local_result = connection.wait_for_responses( */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_2, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_sel_peers, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3877, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_v_cl, __pyx_t_4, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3877, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_peers_query = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3878 * sel_local = self._SELECT_LOCAL * peers_query = QueryMessage(query=sel_peers, consistency_level=cl) * local_query = QueryMessage(query=sel_local, consistency_level=cl) # <<<<<<<<<<<<<< * peers_result, local_result = connection.wait_for_responses( * peers_query, local_query, timeout=self._timeout) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_sel_local, __pyx_t_2, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3878, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_v_cl, __pyx_t_2, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3878, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_local_query = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3879 * peers_query = QueryMessage(query=sel_peers, consistency_level=cl) * local_query = QueryMessage(query=sel_local, consistency_level=cl) * peers_result, local_result = connection.wait_for_responses( # <<<<<<<<<<<<<< * peers_query, local_query, timeout=self._timeout) * */ __pyx_t_4 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_4); /* "cassandra/cluster.py":3880 * local_query = QueryMessage(query=sel_local, consistency_level=cl) * peers_result, local_result = connection.wait_for_responses( * peers_query, local_query, timeout=self._timeout) # <<<<<<<<<<<<<< * * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_peers_query, __pyx_v_local_query}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_2, __pyx_t_3, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 3879, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_wait_for_responses, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { PyObject* sequence = __pyx_t_5; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3879, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 3879, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3879, __pyx_L1_error) __pyx_L6_unpacking_done:; } /* "cassandra/cluster.py":3879 * peers_query = QueryMessage(query=sel_peers, consistency_level=cl) * local_query = QueryMessage(query=sel_local, consistency_level=cl) * peers_result, local_result = connection.wait_for_responses( # <<<<<<<<<<<<<< * peers_query, local_query, timeout=self._timeout) * */ __pyx_v_peers_result = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_local_result = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; /* "cassandra/cluster.py":3882 * peers_query, local_query, timeout=self._timeout) * * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) # <<<<<<<<<<<<<< * * partitioner = None */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dict_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_peers_result, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_peers_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_9}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3882, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF_SET(__pyx_v_peers_result, __pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3884 * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) * * partitioner = None # <<<<<<<<<<<<<< * token_map = {} * */ __Pyx_INCREF(Py_None); __pyx_v_partitioner = Py_None; /* "cassandra/cluster.py":3885 * * partitioner = None * token_map = {} # <<<<<<<<<<<<<< * * found_hosts = set() */ __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_token_map = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3887 * token_map = {} * * found_hosts = set() # <<<<<<<<<<<<<< * if local_result.parsed_rows: * found_hosts.add(connection.endpoint) */ __pyx_t_5 = PySet_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_found_hosts = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3888 * * found_hosts = set() * if local_result.parsed_rows: # <<<<<<<<<<<<<< * found_hosts.add(connection.endpoint) * local_rows = dict_factory(local_result.column_names, local_result.parsed_rows) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":3889 * found_hosts = set() * if local_result.parsed_rows: * found_hosts.add(connection.endpoint) # <<<<<<<<<<<<<< * local_rows = dict_factory(local_result.column_names, local_result.parsed_rows) * local_row = local_rows[0] */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PySet_Add(__pyx_v_found_hosts, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3890 * if local_result.parsed_rows: * found_hosts.add(connection.endpoint) * local_rows = dict_factory(local_result.column_names, local_result.parsed_rows) # <<<<<<<<<<<<<< * local_row = local_rows[0] * cluster_name = local_row["cluster_name"] */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_dict_factory); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_result, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_2}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_v_local_rows = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3891 * found_hosts.add(connection.endpoint) * local_rows = dict_factory(local_result.column_names, local_result.parsed_rows) * local_row = local_rows[0] # <<<<<<<<<<<<<< * cluster_name = local_row["cluster_name"] * self._cluster.metadata.cluster_name = cluster_name */ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_local_rows, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_local_row = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3892 * local_rows = dict_factory(local_result.column_names, local_result.parsed_rows) * local_row = local_rows[0] * cluster_name = local_row["cluster_name"] # <<<<<<<<<<<<<< * self._cluster.metadata.cluster_name = cluster_name * */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_local_row, __pyx_mstate_global->__pyx_n_u_cluster_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_cluster_name = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":3893 * local_row = local_rows[0] * cluster_name = local_row["cluster_name"] * self._cluster.metadata.cluster_name = cluster_name # <<<<<<<<<<<<<< * * partitioner = local_row.get("partitioner") */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cluster_name, __pyx_v_cluster_name) < (0)) __PYX_ERR(0, 3893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3895 * self._cluster.metadata.cluster_name = cluster_name * * partitioner = local_row.get("partitioner") # <<<<<<<<<<<<<< * tokens = local_row.get("tokens") * */ __pyx_t_5 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_partitioner}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF_SET(__pyx_v_partitioner, __pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3896 * * partitioner = local_row.get("partitioner") * tokens = local_row.get("tokens") # <<<<<<<<<<<<<< * * host = self._cluster.metadata.get_host(connection.endpoint) */ __pyx_t_5 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tokens}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_tokens = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3898 * tokens = local_row.get("tokens") * * host = self._cluster.metadata.get_host(connection.endpoint) # <<<<<<<<<<<<<< * if host: * datacenter = local_row.get("data_center") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_host = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3899 * * host = self._cluster.metadata.get_host(connection.endpoint) * if host: # <<<<<<<<<<<<<< * datacenter = local_row.get("data_center") * rack = local_row.get("rack") */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_host); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3899, __pyx_L1_error) if (__pyx_t_7) { /* "cassandra/cluster.py":3900 * host = self._cluster.metadata.get_host(connection.endpoint) * if host: * datacenter = local_row.get("data_center") # <<<<<<<<<<<<<< * rack = local_row.get("rack") * self._update_location_info(host, datacenter, rack) */ __pyx_t_4 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_data_center}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_datacenter = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3901 * if host: * datacenter = local_row.get("data_center") * rack = local_row.get("rack") # <<<<<<<<<<<<<< * self._update_location_info(host, datacenter, rack) * host.host_id = local_row.get("host_id") */ __pyx_t_4 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_rack}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_rack = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3902 * datacenter = local_row.get("data_center") * rack = local_row.get("rack") * self._update_location_info(host, datacenter, rack) # <<<<<<<<<<<<<< * host.host_id = local_row.get("host_id") * host.listen_address = local_row.get("listen_address") */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_host, __pyx_v_datacenter, __pyx_v_rack}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_location_info, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3903 * rack = local_row.get("rack") * self._update_location_info(host, datacenter, rack) * host.host_id = local_row.get("host_id") # <<<<<<<<<<<<<< * host.listen_address = local_row.get("listen_address") * host.listen_port = local_row.get("listen_port") */ __pyx_t_4 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_host_id}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_host_id, __pyx_t_9) < (0)) __PYX_ERR(0, 3903, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3904 * self._update_location_info(host, datacenter, rack) * host.host_id = local_row.get("host_id") * host.listen_address = local_row.get("listen_address") # <<<<<<<<<<<<<< * host.listen_port = local_row.get("listen_port") * host.broadcast_address = _NodeInfo.get_broadcast_address(local_row) */ __pyx_t_4 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_listen_address}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_listen_address, __pyx_t_9) < (0)) __PYX_ERR(0, 3904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3905 * host.host_id = local_row.get("host_id") * host.listen_address = local_row.get("listen_address") * host.listen_port = local_row.get("listen_port") # <<<<<<<<<<<<<< * host.broadcast_address = _NodeInfo.get_broadcast_address(local_row) * host.broadcast_port = _NodeInfo.get_broadcast_port(local_row) */ __pyx_t_4 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_listen_port}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_listen_port, __pyx_t_9) < (0)) __PYX_ERR(0, 3905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3906 * host.listen_address = local_row.get("listen_address") * host.listen_port = local_row.get("listen_port") * host.broadcast_address = _NodeInfo.get_broadcast_address(local_row) # <<<<<<<<<<<<<< * host.broadcast_port = _NodeInfo.get_broadcast_port(local_row) * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_broadcast_address); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_local_row}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_address, __pyx_t_9) < (0)) __PYX_ERR(0, 3906, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3907 * host.listen_port = local_row.get("listen_port") * host.broadcast_address = _NodeInfo.get_broadcast_address(local_row) * host.broadcast_port = _NodeInfo.get_broadcast_port(local_row) # <<<<<<<<<<<<<< * * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(local_row) */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_broadcast_port); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_local_row}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_port, __pyx_t_9) < (0)) __PYX_ERR(0, 3907, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3909 * host.broadcast_port = _NodeInfo.get_broadcast_port(local_row) * * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(local_row) # <<<<<<<<<<<<<< * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(local_row) * if host.broadcast_rpc_address is None: */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_local_row}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_address, __pyx_t_9) < (0)) __PYX_ERR(0, 3909, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3910 * * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(local_row) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(local_row) # <<<<<<<<<<<<<< * if host.broadcast_rpc_address is None: * if self._token_meta_enabled: */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_port); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_local_row}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_port, __pyx_t_9) < (0)) __PYX_ERR(0, 3910, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3911 * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(local_row) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(local_row) * if host.broadcast_rpc_address is None: # <<<<<<<<<<<<<< * if self._token_meta_enabled: * # local rpc_address is not available, use the connection endpoint */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_address); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = (__pyx_t_9 == Py_None); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":3912 * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(local_row) * if host.broadcast_rpc_address is None: * if self._token_meta_enabled: # <<<<<<<<<<<<<< * # local rpc_address is not available, use the connection endpoint * host.broadcast_rpc_address = connection.endpoint.address */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":3914 * if self._token_meta_enabled: * # local rpc_address is not available, use the connection endpoint * host.broadcast_rpc_address = connection.endpoint.address # <<<<<<<<<<<<<< * host.broadcast_rpc_port = connection.endpoint.port * else: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_address, __pyx_t_5) < (0)) __PYX_ERR(0, 3914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":3915 * # local rpc_address is not available, use the connection endpoint * host.broadcast_rpc_address = connection.endpoint.address * host.broadcast_rpc_port = connection.endpoint.port # <<<<<<<<<<<<<< * else: * # local rpc_address has not been queried yet, try to fetch it */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_port); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_port, __pyx_t_9) < (0)) __PYX_ERR(0, 3915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3912 * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(local_row) * if host.broadcast_rpc_address is None: * if self._token_meta_enabled: # <<<<<<<<<<<<<< * # local rpc_address is not available, use the connection endpoint * host.broadcast_rpc_address = connection.endpoint.address */ goto __pyx_L10; } /* "cassandra/cluster.py":3920 * # separately, which might fail because C* < 2.1.6 doesn't have rpc_address * # in system.local. See CASSANDRA-9436. * local_rpc_address_query = QueryMessage(query=self._SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS, # <<<<<<<<<<<<<< * consistency_level=ConsistencyLevel.ONE) * success, local_rpc_address_result = connection.wait_for_response( */ /*else*/ { __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL_NO_TOKENS_RPC_ADDR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "cassandra/cluster.py":3921 * # in system.local. See CASSANDRA-9436. * local_rpc_address_query = QueryMessage(query=self._SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS, * consistency_level=ConsistencyLevel.ONE) # <<<<<<<<<<<<<< * success, local_rpc_address_result = connection.wait_for_response( * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ONE); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_t_2, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 3920, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_11, __pyx_t_3, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 3920, __pyx_L1_error) __pyx_t_9 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_local_rpc_address_query = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3922 * local_rpc_address_query = QueryMessage(query=self._SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS, * consistency_level=ConsistencyLevel.ONE) * success, local_rpc_address_result = connection.wait_for_response( # <<<<<<<<<<<<<< * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) * if success: */ __pyx_t_4 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_4); /* "cassandra/cluster.py":3923 * consistency_level=ConsistencyLevel.ONE) * success, local_rpc_address_result = connection.wait_for_response( * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) # <<<<<<<<<<<<<< * if success: * row = dict_factory( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_4, __pyx_v_local_rpc_address_query}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_t_3, __pyx_t_11, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 3922, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_fail_on_error, Py_False, __pyx_t_11, __pyx_callargs+2, 1) < (0)) __PYX_ERR(0, 3922, __pyx_L1_error) __pyx_t_9 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_wait_for_response, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) { PyObject* sequence = __pyx_t_9; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3922, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_11); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_11 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_11); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else __pyx_t_11 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); index = 0; __pyx_t_11 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_11)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); index = 1; __pyx_t_3 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 3922, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3922, __pyx_L1_error) __pyx_L12_unpacking_done:; } /* "cassandra/cluster.py":3922 * local_rpc_address_query = QueryMessage(query=self._SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS, * consistency_level=ConsistencyLevel.ONE) * success, local_rpc_address_result = connection.wait_for_response( # <<<<<<<<<<<<<< * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) * if success: */ __pyx_v_success = __pyx_t_11; __pyx_t_11 = 0; __pyx_v_local_rpc_address_result = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":3924 * success, local_rpc_address_result = connection.wait_for_response( * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) * if success: # <<<<<<<<<<<<<< * row = dict_factory( * local_rpc_address_result.column_names, */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_success); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3924, __pyx_L1_error) if (__pyx_t_7) { /* "cassandra/cluster.py":3925 * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) * if success: * row = dict_factory( # <<<<<<<<<<<<<< * local_rpc_address_result.column_names, * local_rpc_address_result.parsed_rows) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_dict_factory); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":3926 * if success: * row = dict_factory( * local_rpc_address_result.column_names, # <<<<<<<<<<<<<< * local_rpc_address_result.parsed_rows) * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row[0]) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_rpc_address_result, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":3927 * row = dict_factory( * local_rpc_address_result.column_names, * local_rpc_address_result.parsed_rows) # <<<<<<<<<<<<<< * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row[0]) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row[0]) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_rpc_address_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_2}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_row = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3928 * local_rpc_address_result.column_names, * local_rpc_address_result.parsed_rows) * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row[0]) # <<<<<<<<<<<<<< * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row[0]) * else: */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_address); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_row, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_2}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3928, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_address, __pyx_t_9) < (0)) __PYX_ERR(0, 3928, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3929 * local_rpc_address_result.parsed_rows) * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row[0]) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row[0]) # <<<<<<<<<<<<<< * else: * host.broadcast_rpc_address = connection.endpoint.address */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_port); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_row, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_port, __pyx_t_9) < (0)) __PYX_ERR(0, 3929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3924 * success, local_rpc_address_result = connection.wait_for_response( * local_rpc_address_query, timeout=self._timeout, fail_on_error=False) * if success: # <<<<<<<<<<<<<< * row = dict_factory( * local_rpc_address_result.column_names, */ goto __pyx_L13; } /* "cassandra/cluster.py":3931 * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row[0]) * else: * host.broadcast_rpc_address = connection.endpoint.address # <<<<<<<<<<<<<< * host.broadcast_rpc_port = connection.endpoint.port * */ /*else*/ { __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_address, __pyx_t_11) < (0)) __PYX_ERR(0, 3931, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3932 * else: * host.broadcast_rpc_address = connection.endpoint.address * host.broadcast_rpc_port = connection.endpoint.port # <<<<<<<<<<<<<< * * host.release_version = local_row.get("release_version") */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_port); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_port, __pyx_t_9) < (0)) __PYX_ERR(0, 3932, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_L13:; } __pyx_L10:; /* "cassandra/cluster.py":3911 * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(local_row) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(local_row) * if host.broadcast_rpc_address is None: # <<<<<<<<<<<<<< * if self._token_meta_enabled: * # local rpc_address is not available, use the connection endpoint */ } /* "cassandra/cluster.py":3934 * host.broadcast_rpc_port = connection.endpoint.port * * host.release_version = local_row.get("release_version") # <<<<<<<<<<<<<< * host.dse_version = local_row.get("dse_version") * host.dse_workload = local_row.get("workload") */ __pyx_t_11 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_11); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_n_u_release_version}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_release_version, __pyx_t_9) < (0)) __PYX_ERR(0, 3934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3935 * * host.release_version = local_row.get("release_version") * host.dse_version = local_row.get("dse_version") # <<<<<<<<<<<<<< * host.dse_workload = local_row.get("workload") * host.dse_workloads = local_row.get("workloads") */ __pyx_t_11 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_11); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_n_u_dse_version}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3935, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_version, __pyx_t_9) < (0)) __PYX_ERR(0, 3935, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3936 * host.release_version = local_row.get("release_version") * host.dse_version = local_row.get("dse_version") * host.dse_workload = local_row.get("workload") # <<<<<<<<<<<<<< * host.dse_workloads = local_row.get("workloads") * */ __pyx_t_11 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_11); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_n_u_workload}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_workload, __pyx_t_9) < (0)) __PYX_ERR(0, 3936, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3937 * host.dse_version = local_row.get("dse_version") * host.dse_workload = local_row.get("workload") * host.dse_workloads = local_row.get("workloads") # <<<<<<<<<<<<<< * * if partitioner and tokens: */ __pyx_t_11 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_11); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_n_u_workloads}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_workloads, __pyx_t_9) < (0)) __PYX_ERR(0, 3937, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3939 * host.dse_workloads = local_row.get("workloads") * * if partitioner and tokens: # <<<<<<<<<<<<<< * token_map[host] = tokens * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_partitioner); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3939, __pyx_L1_error) if (__pyx_t_1) { } else { __pyx_t_7 = __pyx_t_1; goto __pyx_L15_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3939, __pyx_L1_error) __pyx_t_7 = __pyx_t_1; __pyx_L15_bool_binop_done:; if (__pyx_t_7) { /* "cassandra/cluster.py":3940 * * if partitioner and tokens: * token_map[host] = tokens # <<<<<<<<<<<<<< * * # Check metadata.partitioner to see if we haven't built anything yet. If */ if (unlikely((PyDict_SetItem(__pyx_v_token_map, __pyx_v_host, __pyx_v_tokens) < 0))) __PYX_ERR(0, 3940, __pyx_L1_error) /* "cassandra/cluster.py":3939 * host.dse_workloads = local_row.get("workloads") * * if partitioner and tokens: # <<<<<<<<<<<<<< * token_map[host] = tokens * */ } /* "cassandra/cluster.py":3899 * * host = self._cluster.metadata.get_host(connection.endpoint) * if host: # <<<<<<<<<<<<<< * datacenter = local_row.get("data_center") * rack = local_row.get("rack") */ } /* "cassandra/cluster.py":3888 * * found_hosts = set() * if local_result.parsed_rows: # <<<<<<<<<<<<<< * found_hosts.add(connection.endpoint) * local_rows = dict_factory(local_result.column_names, local_result.parsed_rows) */ } /* "cassandra/cluster.py":3945 * # every node in the cluster was in the contact points, we won't discover * # any new nodes, so we need this additional check. (See PYTHON-90) * should_rebuild_token_map = force_token_rebuild or self._cluster.metadata.partitioner is None # <<<<<<<<<<<<<< * for row in peers_result: * if not self._is_valid_peer(row): */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_force_token_rebuild); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3945, __pyx_L1_error) if (!__pyx_t_7) { } else { __Pyx_INCREF(__pyx_v_force_token_rebuild); __pyx_t_9 = __pyx_v_force_token_rebuild; goto __pyx_L17_bool_binop_done; } __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_partitioner); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_11 == Py_None); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = __pyx_t_11; __pyx_t_11 = 0; __pyx_L17_bool_binop_done:; __pyx_v_should_rebuild_token_map = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":3946 * # any new nodes, so we need this additional check. (See PYTHON-90) * should_rebuild_token_map = force_token_rebuild or self._cluster.metadata.partitioner is None * for row in peers_result: # <<<<<<<<<<<<<< * if not self._is_valid_peer(row): * log.warning( */ if (likely(PyList_CheckExact(__pyx_v_peers_result)) || PyTuple_CheckExact(__pyx_v_peers_result)) { __pyx_t_9 = __pyx_v_peers_result; __Pyx_INCREF(__pyx_t_9); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_peers_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3946, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3946, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_9))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3946, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } __pyx_t_11 = __Pyx_PyList_GetItemRefFast(__pyx_t_9, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_12; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3946, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_11 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_12)); #else __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); #endif ++__pyx_t_12; } if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3946, __pyx_L1_error) } else { __pyx_t_11 = __pyx_t_13(__pyx_t_9); if (unlikely(!__pyx_t_11)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3946, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3947 * should_rebuild_token_map = force_token_rebuild or self._cluster.metadata.partitioner is None * for row in peers_result: * if not self._is_valid_peer(row): # <<<<<<<<<<<<<< * log.warning( * "Found an invalid row for peer (%s). Ignoring host." % */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_row}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_valid_peer, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3947, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_1 = (!__pyx_t_7); if (__pyx_t_1) { /* "cassandra/cluster.py":3948 * for row in peers_result: * if not self._is_valid_peer(row): * log.warning( # <<<<<<<<<<<<<< * "Found an invalid row for peer (%s). Ignoring host." % * _NodeInfo.get_broadcast_rpc_address(row)) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3950 * log.warning( * "Found an invalid row for peer (%s). Ignoring host." % * _NodeInfo.get_broadcast_rpc_address(row)) # <<<<<<<<<<<<<< * continue * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_address); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_row}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } /* "cassandra/cluster.py":3949 * if not self._is_valid_peer(row): * log.warning( * "Found an invalid row for peer (%s). Ignoring host." % # <<<<<<<<<<<<<< * _NodeInfo.get_broadcast_rpc_address(row)) * continue */ __pyx_t_15 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Found_an_invalid_row_for_peer_s, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_15}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3951 * "Found an invalid row for peer (%s). Ignoring host." % * _NodeInfo.get_broadcast_rpc_address(row)) * continue # <<<<<<<<<<<<<< * * endpoint = self._cluster.endpoint_factory.create(row) */ goto __pyx_L19_continue; /* "cassandra/cluster.py":3947 * should_rebuild_token_map = force_token_rebuild or self._cluster.metadata.partitioner is None * for row in peers_result: * if not self._is_valid_peer(row): # <<<<<<<<<<<<<< * log.warning( * "Found an invalid row for peer (%s). Ignoring host." % */ } /* "cassandra/cluster.py":3953 * continue * * endpoint = self._cluster.endpoint_factory.create(row) # <<<<<<<<<<<<<< * * if endpoint in found_hosts: */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_endpoint_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_row}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_endpoint, __pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3955 * endpoint = self._cluster.endpoint_factory.create(row) * * if endpoint in found_hosts: # <<<<<<<<<<<<<< * log.warning("Found multiple hosts with the same endpoint (%s). Excluding peer %s", endpoint, row.get("peer")) * continue */ __pyx_t_1 = (__Pyx_PySet_ContainsTF(__pyx_v_endpoint, __pyx_v_found_hosts, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3955, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":3956 * * if endpoint in found_hosts: * log.warning("Found multiple hosts with the same endpoint (%s). Excluding peer %s", endpoint, row.get("peer")) # <<<<<<<<<<<<<< * continue * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_v_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_peer}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Found_multiple_hosts_with_the_sa, __pyx_v_endpoint, __pyx_t_3}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3957 * if endpoint in found_hosts: * log.warning("Found multiple hosts with the same endpoint (%s). Excluding peer %s", endpoint, row.get("peer")) * continue # <<<<<<<<<<<<<< * * found_hosts.add(endpoint) */ goto __pyx_L19_continue; /* "cassandra/cluster.py":3955 * endpoint = self._cluster.endpoint_factory.create(row) * * if endpoint in found_hosts: # <<<<<<<<<<<<<< * log.warning("Found multiple hosts with the same endpoint (%s). Excluding peer %s", endpoint, row.get("peer")) * continue */ } /* "cassandra/cluster.py":3959 * continue * * found_hosts.add(endpoint) # <<<<<<<<<<<<<< * * host = self._cluster.metadata.get_host(endpoint) */ __pyx_t_10 = PySet_Add(__pyx_v_found_hosts, __pyx_v_endpoint); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3959, __pyx_L1_error) /* "cassandra/cluster.py":3961 * found_hosts.add(endpoint) * * host = self._cluster.metadata.get_host(endpoint) # <<<<<<<<<<<<<< * datacenter = row.get("data_center") * rack = row.get("rack") */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_15 = __pyx_t_2; __Pyx_INCREF(__pyx_t_15); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_endpoint}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3961, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3962 * * host = self._cluster.metadata.get_host(endpoint) * datacenter = row.get("data_center") # <<<<<<<<<<<<<< * rack = row.get("rack") * if host is None: */ __pyx_t_2 = __pyx_v_row; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_data_center}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3962, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_datacenter, __pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3963 * host = self._cluster.metadata.get_host(endpoint) * datacenter = row.get("data_center") * rack = row.get("rack") # <<<<<<<<<<<<<< * if host is None: * log.debug("[control connection] Found new host to connect to: %s", endpoint) */ __pyx_t_2 = __pyx_v_row; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_rack}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_XDECREF_SET(__pyx_v_rack, __pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3964 * datacenter = row.get("data_center") * rack = row.get("rack") * if host is None: # <<<<<<<<<<<<<< * log.debug("[control connection] Found new host to connect to: %s", endpoint) * host, _ = self._cluster.add_host(endpoint, datacenter, rack, signal=True, refresh_nodes=False) */ __pyx_t_1 = (__pyx_v_host == Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":3965 * rack = row.get("rack") * if host is None: * log.debug("[control connection] Found new host to connect to: %s", endpoint) # <<<<<<<<<<<<<< * host, _ = self._cluster.add_host(endpoint, datacenter, rack, signal=True, refresh_nodes=False) * should_rebuild_token_map = True */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_control_connection_Found_new_ho, __pyx_v_endpoint}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3965, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3966 * if host is None: * log.debug("[control connection] Found new host to connect to: %s", endpoint) * host, _ = self._cluster.add_host(endpoint, datacenter, rack, signal=True, refresh_nodes=False) # <<<<<<<<<<<<<< * should_rebuild_token_map = True * else: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, __pyx_v_endpoint, __pyx_v_datacenter, __pyx_v_rack}; __pyx_t_15 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_signal, Py_True, __pyx_t_15, __pyx_callargs+4, 0) < (0)) __PYX_ERR(0, 3966, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_refresh_nodes, Py_False, __pyx_t_15, __pyx_callargs+4, 1) < (0)) __PYX_ERR(0, 3966, __pyx_L1_error) __pyx_t_11 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_add_host, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_15); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 3966, __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_INCREF(__pyx_t_2); __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_15); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_15 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_15); } #else __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); index = 0; __pyx_t_2 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_15 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_15)) goto __pyx_L24_unpacking_failed; __Pyx_GOTREF(__pyx_t_15); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 3966, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L25_unpacking_done; __pyx_L24_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 3966, __pyx_L1_error) __pyx_L25_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_host, __pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3967 * log.debug("[control connection] Found new host to connect to: %s", endpoint) * host, _ = self._cluster.add_host(endpoint, datacenter, rack, signal=True, refresh_nodes=False) * should_rebuild_token_map = True # <<<<<<<<<<<<<< * else: * should_rebuild_token_map |= self._update_location_info(host, datacenter, rack) */ __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_should_rebuild_token_map, Py_True); /* "cassandra/cluster.py":3964 * datacenter = row.get("data_center") * rack = row.get("rack") * if host is None: # <<<<<<<<<<<<<< * log.debug("[control connection] Found new host to connect to: %s", endpoint) * host, _ = self._cluster.add_host(endpoint, datacenter, rack, signal=True, refresh_nodes=False) */ goto __pyx_L23; } /* "cassandra/cluster.py":3969 * should_rebuild_token_map = True * else: * should_rebuild_token_map |= self._update_location_info(host, datacenter, rack) # <<<<<<<<<<<<<< * * host.host_id = row.get("host_id") */ /*else*/ { __pyx_t_15 = __pyx_v_self; __Pyx_INCREF(__pyx_t_15); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_15, __pyx_v_host, __pyx_v_datacenter, __pyx_v_rack}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_update_location_info, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_15 = PyNumber_InPlaceOr(__pyx_v_should_rebuild_token_map, __pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF_SET(__pyx_v_should_rebuild_token_map, __pyx_t_15); __pyx_t_15 = 0; } __pyx_L23:; /* "cassandra/cluster.py":3971 * should_rebuild_token_map |= self._update_location_info(host, datacenter, rack) * * host.host_id = row.get("host_id") # <<<<<<<<<<<<<< * host.broadcast_address = _NodeInfo.get_broadcast_address(row) * host.broadcast_port = _NodeInfo.get_broadcast_port(row) */ __pyx_t_11 = __pyx_v_row; __Pyx_INCREF(__pyx_t_11); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_mstate_global->__pyx_n_u_host_id}; __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_host_id, __pyx_t_15) < (0)) __PYX_ERR(0, 3971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3972 * * host.host_id = row.get("host_id") * host.broadcast_address = _NodeInfo.get_broadcast_address(row) # <<<<<<<<<<<<<< * host.broadcast_port = _NodeInfo.get_broadcast_port(row) * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row) */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_broadcast_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_row}; __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_address, __pyx_t_15) < (0)) __PYX_ERR(0, 3972, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3973 * host.host_id = row.get("host_id") * host.broadcast_address = _NodeInfo.get_broadcast_address(row) * host.broadcast_port = _NodeInfo.get_broadcast_port(row) # <<<<<<<<<<<<<< * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_broadcast_port); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_row}; __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_port, __pyx_t_15) < (0)) __PYX_ERR(0, 3973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3974 * host.broadcast_address = _NodeInfo.get_broadcast_address(row) * host.broadcast_port = _NodeInfo.get_broadcast_port(row) * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row) # <<<<<<<<<<<<<< * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row) * host.release_version = row.get("release_version") */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_address); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_row}; __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_address, __pyx_t_15) < (0)) __PYX_ERR(0, 3974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3975 * host.broadcast_port = _NodeInfo.get_broadcast_port(row) * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row) # <<<<<<<<<<<<<< * host.release_version = row.get("release_version") * host.dse_version = row.get("dse_version") */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_port); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_row}; __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3975, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_broadcast_rpc_port, __pyx_t_15) < (0)) __PYX_ERR(0, 3975, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3976 * host.broadcast_rpc_address = _NodeInfo.get_broadcast_rpc_address(row) * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row) * host.release_version = row.get("release_version") # <<<<<<<<<<<<<< * host.dse_version = row.get("dse_version") * host.dse_workload = row.get("workload") */ __pyx_t_3 = __pyx_v_row; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_release_version}; __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_release_version, __pyx_t_15) < (0)) __PYX_ERR(0, 3976, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3977 * host.broadcast_rpc_port = _NodeInfo.get_broadcast_rpc_port(row) * host.release_version = row.get("release_version") * host.dse_version = row.get("dse_version") # <<<<<<<<<<<<<< * host.dse_workload = row.get("workload") * host.dse_workloads = row.get("workloads") */ __pyx_t_3 = __pyx_v_row; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dse_version}; __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_version, __pyx_t_15) < (0)) __PYX_ERR(0, 3977, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3978 * host.release_version = row.get("release_version") * host.dse_version = row.get("dse_version") * host.dse_workload = row.get("workload") # <<<<<<<<<<<<<< * host.dse_workloads = row.get("workloads") * */ __pyx_t_3 = __pyx_v_row; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_workload}; __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3978, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_workload, __pyx_t_15) < (0)) __PYX_ERR(0, 3978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3979 * host.dse_version = row.get("dse_version") * host.dse_workload = row.get("workload") * host.dse_workloads = row.get("workloads") # <<<<<<<<<<<<<< * * tokens = row.get("tokens", None) */ __pyx_t_3 = __pyx_v_row; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_n_u_workloads}; __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_dse_workloads, __pyx_t_15) < (0)) __PYX_ERR(0, 3979, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3981 * host.dse_workloads = row.get("workloads") * * tokens = row.get("tokens", None) # <<<<<<<<<<<<<< * if partitioner and tokens and self._token_meta_enabled: * token_map[host] = tokens */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_row, __pyx_mstate_global->__pyx_n_u_get); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_mstate_global->__pyx_tuple[2], NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF_SET(__pyx_v_tokens, __pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":3982 * * tokens = row.get("tokens", None) * if partitioner and tokens and self._token_meta_enabled: # <<<<<<<<<<<<<< * token_map[host] = tokens * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_partitioner); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3982, __pyx_L1_error) if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L27_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_tokens); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3982, __pyx_L1_error) if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L27_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_7; __pyx_L27_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":3983 * tokens = row.get("tokens", None) * if partitioner and tokens and self._token_meta_enabled: * token_map[host] = tokens # <<<<<<<<<<<<<< * * for old_host in self._cluster.metadata.all_hosts(): */ if (unlikely((PyDict_SetItem(__pyx_v_token_map, __pyx_v_host, __pyx_v_tokens) < 0))) __PYX_ERR(0, 3983, __pyx_L1_error) /* "cassandra/cluster.py":3982 * * tokens = row.get("tokens", None) * if partitioner and tokens and self._token_meta_enabled: # <<<<<<<<<<<<<< * token_map[host] = tokens * */ } /* "cassandra/cluster.py":3946 * # any new nodes, so we need this additional check. (See PYTHON-90) * should_rebuild_token_map = force_token_rebuild or self._cluster.metadata.partitioner is None * for row in peers_result: # <<<<<<<<<<<<<< * if not self._is_valid_peer(row): * log.warning( */ __pyx_L19_continue:; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3985 * token_map[host] = tokens * * for old_host in self._cluster.metadata.all_hosts(): # <<<<<<<<<<<<<< * if old_host.endpoint.address != connection.endpoint and old_host.endpoint not in found_hosts: * should_rebuild_token_map = True */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_3 = __pyx_t_11; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_all_hosts, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) { __pyx_t_11 = __pyx_t_9; __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { __pyx_t_12 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3985, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_11))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3985, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } __pyx_t_9 = __Pyx_PyList_GetItemRefFast(__pyx_t_11, __pyx_t_12, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_12; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_11); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 3985, __pyx_L1_error) #endif if (__pyx_t_12 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_12)); #else __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_12); #endif ++__pyx_t_12; } if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3985, __pyx_L1_error) } else { __pyx_t_9 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_9)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 3985, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_old_host, __pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3986 * * for old_host in self._cluster.metadata.all_hosts(): * if old_host.endpoint.address != connection.endpoint and old_host.endpoint not in found_hosts: # <<<<<<<<<<<<<< * should_rebuild_token_map = True * log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_old_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_9, Py_NE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L34_bool_binop_done; } __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_old_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_7 = (__Pyx_PySet_ContainsTF(__pyx_t_15, __pyx_v_found_hosts, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3986, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_1 = __pyx_t_7; __pyx_L34_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":3987 * for old_host in self._cluster.metadata.all_hosts(): * if old_host.endpoint.address != connection.endpoint and old_host.endpoint not in found_hosts: * should_rebuild_token_map = True # <<<<<<<<<<<<<< * log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) * self._cluster.remove_host(old_host) */ __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_should_rebuild_token_map, Py_True); /* "cassandra/cluster.py":3988 * if old_host.endpoint.address != connection.endpoint and old_host.endpoint not in found_hosts: * should_rebuild_token_map = True * log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) # <<<<<<<<<<<<<< * self._cluster.remove_host(old_host) * */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_control_connection_Removing_hos, __pyx_v_old_host}; __pyx_t_15 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3989 * should_rebuild_token_map = True * log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) * self._cluster.remove_host(old_host) # <<<<<<<<<<<<<< * * log.debug("[control connection] Finished fetching ring info") */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __pyx_t_9; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_old_host}; __pyx_t_15 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_remove_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; /* "cassandra/cluster.py":3986 * * for old_host in self._cluster.metadata.all_hosts(): * if old_host.endpoint.address != connection.endpoint and old_host.endpoint not in found_hosts: # <<<<<<<<<<<<<< * should_rebuild_token_map = True * log.debug("[control connection] Removing host not found in peers metadata: %r", old_host) */ } /* "cassandra/cluster.py":3985 * token_map[host] = tokens * * for old_host in self._cluster.metadata.all_hosts(): # <<<<<<<<<<<<<< * if old_host.endpoint.address != connection.endpoint and old_host.endpoint not in found_hosts: * should_rebuild_token_map = True */ } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3991 * self._cluster.remove_host(old_host) * * log.debug("[control connection] Finished fetching ring info") # <<<<<<<<<<<<<< * if partitioner and should_rebuild_token_map: * log.debug("[control connection] Rebuilding token map due to topology changes") */ __pyx_t_15 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_15); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_mstate_global->__pyx_kp_u_control_connection_Finished_fet}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3992 * * log.debug("[control connection] Finished fetching ring info") * if partitioner and should_rebuild_token_map: # <<<<<<<<<<<<<< * log.debug("[control connection] Rebuilding token map due to topology changes") * self._cluster.metadata.rebuild_token_map(partitioner, token_map) */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_partitioner); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3992, __pyx_L1_error) if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L38_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_should_rebuild_token_map); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3992, __pyx_L1_error) __pyx_t_1 = __pyx_t_7; __pyx_L38_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":3993 * log.debug("[control connection] Finished fetching ring info") * if partitioner and should_rebuild_token_map: * log.debug("[control connection] Rebuilding token map due to topology changes") # <<<<<<<<<<<<<< * self._cluster.metadata.rebuild_token_map(partitioner, token_map) * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_control_connection_Rebuilding_t}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3993, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3994 * if partitioner and should_rebuild_token_map: * log.debug("[control connection] Rebuilding token map due to topology changes") * self._cluster.metadata.rebuild_token_map(partitioner, token_map) # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __pyx_t_15; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_partitioner, __pyx_v_token_map}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_rebuild_token_map, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3992 * * log.debug("[control connection] Finished fetching ring info") * if partitioner and should_rebuild_token_map: # <<<<<<<<<<<<<< * log.debug("[control connection] Rebuilding token map due to topology changes") * self._cluster.metadata.rebuild_token_map(partitioner, token_map) */ } /* "cassandra/cluster.py":3862 * return False * * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, # <<<<<<<<<<<<<< * force_token_rebuild=False): * if preloaded_results: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __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_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._refresh_node_list_and_token_map", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_peers_result); __Pyx_XDECREF(__pyx_v_local_result); __Pyx_XDECREF(__pyx_v_cl); __Pyx_XDECREF(__pyx_v_sel_peers); __Pyx_XDECREF(__pyx_v_sel_local); __Pyx_XDECREF(__pyx_v_peers_query); __Pyx_XDECREF(__pyx_v_local_query); __Pyx_XDECREF(__pyx_v_partitioner); __Pyx_XDECREF(__pyx_v_token_map); __Pyx_XDECREF(__pyx_v_found_hosts); __Pyx_XDECREF(__pyx_v_local_rows); __Pyx_XDECREF(__pyx_v_local_row); __Pyx_XDECREF(__pyx_v_cluster_name); __Pyx_XDECREF(__pyx_v_tokens); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_datacenter); __Pyx_XDECREF(__pyx_v_rack); __Pyx_XDECREF(__pyx_v_local_rpc_address_query); __Pyx_XDECREF(__pyx_v_success); __Pyx_XDECREF(__pyx_v_local_rpc_address_result); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF(__pyx_v_should_rebuild_token_map); __Pyx_XDECREF(__pyx_v_endpoint); __Pyx_XDECREF(__pyx_v__); __Pyx_XDECREF(__pyx_v_old_host); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":3996 * self._cluster.metadata.rebuild_token_map(partitioner, token_map) * * @staticmethod # <<<<<<<<<<<<<< * def _is_valid_peer(row): * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_29_is_valid_peer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_29_is_valid_peer = {"_is_valid_peer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_29_is_valid_peer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_29_is_valid_peer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_row = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_is_valid_peer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_row,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 3996, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3996, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_is_valid_peer", 0) < (0)) __PYX_ERR(0, 3996, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_is_valid_peer", 1, 1, 1, i); __PYX_ERR(0, 3996, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 3996, __pyx_L3_error) } __pyx_v_row = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_is_valid_peer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 3996, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._is_valid_peer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_28_is_valid_peer(__pyx_self, __pyx_v_row); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_28_is_valid_peer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_row) { 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_is_valid_peer", 0); /* "cassandra/cluster.py":3998 * @staticmethod * def _is_valid_peer(row): * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and # <<<<<<<<<<<<<< * row.get("data_center") and row.get("rack") and * ('tokens' not in row or row.get('tokens'))) */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NodeInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_get_broadcast_rpc_address); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_row}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L3_bool_binop_done; } __pyx_t_5 = __pyx_v_row; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_host_id}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L3_bool_binop_done; } /* "cassandra/cluster.py":3999 * def _is_valid_peer(row): * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and * row.get("data_center") and row.get("rack") and # <<<<<<<<<<<<<< * ('tokens' not in row or row.get('tokens'))) * */ __pyx_t_5 = __pyx_v_row; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_data_center}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L3_bool_binop_done; } __pyx_t_5 = __pyx_v_row; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_rack}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 3999, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L3_bool_binop_done; } /* "cassandra/cluster.py":4000 * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and * row.get("data_center") and row.get("rack") and * ('tokens' not in row or row.get('tokens'))) # <<<<<<<<<<<<<< * * def _update_location_info(self, host, datacenter, rack): */ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_mstate_global->__pyx_n_u_tokens, __pyx_v_row, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4000, __pyx_L1_error) if (!__pyx_t_7) { } else { __pyx_t_1 = __pyx_t_7; goto __pyx_L3_bool_binop_done; } __pyx_t_5 = __pyx_v_row; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_n_u_tokens}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4000, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_7; __pyx_L3_bool_binop_done:; /* "cassandra/cluster.py":3998 * @staticmethod * def _is_valid_peer(row): * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and # <<<<<<<<<<<<<< * row.get("data_center") and row.get("rack") and * ('tokens' not in row or row.get('tokens'))) */ __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3998, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":3996 * self._cluster.metadata.rebuild_token_map(partitioner, token_map) * * @staticmethod # <<<<<<<<<<<<<< * def _is_valid_peer(row): * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and */ /* 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("cassandra.cluster.ControlConnection._is_valid_peer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4002 * ('tokens' not in row or row.get('tokens'))) * * def _update_location_info(self, host, datacenter, rack): # <<<<<<<<<<<<<< * if host.datacenter == datacenter and host.rack == rack: * return False */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_31_update_location_info(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_31_update_location_info = {"_update_location_info", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_31_update_location_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_31_update_location_info(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_datacenter = 0; PyObject *__pyx_v_rack = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_update_location_info (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_datacenter,&__pyx_mstate_global->__pyx_n_u_rack,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4002, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4002, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_update_location_info", 0) < (0)) __PYX_ERR(0, 4002, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_update_location_info", 1, 4, 4, i); __PYX_ERR(0, 4002, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4002, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4002, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4002, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4002, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_datacenter = values[2]; __pyx_v_rack = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_update_location_info", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 4002, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._update_location_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_30_update_location_info(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_datacenter, __pyx_v_rack); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_30_update_location_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_datacenter, PyObject *__pyx_v_rack) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_update_location_info", 0); /* "cassandra/cluster.py":4003 * * def _update_location_info(self, host, datacenter, rack): * if host.datacenter == datacenter and host.rack == rack: # <<<<<<<<<<<<<< * return False * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_datacenter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_datacenter, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4003, __pyx_L1_error) __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(0, 4003, __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; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_rack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_rack, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4003, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4003, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":4004 * def _update_location_info(self, host, datacenter, rack): * if host.datacenter == datacenter and host.rack == rack: * return False # <<<<<<<<<<<<<< * * # If the dc/rack information changes, we need to update the load balancing policy. */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":4003 * * def _update_location_info(self, host, datacenter, rack): * if host.datacenter == datacenter and host.rack == rack: # <<<<<<<<<<<<<< * return False * */ } /* "cassandra/cluster.py":4009 * # For that, we remove and re-add the node against the policy. Not the most elegant, and assumes * # that the policy will update correctly, but in practice this should work. * self._cluster.profile_manager.on_down(host) # <<<<<<<<<<<<<< * host.set_location_info(datacenter, rack) * self._cluster.profile_manager.on_up(host) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4010 * # that the policy will update correctly, but in practice this should work. * self._cluster.profile_manager.on_down(host) * host.set_location_info(datacenter, rack) # <<<<<<<<<<<<<< * self._cluster.profile_manager.on_up(host) * return True */ __pyx_t_6 = __pyx_v_host; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_datacenter, __pyx_v_rack}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_location_info, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4011 * self._cluster.profile_manager.on_down(host) * host.set_location_info(datacenter, rack) * self._cluster.profile_manager.on_up(host) # <<<<<<<<<<<<<< * return True * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_profile_manager); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_up, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4012 * host.set_location_info(datacenter, rack) * self._cluster.profile_manager.on_up(host) * return True # <<<<<<<<<<<<<< * * def _delay_for_event_type(self, event_type, delay_window): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "cassandra/cluster.py":4002 * ('tokens' not in row or row.get('tokens'))) * * def _update_location_info(self, host, datacenter, rack): # <<<<<<<<<<<<<< * if host.datacenter == datacenter and host.rack == rack: * return False */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._update_location_info", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4014 * return True * * def _delay_for_event_type(self, event_type, delay_window): # <<<<<<<<<<<<<< * # this serves to order processing correlated events (received within the window) * # the window and randomization still have the desired effect of skew across client instances */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_33_delay_for_event_type(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_33_delay_for_event_type = {"_delay_for_event_type", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_33_delay_for_event_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_33_delay_for_event_type(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_event_type = 0; PyObject *__pyx_v_delay_window = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_delay_for_event_type (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_event_type,&__pyx_mstate_global->__pyx_n_u_delay_window,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4014, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4014, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4014, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4014, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_delay_for_event_type", 0) < (0)) __PYX_ERR(0, 4014, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_delay_for_event_type", 1, 3, 3, i); __PYX_ERR(0, 4014, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4014, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4014, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4014, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_event_type = values[1]; __pyx_v_delay_window = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_delay_for_event_type", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4014, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._delay_for_event_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_32_delay_for_event_type(__pyx_self, __pyx_v_self, __pyx_v_event_type, __pyx_v_delay_window); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_32_delay_for_event_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event_type, PyObject *__pyx_v_delay_window) { PyObject *__pyx_v_next_time = NULL; PyObject *__pyx_v_now = NULL; PyObject *__pyx_v_this_time = NULL; PyObject *__pyx_v_delay = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_delay_for_event_type", 0); /* "cassandra/cluster.py":4017 * # this serves to order processing correlated events (received within the window) * # the window and randomization still have the desired effect of skew across client instances * next_time = self._event_schedule_times.get(event_type, 0) # <<<<<<<<<<<<<< * now = self._time.time() * if now <= next_time: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_schedule_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_event_type, __pyx_mstate_global->__pyx_int_0}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_next_time = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4018 * # the window and randomization still have the desired effect of skew across client instances * next_time = self._event_schedule_times.get(event_type, 0) * now = self._time.time() # <<<<<<<<<<<<<< * if now <= next_time: * this_time = next_time + 0.01 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_now = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4019 * next_time = self._event_schedule_times.get(event_type, 0) * now = self._time.time() * if now <= next_time: # <<<<<<<<<<<<<< * this_time = next_time + 0.01 * delay = this_time - now */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_now, __pyx_v_next_time, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4019, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4019, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":4020 * now = self._time.time() * if now <= next_time: * this_time = next_time + 0.01 # <<<<<<<<<<<<<< * delay = this_time - now * else: */ __pyx_t_1 = __Pyx_PyFloat_AddObjC(__pyx_v_next_time, __pyx_mstate_global->__pyx_float_0_01, 0.01, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_this_time = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4021 * if now <= next_time: * this_time = next_time + 0.01 * delay = this_time - now # <<<<<<<<<<<<<< * else: * delay = random() * delay_window */ __pyx_t_1 = PyNumber_Subtract(__pyx_v_this_time, __pyx_v_now); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4021, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_delay = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4019 * next_time = self._event_schedule_times.get(event_type, 0) * now = self._time.time() * if now <= next_time: # <<<<<<<<<<<<<< * this_time = next_time + 0.01 * delay = this_time - now */ goto __pyx_L3; } /* "cassandra/cluster.py":4023 * delay = this_time - now * else: * delay = random() * delay_window # <<<<<<<<<<<<<< * this_time = now + delay * self._event_schedule_times[event_type] = this_time */ /*else*/ { __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_random); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_v_delay_window); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_delay = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4024 * else: * delay = random() * delay_window * this_time = now + delay # <<<<<<<<<<<<<< * self._event_schedule_times[event_type] = this_time * return delay */ __pyx_t_3 = PyNumber_Add(__pyx_v_now, __pyx_v_delay); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_this_time = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L3:; /* "cassandra/cluster.py":4025 * delay = random() * delay_window * this_time = now + delay * self._event_schedule_times[event_type] = this_time # <<<<<<<<<<<<<< * return delay * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_schedule_times); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_event_type, __pyx_v_this_time) < 0))) __PYX_ERR(0, 4025, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4026 * this_time = now + delay * self._event_schedule_times[event_type] = this_time * return delay # <<<<<<<<<<<<<< * * def _refresh_nodes_if_not_up(self, host): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_delay); __pyx_r = __pyx_v_delay; goto __pyx_L0; /* "cassandra/cluster.py":4014 * return True * * def _delay_for_event_type(self, event_type, delay_window): # <<<<<<<<<<<<<< * # this serves to order processing correlated events (received within the window) * # the window and randomization still have the desired effect of skew across client instances */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._delay_for_event_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_next_time); __Pyx_XDECREF(__pyx_v_now); __Pyx_XDECREF(__pyx_v_this_time); __Pyx_XDECREF(__pyx_v_delay); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4028 * return delay * * def _refresh_nodes_if_not_up(self, host): # <<<<<<<<<<<<<< * """ * Used to mitigate refreshes for nodes that are already known. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_35_refresh_nodes_if_not_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_17ControlConnection_34_refresh_nodes_if_not_up, "\n Used to mitigate refreshes for nodes that are already known.\n Some versions of the server send superfluous NEW_NODE messages in addition to UP events.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_35_refresh_nodes_if_not_up = {"_refresh_nodes_if_not_up", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_35_refresh_nodes_if_not_up, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_17ControlConnection_34_refresh_nodes_if_not_up}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_35_refresh_nodes_if_not_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_refresh_nodes_if_not_up (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4028, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4028, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4028, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_refresh_nodes_if_not_up", 0) < (0)) __PYX_ERR(0, 4028, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_refresh_nodes_if_not_up", 1, 2, 2, i); __PYX_ERR(0, 4028, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4028, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4028, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_refresh_nodes_if_not_up", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4028, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._refresh_nodes_if_not_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_34_refresh_nodes_if_not_up(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_34_refresh_nodes_if_not_up(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { 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; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_refresh_nodes_if_not_up", 0); /* "cassandra/cluster.py":4033 * Some versions of the server send superfluous NEW_NODE messages in addition to UP events. * """ * if not host or not host.is_up: # <<<<<<<<<<<<<< * self.refresh_node_list_and_token_map() * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_host); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4033, __pyx_L1_error) __pyx_t_3 = (!__pyx_t_2); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4033, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4033, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = (!__pyx_t_3); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":4034 * """ * if not host or not host.is_up: * self.refresh_node_list_and_token_map() # <<<<<<<<<<<<<< * * def _handle_topology_change(self, event): */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4033 * Some versions of the server send superfluous NEW_NODE messages in addition to UP events. * """ * if not host or not host.is_up: # <<<<<<<<<<<<<< * self.refresh_node_list_and_token_map() * */ } /* "cassandra/cluster.py":4028 * return delay * * def _refresh_nodes_if_not_up(self, host): # <<<<<<<<<<<<<< * """ * Used to mitigate refreshes for nodes that are already known. */ /* 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("cassandra.cluster.ControlConnection._refresh_nodes_if_not_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4036 * self.refresh_node_list_and_token_map() * * def _handle_topology_change(self, event): # <<<<<<<<<<<<<< * change_type = event["change_type"] * addr, port = event["address"] */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_37_handle_topology_change(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_37_handle_topology_change = {"_handle_topology_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_37_handle_topology_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_37_handle_topology_change(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_event = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handle_topology_change (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_event,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4036, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4036, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4036, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_topology_change", 0) < (0)) __PYX_ERR(0, 4036, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_topology_change", 1, 2, 2, i); __PYX_ERR(0, 4036, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4036, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4036, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_event = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_handle_topology_change", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4036, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._handle_topology_change", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_36_handle_topology_change(__pyx_self, __pyx_v_self, __pyx_v_event); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_36_handle_topology_change(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event) { PyObject *__pyx_v_change_type = NULL; PyObject *__pyx_v_addr = NULL; PyObject *__pyx_v_port = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_delay = 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; PyObject *(*__pyx_t_5)(PyObject *); size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_handle_topology_change", 0); /* "cassandra/cluster.py":4037 * * def _handle_topology_change(self, event): * change_type = event["change_type"] # <<<<<<<<<<<<<< * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) */ __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_event, __pyx_mstate_global->__pyx_n_u_change_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_change_type = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4038 * def _handle_topology_change(self, event): * change_type = event["change_type"] * addr, port = event["address"] # <<<<<<<<<<<<<< * host = self._cluster.metadata.get_host(addr, port) * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": */ __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_event, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4038, __pyx_L1_error) __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(0, 4038, __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_INCREF(__pyx_t_2); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4038, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4038, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 4038, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4038, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_addr = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_port = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4039 * change_type = event["change_type"] * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) # <<<<<<<<<<<<<< * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": * if self._topology_event_refresh_window >= 0: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_addr, __pyx_v_port}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_host = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4040 * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": # <<<<<<<<<<<<<< * if self._topology_event_refresh_window >= 0: * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) */ __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_change_type, __pyx_mstate_global->__pyx_n_u_NEW_NODE, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4040, __pyx_L1_error) if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L6_bool_binop_done; } __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_change_type, __pyx_mstate_global->__pyx_n_u_MOVED_NODE, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4040, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L6_bool_binop_done:; if (__pyx_t_7) { /* "cassandra/cluster.py":4041 * host = self._cluster.metadata.get_host(addr, port) * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": * if self._topology_event_refresh_window >= 0: # <<<<<<<<<<<<<< * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4041, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":4042 * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": * if self._topology_event_refresh_window >= 0: * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) # <<<<<<<<<<<<<< * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) * elif change_type == "REMOVED_NODE": */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_topology_change, __pyx_t_3}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_delay_for_event_type, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_delay = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4043 * if self._topology_event_refresh_window >= 0: * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) # <<<<<<<<<<<<<< * elif change_type == "REMOVED_NODE": * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_refresh_nodes_if_not_up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_delay, __pyx_t_1, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_schedule_unique, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4041 * host = self._cluster.metadata.get_host(addr, port) * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": * if self._topology_event_refresh_window >= 0: # <<<<<<<<<<<<<< * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) */ } /* "cassandra/cluster.py":4040 * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) * if change_type == "NEW_NODE" or change_type == "MOVED_NODE": # <<<<<<<<<<<<<< * if self._topology_event_refresh_window >= 0: * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) */ goto __pyx_L5; } /* "cassandra/cluster.py":4044 * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) * elif change_type == "REMOVED_NODE": # <<<<<<<<<<<<<< * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) * */ __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_change_type, __pyx_mstate_global->__pyx_n_u_REMOVED_NODE, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4044, __pyx_L1_error) if (__pyx_t_7) { /* "cassandra/cluster.py":4045 * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) * elif change_type == "REMOVED_NODE": * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) # <<<<<<<<<<<<<< * * def _handle_status_change(self, event): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_remove_host); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_int_0, __pyx_t_9, __pyx_v_host}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_schedule_unique, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4044 * delay = self._delay_for_event_type('topology_change', self._topology_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self._refresh_nodes_if_not_up, host) * elif change_type == "REMOVED_NODE": # <<<<<<<<<<<<<< * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) * */ } __pyx_L5:; /* "cassandra/cluster.py":4036 * self.refresh_node_list_and_token_map() * * def _handle_topology_change(self, event): # <<<<<<<<<<<<<< * change_type = event["change_type"] * addr, port = event["address"] */ /* 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_9); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._handle_topology_change", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_change_type); __Pyx_XDECREF(__pyx_v_addr); __Pyx_XDECREF(__pyx_v_port); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_delay); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4047 * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) * * def _handle_status_change(self, event): # <<<<<<<<<<<<<< * change_type = event["change_type"] * addr, port = event["address"] */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_39_handle_status_change(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_39_handle_status_change = {"_handle_status_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_39_handle_status_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_39_handle_status_change(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_event = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handle_status_change (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_event,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4047, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4047, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4047, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_status_change", 0) < (0)) __PYX_ERR(0, 4047, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_status_change", 1, 2, 2, i); __PYX_ERR(0, 4047, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4047, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4047, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_event = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_handle_status_change", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4047, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._handle_status_change", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_38_handle_status_change(__pyx_self, __pyx_v_self, __pyx_v_event); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_38_handle_status_change(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event) { PyObject *__pyx_v_change_type = NULL; PyObject *__pyx_v_addr = NULL; PyObject *__pyx_v_port = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_delay = 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; PyObject *(*__pyx_t_5)(PyObject *); size_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_handle_status_change", 0); /* "cassandra/cluster.py":4048 * * def _handle_status_change(self, event): * change_type = event["change_type"] # <<<<<<<<<<<<<< * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) */ __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_event, __pyx_mstate_global->__pyx_n_u_change_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_change_type = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4049 * def _handle_status_change(self, event): * change_type = event["change_type"] * addr, port = event["address"] # <<<<<<<<<<<<<< * host = self._cluster.metadata.get_host(addr, port) * if change_type == "UP": */ __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_event, __pyx_mstate_global->__pyx_n_u_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4049, __pyx_L1_error) __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(0, 4049, __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_INCREF(__pyx_t_2); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_3); } #else __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 4049, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4049, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_addr = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_port = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4050 * change_type = event["change_type"] * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) # <<<<<<<<<<<<<< * if change_type == "UP": * delay = self._delay_for_event_type('status_change', self._status_event_refresh_window) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_addr, __pyx_v_port}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_host = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4051 * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) * if change_type == "UP": # <<<<<<<<<<<<<< * delay = self._delay_for_event_type('status_change', self._status_event_refresh_window) * if host is None: */ __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_change_type, __pyx_mstate_global->__pyx_n_u_UP, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4051, __pyx_L1_error) if (__pyx_t_7) { /* "cassandra/cluster.py":4052 * host = self._cluster.metadata.get_host(addr, port) * if change_type == "UP": * delay = self._delay_for_event_type('status_change', self._status_event_refresh_window) # <<<<<<<<<<<<<< * if host is None: * # this is the first time we've seen the node */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_status_event_refresh_window_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_status_change, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_delay_for_event_type, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_delay = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4053 * if change_type == "UP": * delay = self._delay_for_event_type('status_change', self._status_event_refresh_window) * if host is None: # <<<<<<<<<<<<<< * # this is the first time we've seen the node * self._cluster.scheduler.schedule_unique(delay, self.refresh_node_list_and_token_map) */ __pyx_t_7 = (__pyx_v_host == Py_None); if (__pyx_t_7) { /* "cassandra/cluster.py":4055 * if host is None: * # this is the first time we've seen the node * self._cluster.scheduler.schedule_unique(delay, self.refresh_node_list_and_token_map) # <<<<<<<<<<<<<< * else: * self._cluster.scheduler.schedule_unique(delay, self._cluster.on_up, host) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_delay, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_schedule_unique, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4053 * if change_type == "UP": * delay = self._delay_for_event_type('status_change', self._status_event_refresh_window) * if host is None: # <<<<<<<<<<<<<< * # this is the first time we've seen the node * self._cluster.scheduler.schedule_unique(delay, self.refresh_node_list_and_token_map) */ goto __pyx_L6; } /* "cassandra/cluster.py":4057 * self._cluster.scheduler.schedule_unique(delay, self.refresh_node_list_and_token_map) * else: * self._cluster.scheduler.schedule_unique(delay, self._cluster.on_up, host) # <<<<<<<<<<<<<< * elif change_type == "DOWN": * # Note that there is a slight risk we can receive the event late and thus */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_on_up); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_delay, __pyx_t_8, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_schedule_unique, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L6:; /* "cassandra/cluster.py":4051 * addr, port = event["address"] * host = self._cluster.metadata.get_host(addr, port) * if change_type == "UP": # <<<<<<<<<<<<<< * delay = self._delay_for_event_type('status_change', self._status_event_refresh_window) * if host is None: */ goto __pyx_L5; } /* "cassandra/cluster.py":4058 * else: * self._cluster.scheduler.schedule_unique(delay, self._cluster.on_up, host) * elif change_type == "DOWN": # <<<<<<<<<<<<<< * # Note that there is a slight risk we can receive the event late and thus * # mark the host down even though we already had reconnected successfully. */ __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_change_type, __pyx_mstate_global->__pyx_n_u_DOWN, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4058, __pyx_L1_error) if (__pyx_t_7) { /* "cassandra/cluster.py":4063 * # This is unlikely, and will not have much consequence because we'll try reconnecting * # right away, so we favor the detection to make the Host.is_up more accurate. * if host is not None: # <<<<<<<<<<<<<< * # this will be run by the scheduler * self._cluster.on_down(host, is_host_addition=False) */ __pyx_t_7 = (__pyx_v_host != Py_None); if (__pyx_t_7) { /* "cassandra/cluster.py":4065 * if host is not None: * # this will be run by the scheduler * self._cluster.on_down(host, is_host_addition=False) # <<<<<<<<<<<<<< * * def _handle_schema_change(self, event): */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __pyx_t_8; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_host}; __pyx_t_2 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_False, __pyx_t_2, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4065, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_on_down, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4063 * # This is unlikely, and will not have much consequence because we'll try reconnecting * # right away, so we favor the detection to make the Host.is_up more accurate. * if host is not None: # <<<<<<<<<<<<<< * # this will be run by the scheduler * self._cluster.on_down(host, is_host_addition=False) */ } /* "cassandra/cluster.py":4058 * else: * self._cluster.scheduler.schedule_unique(delay, self._cluster.on_up, host) * elif change_type == "DOWN": # <<<<<<<<<<<<<< * # Note that there is a slight risk we can receive the event late and thus * # mark the host down even though we already had reconnected successfully. */ } __pyx_L5:; /* "cassandra/cluster.py":4047 * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) * * def _handle_status_change(self, event): # <<<<<<<<<<<<<< * change_type = event["change_type"] * addr, port = event["address"] */ /* 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_8); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._handle_status_change", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_change_type); __Pyx_XDECREF(__pyx_v_addr); __Pyx_XDECREF(__pyx_v_port); __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_delay); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4067 * self._cluster.on_down(host, is_host_addition=False) * * def _handle_schema_change(self, event): # <<<<<<<<<<<<<< * if self._schema_event_refresh_window < 0: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_41_handle_schema_change(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_41_handle_schema_change = {"_handle_schema_change", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_41_handle_schema_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_41_handle_schema_change(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_event = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handle_schema_change (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_event,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4067, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4067, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4067, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_schema_change", 0) < (0)) __PYX_ERR(0, 4067, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_schema_change", 1, 2, 2, i); __PYX_ERR(0, 4067, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4067, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4067, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_event = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_handle_schema_change", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4067, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._handle_schema_change", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_40_handle_schema_change(__pyx_self, __pyx_v_self, __pyx_v_event); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_40_handle_schema_change(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_event) { PyObject *__pyx_v_delay = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_handle_schema_change", 0); /* "cassandra/cluster.py":4068 * * def _handle_schema_change(self, event): * if self._schema_event_refresh_window < 0: # <<<<<<<<<<<<<< * return * delay = self._delay_for_event_type('schema_change', self._schema_event_refresh_window) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":4069 * def _handle_schema_change(self, event): * if self._schema_event_refresh_window < 0: * return # <<<<<<<<<<<<<< * delay = self._delay_for_event_type('schema_change', self._schema_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self.refresh_schema, **event) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4068 * * def _handle_schema_change(self, event): * if self._schema_event_refresh_window < 0: # <<<<<<<<<<<<<< * return * delay = self._delay_for_event_type('schema_change', self._schema_event_refresh_window) */ } /* "cassandra/cluster.py":4070 * if self._schema_event_refresh_window < 0: * return * delay = self._delay_for_event_type('schema_change', self._schema_event_refresh_window) # <<<<<<<<<<<<<< * self._cluster.scheduler.schedule_unique(delay, self.refresh_schema, **event) * */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_schema_change, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_delay_for_event_type, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_delay = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":4071 * return * delay = self._delay_for_event_type('schema_change', self._schema_event_refresh_window) * self._cluster.scheduler.schedule_unique(delay, self.refresh_schema, **event) # <<<<<<<<<<<<<< * * def wait_for_schema_agreement(self, connection=None, preloaded_results=None, wait_time=None): */ __pyx_t_4 = NULL; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_scheduler); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_schedule_unique); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_refresh_schema); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_event == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4071, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_v_event))) { __pyx_t_7 = PyDict_Copy(__pyx_v_event); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } else { __pyx_t_7 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_event); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_delay, __pyx_t_6}; __pyx_t_2 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4067 * self._cluster.on_down(host, is_host_addition=False) * * def _handle_schema_change(self, event): # <<<<<<<<<<<<<< * if self._schema_event_refresh_window < 0: * return */ /* 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_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._handle_schema_change", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_delay); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4073 * self._cluster.scheduler.schedule_unique(delay, self.refresh_schema, **event) * * def wait_for_schema_agreement(self, connection=None, preloaded_results=None, wait_time=None): # <<<<<<<<<<<<<< * * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_43wait_for_schema_agreement(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_43wait_for_schema_agreement = {"wait_for_schema_agreement", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_43wait_for_schema_agreement, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_43wait_for_schema_agreement(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_preloaded_results = 0; PyObject *__pyx_v_wait_time = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("wait_for_schema_agreement (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_preloaded_results,&__pyx_mstate_global->__pyx_n_u_wait_time,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4073, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "wait_for_schema_agreement", 0) < (0)) __PYX_ERR(0, 4073, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("wait_for_schema_agreement", 0, 1, 4, i); __PYX_ERR(0, 4073, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4073, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4073, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_connection = values[1]; __pyx_v_preloaded_results = values[2]; __pyx_v_wait_time = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("wait_for_schema_agreement", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 4073, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.wait_for_schema_agreement", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_42wait_for_schema_agreement(__pyx_self, __pyx_v_self, __pyx_v_connection, __pyx_v_preloaded_results, __pyx_v_wait_time); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_42wait_for_schema_agreement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_preloaded_results, PyObject *__pyx_v_wait_time) { PyObject *__pyx_v_total_timeout = NULL; PyObject *__pyx_v_peers_result = NULL; PyObject *__pyx_v_local_result = NULL; PyObject *__pyx_v_schema_mismatches = NULL; PyObject *__pyx_v_start = NULL; PyObject *__pyx_v_elapsed = NULL; PyObject *__pyx_v_cl = NULL; PyObject *__pyx_v_select_peers_query = NULL; PyObject *__pyx_v_peers_query = NULL; PyObject *__pyx_v_local_query = NULL; PyObject *__pyx_v_timeout = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *(*__pyx_t_16)(PyObject *); int __pyx_t_17; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; int __pyx_t_20; char const *__pyx_t_21; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; PyObject *__pyx_t_27 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("wait_for_schema_agreement", 0); __Pyx_INCREF(__pyx_v_connection); /* "cassandra/cluster.py":4075 * def wait_for_schema_agreement(self, connection=None, preloaded_results=None, wait_time=None): * * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait # <<<<<<<<<<<<<< * if total_timeout <= 0: * return True */ __pyx_t_2 = (__pyx_v_wait_time != Py_None); if (__pyx_t_2) { __Pyx_INCREF(__pyx_v_wait_time); __pyx_t_1 = __pyx_v_wait_time; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_v_total_timeout = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4076 * * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait * if total_timeout <= 0: # <<<<<<<<<<<<<< * return True * */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_total_timeout, __pyx_mstate_global->__pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4076, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4077 * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait * if total_timeout <= 0: * return True # <<<<<<<<<<<<<< * * # Each schema change typically generates two schema refreshes, one */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; /* "cassandra/cluster.py":4076 * * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait * if total_timeout <= 0: # <<<<<<<<<<<<<< * return True * */ } /* "cassandra/cluster.py":4083 * # a lock is just a simple way to cut down on the number of schema queries * # we'll make. * with self._schema_agreement_lock: # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_schema_agreement_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4083, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4083, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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:*/ { /* "cassandra/cluster.py":4084 * # we'll make. * with self._schema_agreement_lock: * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4084, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4084, __pyx_L8_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4085 * with self._schema_agreement_lock: * if self._is_shutdown: * return # <<<<<<<<<<<<<< * * if not connection: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L12_try_return; /* "cassandra/cluster.py":4084 * # we'll make. * with self._schema_agreement_lock: * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":4087 * return * * if not connection: # <<<<<<<<<<<<<< * connection = self._connection * */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_connection); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4087, __pyx_L8_error) __pyx_t_11 = (!__pyx_t_2); if (__pyx_t_11) { /* "cassandra/cluster.py":4088 * * if not connection: * connection = self._connection # <<<<<<<<<<<<<< * * if preloaded_results: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4088, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_connection, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4087 * return * * if not connection: # <<<<<<<<<<<<<< * connection = self._connection * */ } /* "cassandra/cluster.py":4090 * connection = self._connection * * if preloaded_results: # <<<<<<<<<<<<<< * log.debug("[control connection] Attempting to use preloaded results for schema agreement") * */ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_preloaded_results); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 4090, __pyx_L8_error) if (__pyx_t_11) { /* "cassandra/cluster.py":4091 * * if preloaded_results: * log.debug("[control connection] Attempting to use preloaded results for schema agreement") # <<<<<<<<<<<<<< * * peers_result = preloaded_results[0] */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4091, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4091, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Attempting_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4091, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4093 * log.debug("[control connection] Attempting to use preloaded results for schema agreement") * * peers_result = preloaded_results[0] # <<<<<<<<<<<<<< * local_result = preloaded_results[1] * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_preloaded_results, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4093, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_peers_result = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4094 * * peers_result = preloaded_results[0] * local_result = preloaded_results[1] # <<<<<<<<<<<<<< * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_preloaded_results, 1, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4094, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_local_result = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4095 * peers_result = preloaded_results[0] * local_result = preloaded_results[1] * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) # <<<<<<<<<<<<<< * if schema_mismatches is None: * return True */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4095, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_peers_result, __pyx_v_local_result, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_schema_mismatches, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4095, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_schema_mismatches = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4096 * local_result = preloaded_results[1] * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: # <<<<<<<<<<<<<< * return True * */ __pyx_t_11 = (__pyx_v_schema_mismatches == Py_None); if (__pyx_t_11) { /* "cassandra/cluster.py":4097 * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: * return True # <<<<<<<<<<<<<< * * log.debug("[control connection] Waiting for schema agreement") */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L12_try_return; /* "cassandra/cluster.py":4096 * local_result = preloaded_results[1] * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: # <<<<<<<<<<<<<< * return True * */ } /* "cassandra/cluster.py":4090 * connection = self._connection * * if preloaded_results: # <<<<<<<<<<<<<< * log.debug("[control connection] Attempting to use preloaded results for schema agreement") * */ } /* "cassandra/cluster.py":4099 * return True * * log.debug("[control connection] Waiting for schema agreement") # <<<<<<<<<<<<<< * start = self._time.time() * elapsed = 0 */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4099, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4099, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Waiting_for}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4099, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4100 * * log.debug("[control connection] Waiting for schema agreement") * start = self._time.time() # <<<<<<<<<<<<<< * elapsed = 0 * cl = ConsistencyLevel.ONE */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4100, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4100, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_start = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4101 * log.debug("[control connection] Waiting for schema agreement") * start = self._time.time() * elapsed = 0 # <<<<<<<<<<<<<< * cl = ConsistencyLevel.ONE * schema_mismatches = None */ __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __pyx_v_elapsed = __pyx_mstate_global->__pyx_int_0; /* "cassandra/cluster.py":4102 * start = self._time.time() * elapsed = 0 * cl = ConsistencyLevel.ONE # <<<<<<<<<<<<<< * schema_mismatches = None * select_peers_query = self._get_peers_query(self.PeersQueryType.PEERS_SCHEMA, connection) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4102, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4102, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cl = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4103 * elapsed = 0 * cl = ConsistencyLevel.ONE * schema_mismatches = None # <<<<<<<<<<<<<< * select_peers_query = self._get_peers_query(self.PeersQueryType.PEERS_SCHEMA, connection) * */ __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_schema_mismatches, Py_None); /* "cassandra/cluster.py":4104 * cl = ConsistencyLevel.ONE * schema_mismatches = None * select_peers_query = self._get_peers_query(self.PeersQueryType.PEERS_SCHEMA, connection) # <<<<<<<<<<<<<< * * while elapsed < total_timeout: */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4104, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PEERS_SCHEMA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4104, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_3, __pyx_v_connection}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_peers_query, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4104, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_select_peers_query = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4106 * select_peers_query = self._get_peers_query(self.PeersQueryType.PEERS_SCHEMA, connection) * * while elapsed < total_timeout: # <<<<<<<<<<<<<< * peers_query = QueryMessage(query=select_peers_query, consistency_level=cl) * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) */ while (1) { __pyx_t_4 = PyObject_RichCompare(__pyx_v_elapsed, __pyx_v_total_timeout, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4106, __pyx_L8_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 4106, __pyx_L8_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_11) break; /* "cassandra/cluster.py":4107 * * while elapsed < total_timeout: * peers_query = QueryMessage(query=select_peers_query, consistency_level=cl) # <<<<<<<<<<<<<< * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) * try: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4107, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_3, NULL}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4107, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_v_select_peers_query, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4107, __pyx_L8_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_v_cl, __pyx_t_6, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 4107, __pyx_L8_error) __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4107, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_peers_query, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4108 * while elapsed < total_timeout: * peers_query = QueryMessage(query=select_peers_query, consistency_level=cl) * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) # <<<<<<<<<<<<<< * try: * timeout = min(self._timeout, total_timeout - elapsed) */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_QueryMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4108, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_SCHEMA_LOCAL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4108, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, NULL}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4108, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_t_3, __pyx_t_12, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4108, __pyx_L8_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_v_cl, __pyx_t_12, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 4108, __pyx_L8_error) __pyx_t_4 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4108, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_local_query, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4109 * peers_query = QueryMessage(query=select_peers_query, consistency_level=cl) * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) * try: # <<<<<<<<<<<<<< * timeout = min(self._timeout, total_timeout - elapsed) * peers_result, local_result = connection.wait_for_responses( */ { __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:*/ { /* "cassandra/cluster.py":4110 * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) * try: * timeout = min(self._timeout, total_timeout - elapsed) # <<<<<<<<<<<<<< * peers_result, local_result = connection.wait_for_responses( * peers_query, local_query, timeout=timeout) */ __pyx_t_4 = PyNumber_Subtract(__pyx_v_total_timeout, __pyx_v_elapsed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4110, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4110, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4110, __pyx_L20_error) __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 4110, __pyx_L20_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_11) { __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = __pyx_t_4; } else { __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = __pyx_t_6; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF_SET(__pyx_v_timeout, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4111 * try: * timeout = min(self._timeout, total_timeout - elapsed) * peers_result, local_result = connection.wait_for_responses( # <<<<<<<<<<<<<< * peers_query, local_query, timeout=timeout) * except OperationTimedOut as timeout: */ __pyx_t_12 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_12); /* "cassandra/cluster.py":4112 * timeout = min(self._timeout, total_timeout - elapsed) * peers_result, local_result = connection.wait_for_responses( * peers_query, local_query, timeout=timeout) # <<<<<<<<<<<<<< * except OperationTimedOut as timeout: * log.debug("[control connection] Timed out waiting for " */ __pyx_t_7 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_12, __pyx_v_peers_query, __pyx_v_local_query}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_v_timeout, __pyx_t_6, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4111, __pyx_L20_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_wait_for_responses, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); } if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4111, __pyx_L20_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_12); } else { __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_XGOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_XGOTREF(__pyx_t_12); } #else __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4111, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_16 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L28_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_12 = __pyx_t_16(__pyx_t_3); if (unlikely(!__pyx_t_12)) goto __pyx_L28_unpacking_failed; __Pyx_GOTREF(__pyx_t_12); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 4111, __pyx_L20_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L29_unpacking_done; __pyx_L28_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4111, __pyx_L20_error) __pyx_L29_unpacking_done:; } /* "cassandra/cluster.py":4111 * try: * timeout = min(self._timeout, total_timeout - elapsed) * peers_result, local_result = connection.wait_for_responses( # <<<<<<<<<<<<<< * peers_query, local_query, timeout=timeout) * except OperationTimedOut as timeout: */ __Pyx_XDECREF_SET(__pyx_v_peers_result, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_local_result, __pyx_t_12); __pyx_t_12 = 0; /* "cassandra/cluster.py":4109 * peers_query = QueryMessage(query=select_peers_query, consistency_level=cl) * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) * try: # <<<<<<<<<<<<<< * timeout = min(self._timeout, total_timeout - elapsed) * peers_result, local_result = connection.wait_for_responses( */ } __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_L27_try_end; __pyx_L20_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4113 * peers_result, local_result = connection.wait_for_responses( * peers_query, local_query, timeout=timeout) * except OperationTimedOut as timeout: # <<<<<<<<<<<<<< * log.debug("[control connection] Timed out waiting for " * "response during schema agreement check: %s", timeout) */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_12, &__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationTimedOut); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4113, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ErrRestore(__pyx_t_4, __pyx_t_12, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_6 = 0; if (__pyx_t_17) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection.wait_for_schema_agreement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_12, &__pyx_t_4) < 0) __PYX_ERR(0, 4113, __pyx_L22_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_12); __Pyx_XDECREF_SET(__pyx_v_timeout, __pyx_t_12); /*try:*/ { /* "cassandra/cluster.py":4114 * peers_query, local_query, timeout=timeout) * except OperationTimedOut as timeout: * log.debug("[control connection] Timed out waiting for " # <<<<<<<<<<<<<< * "response during schema agreement check: %s", timeout) * elapsed = self._time.time() - start */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4114, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 4114, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; /* "cassandra/cluster.py":4115 * except OperationTimedOut as timeout: * log.debug("[control connection] Timed out waiting for " * "response during schema agreement check: %s", timeout) # <<<<<<<<<<<<<< * elapsed = self._time.time() - start * continue */ __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_19))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_19); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_19); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_19, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_control_connection_Timed_out_wa, __pyx_v_timeout}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_19, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4114, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4116 * log.debug("[control connection] Timed out waiting for " * "response during schema agreement check: %s", timeout) * elapsed = self._time.time() - start # <<<<<<<<<<<<<< * continue * except ConnectionShutdown: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4116, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_19 = __pyx_t_1; __Pyx_INCREF(__pyx_t_19); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_19, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4116, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4116, __pyx_L35_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_elapsed, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4117 * "response during schema agreement check: %s", timeout) * elapsed = self._time.time() - start * continue # <<<<<<<<<<<<<< * except ConnectionShutdown: * if self._is_shutdown: */ goto __pyx_L32_continue; } /* "cassandra/cluster.py":4113 * peers_result, local_result = connection.wait_for_responses( * peers_query, local_query, timeout=timeout) * except OperationTimedOut as timeout: # <<<<<<<<<<<<<< * log.debug("[control connection] Timed out waiting for " * "response during schema agreement check: %s", timeout) */ /*finally:*/ { __pyx_L35_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_26, &__pyx_t_27); if ( unlikely(__Pyx_GetException(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24) < 0)) __Pyx_ErrFetch(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __Pyx_XGOTREF(__pyx_t_27); __pyx_t_17 = __pyx_lineno; __pyx_t_20 = __pyx_clineno; __pyx_t_21 = __pyx_filename; { __Pyx_DECREF(__pyx_v_timeout); __pyx_v_timeout = 0; } __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_XGIVEREF(__pyx_t_27); __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_26, __pyx_t_27); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ErrRestore(__pyx_t_22, __pyx_t_23, __pyx_t_24); __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_20; __pyx_filename = __pyx_t_21; goto __pyx_L22_except_error; } __pyx_L32_continue: { __Pyx_DECREF(__pyx_v_timeout); __pyx_v_timeout = 0; goto __pyx_L30_except_continue; } } __pyx_L30_except_continue:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L26_try_continue; } /* "cassandra/cluster.py":4118 * elapsed = self._time.time() - start * continue * except ConnectionShutdown: # <<<<<<<<<<<<<< * if self._is_shutdown: * log.debug("[control connection] Aborting wait for schema match due to shutdown") */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_12, &__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ConnectionShutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4118, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_20 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_ErrRestore(__pyx_t_4, __pyx_t_12, __pyx_t_6); __pyx_t_4 = 0; __pyx_t_12 = 0; __pyx_t_6 = 0; if (__pyx_t_20) { __Pyx_AddTraceback("cassandra.cluster.ControlConnection.wait_for_schema_agreement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_12, &__pyx_t_4) < 0) __PYX_ERR(0, 4118, __pyx_L22_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_4); /* "cassandra/cluster.py":4119 * continue * except ConnectionShutdown: * if self._is_shutdown: # <<<<<<<<<<<<<< * log.debug("[control connection] Aborting wait for schema match due to shutdown") * return None */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4119, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 4119, __pyx_L22_except_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(__pyx_t_11)) { /* "cassandra/cluster.py":4120 * except ConnectionShutdown: * if self._is_shutdown: * log.debug("[control connection] Aborting wait for schema match due to shutdown") # <<<<<<<<<<<<<< * return None * else: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 4120, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4120, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_18))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_18); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_18); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_18, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_control_connection_Aborting_wai}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_18, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4120, __pyx_L22_except_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4121 * if self._is_shutdown: * log.debug("[control connection] Aborting wait for schema match due to shutdown") * return None # <<<<<<<<<<<<<< * else: * raise */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L23_except_return; /* "cassandra/cluster.py":4119 * continue * except ConnectionShutdown: * if self._is_shutdown: # <<<<<<<<<<<<<< * log.debug("[control connection] Aborting wait for schema match due to shutdown") * return None */ } /* "cassandra/cluster.py":4123 * return None * else: * raise # <<<<<<<<<<<<<< * * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) */ /*else*/ { __Pyx_GIVEREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_12, __pyx_t_4); __pyx_t_6 = 0; __pyx_t_12 = 0; __pyx_t_4 = 0; __PYX_ERR(0, 4123, __pyx_L22_except_error) } } goto __pyx_L22_except_error; /* "cassandra/cluster.py":4109 * peers_query = QueryMessage(query=select_peers_query, consistency_level=cl) * local_query = QueryMessage(query=self._SELECT_SCHEMA_LOCAL, consistency_level=cl) * try: # <<<<<<<<<<<<<< * timeout = min(self._timeout, total_timeout - elapsed) * peers_result, local_result = connection.wait_for_responses( */ __pyx_L22_except_error:; __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_L8_error; __pyx_L26_try_continue:; __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_L18_continue; __pyx_L23_except_return:; __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_L12_try_return; __pyx_L27_try_end:; } /* "cassandra/cluster.py":4125 * raise * * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) # <<<<<<<<<<<<<< * if schema_mismatches is None: * return True */ __pyx_t_12 = __pyx_v_self; __Pyx_INCREF(__pyx_t_12); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4125, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_12, __pyx_v_peers_result, __pyx_v_local_result, __pyx_t_6}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_schema_mismatches, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4125, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF_SET(__pyx_v_schema_mismatches, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4126 * * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: # <<<<<<<<<<<<<< * return True * */ __pyx_t_11 = (__pyx_v_schema_mismatches == Py_None); if (__pyx_t_11) { /* "cassandra/cluster.py":4127 * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: * return True # <<<<<<<<<<<<<< * * log.debug("[control connection] Schemas mismatched, trying again") */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L12_try_return; /* "cassandra/cluster.py":4126 * * schema_mismatches = self._get_schema_mismatches(peers_result, local_result, connection.endpoint) * if schema_mismatches is None: # <<<<<<<<<<<<<< * return True * */ } /* "cassandra/cluster.py":4129 * return True * * log.debug("[control connection] Schemas mismatched, trying again") # <<<<<<<<<<<<<< * self._time.sleep(0.2) * elapsed = self._time.time() - start */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4129, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4129, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_control_connection_Schemas_mism}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4129, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4130 * * log.debug("[control connection] Schemas mismatched, trying again") * self._time.sleep(0.2) # <<<<<<<<<<<<<< * elapsed = self._time.time() - start * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4130, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_float_0_2}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_sleep, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4130, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4131 * log.debug("[control connection] Schemas mismatched, trying again") * self._time.sleep(0.2) * elapsed = self._time.time() - start # <<<<<<<<<<<<<< * * log.warning("Node %s is reporting a schema disagreement: %s", */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_time, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4131, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4131, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_elapsed, __pyx_t_1); __pyx_t_1 = 0; __pyx_L18_continue:; } /* "cassandra/cluster.py":4133 * elapsed = self._time.time() - start * * log.warning("Node %s is reporting a schema disagreement: %s", # <<<<<<<<<<<<<< * connection.endpoint, schema_mismatches) * return False */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4133, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4133, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4134 * * log.warning("Node %s is reporting a schema disagreement: %s", * connection.endpoint, schema_mismatches) # <<<<<<<<<<<<<< * return False * */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4134, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_Node_s_is_reporting_a_schema_dis, __pyx_t_6, __pyx_v_schema_mismatches}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4133, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4135 * log.warning("Node %s is reporting a schema disagreement: %s", * connection.endpoint, schema_mismatches) * return False # <<<<<<<<<<<<<< * * def _get_schema_mismatches(self, peers_result, local_result, local_address): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L12_try_return; /* "cassandra/cluster.py":4083 * # a lock is just a simple way to cut down on the number of schema queries * # we'll make. * with self._schema_agreement_lock: # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ } __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 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("cassandra.cluster.ControlConnection.wait_for_schema_agreement", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_12, &__pyx_t_6) < 0) __PYX_ERR(0, 4083, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_6); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_12, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4083, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4083, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 4083, __pyx_L10_except_error) __pyx_t_2 = (!__pyx_t_11); if (unlikely(__pyx_t_2)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_12, __pyx_t_6); __pyx_t_1 = 0; __pyx_t_12 = 0; __pyx_t_6 = 0; __PYX_ERR(0, 4083, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_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_L12_try_return:; __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_L5_return; __pyx_L9_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); } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_5) { __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } goto __pyx_L7; } __pyx_L5_return: { __pyx_t_10 = __pyx_r; __pyx_r = 0; if (__pyx_t_5) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; } __pyx_L7:; } goto __pyx_L48; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L1_error; __pyx_L48:; } /* "cassandra/cluster.py":4073 * self._cluster.scheduler.schedule_unique(delay, self.refresh_schema, **event) * * def wait_for_schema_agreement(self, connection=None, preloaded_results=None, wait_time=None): # <<<<<<<<<<<<<< * * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait */ /* 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_6); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.wait_for_schema_agreement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_total_timeout); __Pyx_XDECREF(__pyx_v_peers_result); __Pyx_XDECREF(__pyx_v_local_result); __Pyx_XDECREF(__pyx_v_schema_mismatches); __Pyx_XDECREF(__pyx_v_start); __Pyx_XDECREF(__pyx_v_elapsed); __Pyx_XDECREF(__pyx_v_cl); __Pyx_XDECREF(__pyx_v_select_peers_query); __Pyx_XDECREF(__pyx_v_peers_query); __Pyx_XDECREF(__pyx_v_local_query); __Pyx_XDECREF(__pyx_v_timeout); __Pyx_XDECREF(__pyx_v_connection); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4137 * return False * * def _get_schema_mismatches(self, peers_result, local_result, local_address): # <<<<<<<<<<<<<< * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_45_get_schema_mismatches(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_45_get_schema_mismatches = {"_get_schema_mismatches", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_45_get_schema_mismatches, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_45_get_schema_mismatches(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_peers_result = 0; PyObject *__pyx_v_local_result = 0; PyObject *__pyx_v_local_address = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_schema_mismatches (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_peers_result,&__pyx_mstate_global->__pyx_n_u_local_result,&__pyx_mstate_global->__pyx_n_u_local_address,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4137, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4137, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4137, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4137, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4137, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_schema_mismatches", 0) < (0)) __PYX_ERR(0, 4137, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_schema_mismatches", 1, 4, 4, i); __PYX_ERR(0, 4137, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4137, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4137, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4137, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4137, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_peers_result = values[1]; __pyx_v_local_result = values[2]; __pyx_v_local_address = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_schema_mismatches", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 4137, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._get_schema_mismatches", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_44_get_schema_mismatches(__pyx_self, __pyx_v_self, __pyx_v_peers_result, __pyx_v_local_result, __pyx_v_local_address); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":4159 * return None * * return dict((version, list(nodes)) for version, nodes in versions.items()) # <<<<<<<<<<<<<< * * def _get_peers_query(self, peers_query_type, connection=None): */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_17_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 4159, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_2generator8, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ControlConnection__get_schema_mi, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.ControlConnection._get_schema_mismatches.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4159, __pyx_L1_error) __pyx_r = PyDict_New(); if (unlikely(!__pyx_r)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_GOTREF(__pyx_r); __pyx_t_2 = 0; if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 4159, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_genexpr_arg_0 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 4159, __pyx_L1_error) } __pyx_t_5 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_genexpr_arg_0, 0, __pyx_mstate_global->__pyx_n_u_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_version); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_version, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_nodes); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_nodes, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PySequence_List(__pyx_cur_scope->__pyx_v_nodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(PyDict_SetItem(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_version, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4137 * return False * * def _get_schema_mismatches(self, peers_result, local_result, local_address): # <<<<<<<<<<<<<< * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) * */ static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_44_get_schema_mismatches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_peers_result, PyObject *__pyx_v_local_result, PyObject *__pyx_v_local_address) { PyObject *__pyx_v_versions = NULL; PyObject *__pyx_v_local_row = NULL; PyObject *__pyx_v_row = NULL; PyObject *__pyx_v_schema_ver = NULL; PyObject *__pyx_v_endpoint = NULL; PyObject *__pyx_v_peer = NULL; PyObject *__pyx_gb_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_2generator8 = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *(*__pyx_t_9)(PyObject *); int __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_schema_mismatches", 0); __Pyx_INCREF(__pyx_v_peers_result); /* "cassandra/cluster.py":4138 * * def _get_schema_mismatches(self, peers_result, local_result, local_address): * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) # <<<<<<<<<<<<<< * * versions = defaultdict(set) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dict_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_peers_result, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_peers_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_peers_result, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4140 * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) * * versions = defaultdict(set) # <<<<<<<<<<<<<< * if local_result.parsed_rows: * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_defaultdict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)(&PySet_Type))}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_versions = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4141 * * versions = defaultdict(set) * if local_result.parsed_rows: # <<<<<<<<<<<<<< * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] * if local_row.get("schema_version"): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4141, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":4142 * versions = defaultdict(set) * if local_result.parsed_rows: * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] # <<<<<<<<<<<<<< * if local_row.get("schema_version"): * versions[local_row.get("schema_version")].add(local_address) */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_dict_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_result, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_result, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_local_row = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4143 * if local_result.parsed_rows: * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] * if local_row.get("schema_version"): # <<<<<<<<<<<<<< * versions[local_row.get("schema_version")].add(local_address) * */ __pyx_t_1 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_schema_version}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":4144 * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] * if local_row.get("schema_version"): * versions[local_row.get("schema_version")].add(local_address) # <<<<<<<<<<<<<< * * for row in peers_result: */ __pyx_t_4 = __pyx_v_local_row; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_schema_version}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_versions, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_local_address}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4143 * if local_result.parsed_rows: * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] * if local_row.get("schema_version"): # <<<<<<<<<<<<<< * versions[local_row.get("schema_version")].add(local_address) * */ } /* "cassandra/cluster.py":4141 * * versions = defaultdict(set) * if local_result.parsed_rows: # <<<<<<<<<<<<<< * local_row = dict_factory(local_result.column_names, local_result.parsed_rows)[0] * if local_row.get("schema_version"): */ } /* "cassandra/cluster.py":4146 * versions[local_row.get("schema_version")].add(local_address) * * for row in peers_result: # <<<<<<<<<<<<<< * schema_ver = row.get('schema_version') * if not schema_ver: */ if (likely(PyList_CheckExact(__pyx_v_peers_result)) || PyTuple_CheckExact(__pyx_v_peers_result)) { __pyx_t_3 = __pyx_v_peers_result; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_peers_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4146, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4146, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_8, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_8; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4146, __pyx_L1_error) #endif if (__pyx_t_8 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); #endif ++__pyx_t_8; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4146, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_9(__pyx_t_3); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4146, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4147 * * for row in peers_result: * schema_ver = row.get('schema_version') # <<<<<<<<<<<<<< * if not schema_ver: * continue */ __pyx_t_1 = __pyx_v_row; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_n_u_schema_version}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_schema_ver, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4148 * for row in peers_result: * schema_ver = row.get('schema_version') * if not schema_ver: # <<<<<<<<<<<<<< * continue * endpoint = self._cluster.endpoint_factory.create(row) */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_schema_ver); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4148, __pyx_L1_error) __pyx_t_10 = (!__pyx_t_7); if (__pyx_t_10) { /* "cassandra/cluster.py":4149 * schema_ver = row.get('schema_version') * if not schema_ver: * continue # <<<<<<<<<<<<<< * endpoint = self._cluster.endpoint_factory.create(row) * peer = self._cluster.metadata.get_host(endpoint) */ goto __pyx_L5_continue; /* "cassandra/cluster.py":4148 * for row in peers_result: * schema_ver = row.get('schema_version') * if not schema_ver: # <<<<<<<<<<<<<< * continue * endpoint = self._cluster.endpoint_factory.create(row) */ } /* "cassandra/cluster.py":4150 * if not schema_ver: * continue * endpoint = self._cluster.endpoint_factory.create(row) # <<<<<<<<<<<<<< * peer = self._cluster.metadata.get_host(endpoint) * if peer and peer.is_up is not False: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_endpoint_factory); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_row}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_endpoint, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4151 * continue * endpoint = self._cluster.endpoint_factory.create(row) * peer = self._cluster.metadata.get_host(endpoint) # <<<<<<<<<<<<<< * if peer and peer.is_up is not False: * versions[schema_ver].add(endpoint) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_endpoint}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_XDECREF_SET(__pyx_v_peer, __pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4152 * endpoint = self._cluster.endpoint_factory.create(row) * peer = self._cluster.metadata.get_host(endpoint) * if peer and peer.is_up is not False: # <<<<<<<<<<<<<< * versions[schema_ver].add(endpoint) * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_peer); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4152, __pyx_L1_error) if (__pyx_t_7) { } else { __pyx_t_10 = __pyx_t_7; goto __pyx_L9_bool_binop_done; } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_peer, __pyx_mstate_global->__pyx_n_u_is_up); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = (__pyx_t_4 != Py_False); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = __pyx_t_7; __pyx_L9_bool_binop_done:; if (__pyx_t_10) { /* "cassandra/cluster.py":4153 * peer = self._cluster.metadata.get_host(endpoint) * if peer and peer.is_up is not False: * versions[schema_ver].add(endpoint) # <<<<<<<<<<<<<< * * if len(versions) == 1: */ __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_versions, __pyx_v_schema_ver); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_endpoint}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4152 * endpoint = self._cluster.endpoint_factory.create(row) * peer = self._cluster.metadata.get_host(endpoint) * if peer and peer.is_up is not False: # <<<<<<<<<<<<<< * versions[schema_ver].add(endpoint) * */ } /* "cassandra/cluster.py":4146 * versions[local_row.get("schema_version")].add(local_address) * * for row in peers_result: # <<<<<<<<<<<<<< * schema_ver = row.get('schema_version') * if not schema_ver: */ __pyx_L5_continue:; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4155 * versions[schema_ver].add(endpoint) * * if len(versions) == 1: # <<<<<<<<<<<<<< * log.debug("[control connection] Schemas match") * return None */ __pyx_t_8 = PyObject_Length(__pyx_v_versions); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4155, __pyx_L1_error) __pyx_t_10 = (__pyx_t_8 == 1); if (__pyx_t_10) { /* "cassandra/cluster.py":4156 * * if len(versions) == 1: * log.debug("[control connection] Schemas match") # <<<<<<<<<<<<<< * return None * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Schemas_matc}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4157 * if len(versions) == 1: * log.debug("[control connection] Schemas match") * return None # <<<<<<<<<<<<<< * * return dict((version, list(nodes)) for version, nodes in versions.items()) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4155 * versions[schema_ver].add(endpoint) * * if len(versions) == 1: # <<<<<<<<<<<<<< * log.debug("[control connection] Schemas match") * return None */ } /* "cassandra/cluster.py":4159 * return None * * return dict((version, list(nodes)) for version, nodes in versions.items()) # <<<<<<<<<<<<<< * * def _get_peers_query(self, peers_query_type, connection=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_pf_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_genexpr(NULL, __pyx_v_versions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_Generator_GetInlinedResult(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4159, __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; /* "cassandra/cluster.py":4137 * return False * * def _get_schema_mismatches(self, peers_result, local_result, local_address): # <<<<<<<<<<<<<< * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) * */ /* 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("cassandra.cluster.ControlConnection._get_schema_mismatches", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_versions); __Pyx_XDECREF(__pyx_v_local_row); __Pyx_XDECREF(__pyx_v_row); __Pyx_XDECREF(__pyx_v_schema_ver); __Pyx_XDECREF(__pyx_v_endpoint); __Pyx_XDECREF(__pyx_v_peer); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_17ControlConnection_22_get_schema_mismatches_2generator8); __Pyx_XDECREF(__pyx_v_peers_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4161 * return dict((version, list(nodes)) for version, nodes in versions.items()) * * def _get_peers_query(self, peers_query_type, connection=None): # <<<<<<<<<<<<<< * """ * Determine the peers query to use. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_47_get_peers_query(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_17ControlConnection_46_get_peers_query, "\n Determine the peers query to use.\n\n :param peers_query_type: Should be one of PeersQueryType enum.\n\n If _uses_peers_v2 is True, return the proper peers_v2 query (no templating).\n Else, apply the logic below to choose the peers v1 address column name:\n\n Given a connection:\n\n - find the server product version running on the connection's host,\n - use that to choose the column name for the transport address (see APOLLO-1130), and\n - use that column name in the provided peers query template.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_47_get_peers_query = {"_get_peers_query", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_47_get_peers_query, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_17ControlConnection_46_get_peers_query}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_47_get_peers_query(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_peers_query_type = 0; PyObject *__pyx_v_connection = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_peers_query (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_peers_query_type,&__pyx_mstate_global->__pyx_n_u_connection_2,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4161, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_peers_query", 0) < (0)) __PYX_ERR(0, 4161, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_peers_query", 0, 2, 3, i); __PYX_ERR(0, 4161, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4161, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4161, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_peers_query_type = values[1]; __pyx_v_connection = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_peers_query", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4161, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._get_peers_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_46_get_peers_query(__pyx_self, __pyx_v_self, __pyx_v_peers_query_type, __pyx_v_connection); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_46_get_peers_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_peers_query_type, PyObject *__pyx_v_connection) { PyObject *__pyx_v_query = NULL; PyObject *__pyx_v_query_template = NULL; PyObject *__pyx_v_host_release_version = NULL; PyObject *__pyx_v_host_dse_version = NULL; PyObject *__pyx_v_uses_native_address_query = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_peers_query", 0); /* "cassandra/cluster.py":4176 * - use that column name in the provided peers query template. * """ * if peers_query_type not in (self.PeersQueryType.PEERS, self.PeersQueryType.PEERS_SCHEMA): # <<<<<<<<<<<<<< * raise ValueError("Invalid peers query type: %s" % peers_query_type) * */ __Pyx_INCREF(__pyx_v_peers_query_type); __pyx_t_1 = __pyx_v_peers_query_type; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PEERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { } else { __pyx_t_2 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PEERS_SCHEMA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_2; if (unlikely(__pyx_t_5)) { /* "cassandra/cluster.py":4177 * """ * if peers_query_type not in (self.PeersQueryType.PEERS, self.PeersQueryType.PEERS_SCHEMA): * raise ValueError("Invalid peers query type: %s" % peers_query_type) # <<<<<<<<<<<<<< * * if self._uses_peers_v2: */ __pyx_t_3 = NULL; __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Invalid_peers_query_type_s, __pyx_v_peers_query_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4177, __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(0, 4177, __pyx_L1_error) /* "cassandra/cluster.py":4176 * - use that column name in the provided peers query template. * """ * if peers_query_type not in (self.PeersQueryType.PEERS, self.PeersQueryType.PEERS_SCHEMA): # <<<<<<<<<<<<<< * raise ValueError("Invalid peers query type: %s" % peers_query_type) * */ } /* "cassandra/cluster.py":4179 * raise ValueError("Invalid peers query type: %s" % peers_query_type) * * if self._uses_peers_v2: # <<<<<<<<<<<<<< * if peers_query_type == self.PeersQueryType.PEERS: * query = self._SELECT_PEERS_V2 if self._token_meta_enabled else self._SELECT_PEERS_NO_TOKENS_V2 */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_uses_peers_v2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":4180 * * if self._uses_peers_v2: * if peers_query_type == self.PeersQueryType.PEERS: # <<<<<<<<<<<<<< * query = self._SELECT_PEERS_V2 if self._token_meta_enabled else self._SELECT_PEERS_NO_TOKENS_V2 * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PEERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_peers_query_type, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":4181 * if self._uses_peers_v2: * if peers_query_type == self.PeersQueryType.PEERS: * query = self._SELECT_PEERS_V2 if self._token_meta_enabled else self._SELECT_PEERS_NO_TOKENS_V2 # <<<<<<<<<<<<<< * else: * query = self._SELECT_SCHEMA_PEERS_V2 */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4181, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS_V2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } else { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS_NO_TOKENS_V2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_v_query = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4180 * * if self._uses_peers_v2: * if peers_query_type == self.PeersQueryType.PEERS: # <<<<<<<<<<<<<< * query = self._SELECT_PEERS_V2 if self._token_meta_enabled else self._SELECT_PEERS_NO_TOKENS_V2 * else: */ goto __pyx_L7; } /* "cassandra/cluster.py":4183 * query = self._SELECT_PEERS_V2 if self._token_meta_enabled else self._SELECT_PEERS_NO_TOKENS_V2 * else: * query = self._SELECT_SCHEMA_PEERS_V2 # <<<<<<<<<<<<<< * else: * if peers_query_type == self.PeersQueryType.PEERS and self._token_meta_enabled: */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_SCHEMA_PEERS_V2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L7:; /* "cassandra/cluster.py":4179 * raise ValueError("Invalid peers query type: %s" % peers_query_type) * * if self._uses_peers_v2: # <<<<<<<<<<<<<< * if peers_query_type == self.PeersQueryType.PEERS: * query = self._SELECT_PEERS_V2 if self._token_meta_enabled else self._SELECT_PEERS_NO_TOKENS_V2 */ goto __pyx_L6; } /* "cassandra/cluster.py":4185 * query = self._SELECT_SCHEMA_PEERS_V2 * else: * if peers_query_type == self.PeersQueryType.PEERS and self._token_meta_enabled: # <<<<<<<<<<<<<< * query = self._SELECT_PEERS * else: */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_PEERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_peers_query_type, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { } else { __pyx_t_5 = __pyx_t_2; goto __pyx_L9_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_token_meta_enabled); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4185, __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(0, 4185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_2; __pyx_L9_bool_binop_done:; if (__pyx_t_5) { /* "cassandra/cluster.py":4186 * else: * if peers_query_type == self.PeersQueryType.PEERS and self._token_meta_enabled: * query = self._SELECT_PEERS # <<<<<<<<<<<<<< * else: * query_template = (self._SELECT_SCHEMA_PEERS_TEMPLATE */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4185 * query = self._SELECT_SCHEMA_PEERS_V2 * else: * if peers_query_type == self.PeersQueryType.PEERS and self._token_meta_enabled: # <<<<<<<<<<<<<< * query = self._SELECT_PEERS * else: */ goto __pyx_L8; } /* "cassandra/cluster.py":4188 * query = self._SELECT_PEERS * else: * query_template = (self._SELECT_SCHEMA_PEERS_TEMPLATE # <<<<<<<<<<<<<< * if peers_query_type == self.PeersQueryType.PEERS_SCHEMA * else self._SELECT_PEERS_NO_TOKENS_TEMPLATE) */ /*else*/ { /* "cassandra/cluster.py":4189 * else: * query_template = (self._SELECT_SCHEMA_PEERS_TEMPLATE * if peers_query_type == self.PeersQueryType.PEERS_SCHEMA # <<<<<<<<<<<<<< * else self._SELECT_PEERS_NO_TOKENS_TEMPLATE) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_PeersQueryType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PEERS_SCHEMA); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyObject_RichCompare(__pyx_v_peers_query_type, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":4188 * query = self._SELECT_PEERS * else: * query_template = (self._SELECT_SCHEMA_PEERS_TEMPLATE # <<<<<<<<<<<<<< * if peers_query_type == self.PeersQueryType.PEERS_SCHEMA * else self._SELECT_PEERS_NO_TOKENS_TEMPLATE) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_SCHEMA_PEERS_TEMPLATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } else { /* "cassandra/cluster.py":4190 * query_template = (self._SELECT_SCHEMA_PEERS_TEMPLATE * if peers_query_type == self.PeersQueryType.PEERS_SCHEMA * else self._SELECT_PEERS_NO_TOKENS_TEMPLATE) # <<<<<<<<<<<<<< * * host_release_version = self._cluster.metadata.get_host(connection.endpoint).release_version */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS_NO_TOKENS_TEMPLATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __pyx_t_4 = 0; } __pyx_v_query_template = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4192 * else self._SELECT_PEERS_NO_TOKENS_TEMPLATE) * * host_release_version = self._cluster.metadata.get_host(connection.endpoint).release_version # <<<<<<<<<<<<<< * host_dse_version = self._cluster.metadata.get_host(connection.endpoint).dse_version * uses_native_address_query = ( */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_release_version); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_host_release_version = __pyx_t_7; __pyx_t_7 = 0; /* "cassandra/cluster.py":4193 * * host_release_version = self._cluster.metadata.get_host(connection.endpoint).release_version * host_dse_version = self._cluster.metadata.get_host(connection.endpoint).dse_version # <<<<<<<<<<<<<< * uses_native_address_query = ( * host_dse_version and Version(host_dse_version) >= self._MINIMUM_NATIVE_ADDRESS_DSE_VERSION) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_dse_version); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_host_dse_version = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4195 * host_dse_version = self._cluster.metadata.get_host(connection.endpoint).dse_version * uses_native_address_query = ( * host_dse_version and Version(host_dse_version) >= self._MINIMUM_NATIVE_ADDRESS_DSE_VERSION) # <<<<<<<<<<<<<< * * if uses_native_address_query: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_host_dse_version); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4195, __pyx_L1_error) if (__pyx_t_5) { } else { __Pyx_INCREF(__pyx_v_host_dse_version); __pyx_t_4 = __pyx_v_host_dse_version; goto __pyx_L11_bool_binop_done; } __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Version); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host_dse_version}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_MINIMUM_NATIVE_ADDRESS_DSE_VERS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L11_bool_binop_done:; __pyx_v_uses_native_address_query = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4197 * host_dse_version and Version(host_dse_version) >= self._MINIMUM_NATIVE_ADDRESS_DSE_VERSION) * * if uses_native_address_query: # <<<<<<<<<<<<<< * query = query_template.format(nt_col_name="native_transport_address") * elif host_release_version: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_uses_native_address_query); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4197, __pyx_L1_error) if (__pyx_t_5) { /* "cassandra/cluster.py":4198 * * if uses_native_address_query: * query = query_template.format(nt_col_name="native_transport_address") # <<<<<<<<<<<<<< * elif host_release_version: * query = query_template.format(nt_col_name="rpc_address") */ __pyx_t_3 = __pyx_v_query_template; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nt_col_name, __pyx_mstate_global->__pyx_n_u_native_transport_address, __pyx_t_1, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4198, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_query = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4197 * host_dse_version and Version(host_dse_version) >= self._MINIMUM_NATIVE_ADDRESS_DSE_VERSION) * * if uses_native_address_query: # <<<<<<<<<<<<<< * query = query_template.format(nt_col_name="native_transport_address") * elif host_release_version: */ goto __pyx_L13; } /* "cassandra/cluster.py":4199 * if uses_native_address_query: * query = query_template.format(nt_col_name="native_transport_address") * elif host_release_version: # <<<<<<<<<<<<<< * query = query_template.format(nt_col_name="rpc_address") * else: */ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_host_release_version); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4199, __pyx_L1_error) if (__pyx_t_5) { /* "cassandra/cluster.py":4200 * query = query_template.format(nt_col_name="native_transport_address") * elif host_release_version: * query = query_template.format(nt_col_name="rpc_address") # <<<<<<<<<<<<<< * else: * query = self._SELECT_PEERS */ __pyx_t_1 = __pyx_v_query_template; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_nt_col_name, __pyx_mstate_global->__pyx_n_u_rpc_address, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4200, __pyx_L1_error) __pyx_t_4 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_v_query = __pyx_t_4; __pyx_t_4 = 0; /* "cassandra/cluster.py":4199 * if uses_native_address_query: * query = query_template.format(nt_col_name="native_transport_address") * elif host_release_version: # <<<<<<<<<<<<<< * query = query_template.format(nt_col_name="rpc_address") * else: */ goto __pyx_L13; } /* "cassandra/cluster.py":4202 * query = query_template.format(nt_col_name="rpc_address") * else: * query = self._SELECT_PEERS # <<<<<<<<<<<<<< * * return query */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_query = __pyx_t_4; __pyx_t_4 = 0; } __pyx_L13:; } __pyx_L8:; } __pyx_L6:; /* "cassandra/cluster.py":4204 * query = self._SELECT_PEERS * * return query # <<<<<<<<<<<<<< * * def _signal_error(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_query); __pyx_r = __pyx_v_query; goto __pyx_L0; /* "cassandra/cluster.py":4161 * return dict((version, list(nodes)) for version, nodes in versions.items()) * * def _get_peers_query(self, peers_query_type, connection=None): # <<<<<<<<<<<<<< * """ * Determine the peers query to use. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._get_peers_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_query); __Pyx_XDECREF(__pyx_v_query_template); __Pyx_XDECREF(__pyx_v_host_release_version); __Pyx_XDECREF(__pyx_v_host_dse_version); __Pyx_XDECREF(__pyx_v_uses_native_address_query); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4206 * return query * * def _signal_error(self): # <<<<<<<<<<<<<< * with self._lock: * if self._is_shutdown: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_49_signal_error(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_49_signal_error = {"_signal_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_49_signal_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_49_signal_error(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_signal_error (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4206, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4206, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_signal_error", 0) < (0)) __PYX_ERR(0, 4206, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_signal_error", 1, 1, 1, i); __PYX_ERR(0, 4206, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4206, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_signal_error", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4206, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection._signal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_48_signal_error(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_48_signal_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_host = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_signal_error", 0); /* "cassandra/cluster.py":4207 * * def _signal_error(self): * with self._lock: # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4207, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4207, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":4208 * def _signal_error(self): * with self._lock: * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4208, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 4208, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { /* "cassandra/cluster.py":4209 * with self._lock: * if self._is_shutdown: * return # <<<<<<<<<<<<<< * * # try just signaling the cluster, as this will trigger a reconnect */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; /* "cassandra/cluster.py":4208 * def _signal_error(self): * with self._lock: * if self._is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":4213 * # try just signaling the cluster, as this will trigger a reconnect * # as part of marking the host down * if self._connection and self._connection.is_defunct: # <<<<<<<<<<<<<< * host = self._cluster.metadata.get_host(self._connection.endpoint) * # host may be None if it's already been removed, but that indicates */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4213, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 4213, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { } else { __pyx_t_10 = __pyx_t_11; goto __pyx_L15_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4213, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_is_defunct); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4213, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 4213, __pyx_L7_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_10 = __pyx_t_11; __pyx_L15_bool_binop_done:; if (__pyx_t_10) { /* "cassandra/cluster.py":4214 * # as part of marking the host down * if self._connection and self._connection.is_defunct: * host = self._cluster.metadata.get_host(self._connection.endpoint) # <<<<<<<<<<<<<< * # host may be None if it's already been removed, but that indicates * # that errors have already been reported, so we're fine */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4214, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_metadata); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4214, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4214, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4214, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_12}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_host, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4214, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_host = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4217 * # host may be None if it's already been removed, but that indicates * # that errors have already been reported, so we're fine * if host: # <<<<<<<<<<<<<< * self._cluster.signal_connection_failure( * host, self._connection.last_error, is_host_addition=False) */ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_host); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 4217, __pyx_L7_error) if (__pyx_t_10) { /* "cassandra/cluster.py":4218 * # that errors have already been reported, so we're fine * if host: * self._cluster.signal_connection_failure( # <<<<<<<<<<<<<< * host, self._connection.last_error, is_host_addition=False) * return */ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_cluster_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4218, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_4 = __pyx_t_12; __Pyx_INCREF(__pyx_t_4); /* "cassandra/cluster.py":4219 * if host: * self._cluster.signal_connection_failure( * host, self._connection.last_error, is_host_addition=False) # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4219, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_last_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4219, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_v_host, __pyx_t_5}; __pyx_t_1 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4218, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_is_host_addition, Py_False, __pyx_t_1, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4218, __pyx_L7_error) __pyx_t_3 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_signal_connection_failure, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4218, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4220 * self._cluster.signal_connection_failure( * host, self._connection.last_error, is_host_addition=False) * return # <<<<<<<<<<<<<< * * # if the connection is not defunct or the host already left, reconnect */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L11_try_return; /* "cassandra/cluster.py":4217 * # host may be None if it's already been removed, but that indicates * # that errors have already been reported, so we're fine * if host: # <<<<<<<<<<<<<< * self._cluster.signal_connection_failure( * host, self._connection.last_error, is_host_addition=False) */ } /* "cassandra/cluster.py":4213 * # try just signaling the cluster, as this will trigger a reconnect * # as part of marking the host down * if self._connection and self._connection.is_defunct: # <<<<<<<<<<<<<< * host = self._cluster.metadata.get_host(self._connection.endpoint) * # host may be None if it's already been removed, but that indicates */ } /* "cassandra/cluster.py":4207 * * def _signal_error(self): * with self._lock: # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ } __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_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 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("cassandra.cluster.ControlConnection._signal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_12, &__pyx_t_1) < 0) __PYX_ERR(0, 4207, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_12, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4207, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __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_13)) __PYX_ERR(0, 4207, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_10 < (0)) __PYX_ERR(0, 4207, __pyx_L9_except_error) __pyx_t_11 = (!__pyx_t_10); if (unlikely(__pyx_t_11)) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_12, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_12 = 0; __pyx_t_1 = 0; __PYX_ERR(0, 4207, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L11_try_return:; __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_return; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L4_return: { __pyx_t_9 = __pyx_r; __pyx_r = 0; if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; } __pyx_L6:; } goto __pyx_L21; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L21:; } /* "cassandra/cluster.py":4224 * # if the connection is not defunct or the host already left, reconnect * # manually * self.reconnect() # <<<<<<<<<<<<<< * * def on_up(self, host): */ __pyx_t_12 = __pyx_v_self; __Pyx_INCREF(__pyx_t_12); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4206 * return query * * def _signal_error(self): # <<<<<<<<<<<<<< * with self._lock: * if self._is_shutdown: */ /* 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_12); __Pyx_AddTraceback("cassandra.cluster.ControlConnection._signal_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_host); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4226 * self.reconnect() * * def on_up(self, host): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_51on_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_51on_up = {"on_up", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_51on_up, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_51on_up(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_up (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4226, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4226, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_up", 0) < (0)) __PYX_ERR(0, 4226, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_up", 1, 2, 2, i); __PYX_ERR(0, 4226, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4226, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4226, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_up", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4226, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_up", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_50on_up(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_50on_up(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_host) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_up", 0); /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4229 * pass * * def on_down(self, host): # <<<<<<<<<<<<<< * * conn = self._connection */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_53on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_53on_down = {"on_down", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_53on_down, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_53on_down(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_down (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4229, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4229, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4229, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_down", 0) < (0)) __PYX_ERR(0, 4229, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_down", 1, 2, 2, i); __PYX_ERR(0, 4229, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4229, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4229, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_down", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4229, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_52on_down(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_52on_down(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_conn = 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; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_down", 0); /* "cassandra/cluster.py":4231 * def on_down(self, host): * * conn = self._connection # <<<<<<<<<<<<<< * if conn and conn.endpoint == host.endpoint and \ * self._reconnection_handler is None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_conn = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4232 * * conn = self._connection * if conn and conn.endpoint == host.endpoint and \ # <<<<<<<<<<<<<< * self._reconnection_handler is None: * log.debug("[control connection] Control connection host (%s) is " */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_conn); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4232, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_conn, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } /* "cassandra/cluster.py":4233 * conn = self._connection * if conn and conn.endpoint == host.endpoint and \ * self._reconnection_handler is None: # <<<<<<<<<<<<<< * log.debug("[control connection] Control connection host (%s) is " * "considered down, starting reconnection", host) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reconnection_handler); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__pyx_t_5 == Py_None); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; /* "cassandra/cluster.py":4232 * * conn = self._connection * if conn and conn.endpoint == host.endpoint and \ # <<<<<<<<<<<<<< * self._reconnection_handler is None: * log.debug("[control connection] Control connection host (%s) is " */ if (__pyx_t_2) { /* "cassandra/cluster.py":4234 * if conn and conn.endpoint == host.endpoint and \ * self._reconnection_handler is None: * log.debug("[control connection] Control connection host (%s) is " # <<<<<<<<<<<<<< * "considered down, starting reconnection", host) * # this will result in a task being submitted to the executor to reconnect */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4235 * self._reconnection_handler is None: * log.debug("[control connection] Control connection host (%s) is " * "considered down, starting reconnection", host) # <<<<<<<<<<<<<< * # this will result in a task being submitted to the executor to reconnect * self.reconnect() */ __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Control_conn, __pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4237 * "considered down, starting reconnection", host) * # this will result in a task being submitted to the executor to reconnect * self.reconnect() # <<<<<<<<<<<<<< * * def on_add(self, host, refresh_nodes=True): */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_2, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4232 * * conn = self._connection * if conn and conn.endpoint == host.endpoint and \ # <<<<<<<<<<<<<< * self._reconnection_handler is None: * log.debug("[control connection] Control connection host (%s) is " */ } /* "cassandra/cluster.py":4229 * pass * * def on_down(self, host): # <<<<<<<<<<<<<< * * conn = self._connection */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_down", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_conn); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4239 * self.reconnect() * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if refresh_nodes: * self.refresh_node_list_and_token_map(force_token_rebuild=True) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_55on_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_55on_add = {"on_add", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_55on_add, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_55on_add(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_host = 0; PyObject *__pyx_v_refresh_nodes = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_add (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_refresh_nodes,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4239, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4239, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4239, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4239, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_add", 0) < (0)) __PYX_ERR(0, 4239, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_add", 0, 2, 3, i); __PYX_ERR(0, 4239, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4239, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4239, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4239, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_refresh_nodes = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_add", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 4239, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_54on_add(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_refresh_nodes); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_54on_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_host, PyObject *__pyx_v_refresh_nodes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_add", 0); /* "cassandra/cluster.py":4240 * * def on_add(self, host, refresh_nodes=True): * if refresh_nodes: # <<<<<<<<<<<<<< * self.refresh_node_list_and_token_map(force_token_rebuild=True) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_refresh_nodes); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4240, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":4241 * def on_add(self, host, refresh_nodes=True): * if refresh_nodes: * self.refresh_node_list_and_token_map(force_token_rebuild=True) # <<<<<<<<<<<<<< * * def on_remove(self, host): */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, NULL}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force_token_rebuild, Py_True, __pyx_t_5, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4241, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4240 * * def on_add(self, host, refresh_nodes=True): * if refresh_nodes: # <<<<<<<<<<<<<< * self.refresh_node_list_and_token_map(force_token_rebuild=True) * */ } /* "cassandra/cluster.py":4239 * self.reconnect() * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if refresh_nodes: * self.refresh_node_list_and_token_map(force_token_rebuild=True) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_add", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4243 * self.refresh_node_list_and_token_map(force_token_rebuild=True) * * def on_remove(self, host): # <<<<<<<<<<<<<< * c = self._connection * if c and c.endpoint == host.endpoint: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_57on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_57on_remove = {"on_remove", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_57on_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_57on_remove(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("on_remove (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4243, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4243, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "on_remove", 0) < (0)) __PYX_ERR(0, 4243, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, i); __PYX_ERR(0, 4243, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4243, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4243, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("on_remove", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4243, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_56on_remove(__pyx_self, __pyx_v_self, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_56on_remove(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host) { PyObject *__pyx_v_c = 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; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("on_remove", 0); /* "cassandra/cluster.py":4244 * * def on_remove(self, host): * c = self._connection # <<<<<<<<<<<<<< * if c and c.endpoint == host.endpoint: * log.debug("[control connection] Control connection host (%s) is being removed. Reconnecting", host) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4245 * def on_remove(self, host): * c = self._connection * if c and c.endpoint == host.endpoint: # <<<<<<<<<<<<<< * log.debug("[control connection] Control connection host (%s) is being removed. Reconnecting", host) * # refresh will be done on reconnect */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4245, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_host, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "cassandra/cluster.py":4246 * c = self._connection * if c and c.endpoint == host.endpoint: * log.debug("[control connection] Control connection host (%s) is being removed. Reconnecting", host) # <<<<<<<<<<<<<< * # refresh will be done on reconnect * self.reconnect() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_control_connection_Control_conn_2, __pyx_v_host}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4248 * log.debug("[control connection] Control connection host (%s) is being removed. Reconnecting", host) * # refresh will be done on reconnect * self.reconnect() # <<<<<<<<<<<<<< * else: * self.refresh_node_list_and_token_map(force_token_rebuild=True) */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_2, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4245 * def on_remove(self, host): * c = self._connection * if c and c.endpoint == host.endpoint: # <<<<<<<<<<<<<< * log.debug("[control connection] Control connection host (%s) is being removed. Reconnecting", host) * # refresh will be done on reconnect */ goto __pyx_L3; } /* "cassandra/cluster.py":4250 * self.reconnect() * else: * self.refresh_node_list_and_token_map(force_token_rebuild=True) # <<<<<<<<<<<<<< * * def get_connections(self): */ /*else*/ { __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_force_token_rebuild, Py_True, __pyx_t_4, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4250, __pyx_L1_error) __pyx_t_5 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __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_5)) __PYX_ERR(0, 4250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; /* "cassandra/cluster.py":4243 * self.refresh_node_list_and_token_map(force_token_rebuild=True) * * def on_remove(self, host): # <<<<<<<<<<<<<< * c = self._connection * if c and c.endpoint == host.endpoint: */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.on_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4252 * self.refresh_node_list_and_token_map(force_token_rebuild=True) * * def get_connections(self): # <<<<<<<<<<<<<< * c = getattr(self, '_connection', None) * return [c] if c else [] */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_59get_connections(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_59get_connections = {"get_connections", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_59get_connections, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_59get_connections(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_connections (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4252, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4252, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_connections", 0) < (0)) __PYX_ERR(0, 4252, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_connections", 1, 1, 1, i); __PYX_ERR(0, 4252, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4252, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_connections", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4252, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.get_connections", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_58get_connections(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_58get_connections(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_c = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_connections", 0); /* "cassandra/cluster.py":4253 * * def get_connections(self): * c = getattr(self, '_connection', None) # <<<<<<<<<<<<<< * return [c] if c else [] * */ __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_c = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4254 * def get_connections(self): * c = getattr(self, '_connection', None) * return [c] if c else [] # <<<<<<<<<<<<<< * * def return_connection(self, connection): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_c); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4254, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_c); __Pyx_GIVEREF(__pyx_v_c); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_c) != (0)) __PYX_ERR(0, 4254, __pyx_L1_error); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4252 * self.refresh_node_list_and_token_map(force_token_rebuild=True) * * def get_connections(self): # <<<<<<<<<<<<<< * c = getattr(self, '_connection', None) * return [c] if c else [] */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.get_connections", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_c); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4256 * return [c] if c else [] * * def return_connection(self, connection): # <<<<<<<<<<<<<< * if connection is self._connection and (connection.is_defunct or connection.is_closed): * self.reconnect() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_61return_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_17ControlConnection_61return_connection = {"return_connection", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_17ControlConnection_61return_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_17ControlConnection_61return_connection(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_connection = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("return_connection (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_connection_2,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4256, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4256, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4256, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "return_connection", 0) < (0)) __PYX_ERR(0, 4256, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("return_connection", 1, 2, 2, i); __PYX_ERR(0, 4256, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4256, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4256, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_connection = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("return_connection", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4256, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ControlConnection.return_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_17ControlConnection_60return_connection(__pyx_self, __pyx_v_self, __pyx_v_connection); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_17ControlConnection_60return_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("return_connection", 0); /* "cassandra/cluster.py":4257 * * def return_connection(self, connection): * if connection is self._connection and (connection.is_defunct or connection.is_closed): # <<<<<<<<<<<<<< * self.reconnect() * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_v_connection == __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_is_defunct); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_is_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":4258 * def return_connection(self, connection): * if connection is self._connection and (connection.is_defunct or connection.is_closed): * self.reconnect() # <<<<<<<<<<<<<< * * */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_reconnect_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4257 * * def return_connection(self, connection): * if connection is self._connection and (connection.is_defunct or connection.is_closed): # <<<<<<<<<<<<<< * self.reconnect() * */ } /* "cassandra/cluster.py":4256 * return [c] if c else [] * * def return_connection(self, connection): # <<<<<<<<<<<<<< * if connection is self._connection and (connection.is_defunct or connection.is_closed): * self.reconnect() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cassandra.cluster.ControlConnection.return_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4261 * * * def _stop_scheduler(scheduler, thread): # <<<<<<<<<<<<<< * try: * if not scheduler.is_shutdown: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_35_stop_scheduler(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_35_stop_scheduler = {"_stop_scheduler", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_35_stop_scheduler, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_35_stop_scheduler(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_scheduler = 0; PyObject *__pyx_v_thread = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_stop_scheduler (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_scheduler,&__pyx_mstate_global->__pyx_n_u_thread,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4261, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4261, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4261, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_stop_scheduler", 0) < (0)) __PYX_ERR(0, 4261, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_stop_scheduler", 1, 2, 2, i); __PYX_ERR(0, 4261, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4261, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4261, __pyx_L3_error) } __pyx_v_scheduler = values[0]; __pyx_v_thread = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_stop_scheduler", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4261, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._stop_scheduler", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_34_stop_scheduler(__pyx_self, __pyx_v_scheduler, __pyx_v_thread); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_34_stop_scheduler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_scheduler, PyObject *__pyx_v_thread) { 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; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_stop_scheduler", 0); /* "cassandra/cluster.py":4262 * * def _stop_scheduler(scheduler, thread): * try: # <<<<<<<<<<<<<< * if not scheduler.is_shutdown: * scheduler.shutdown() */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":4263 * def _stop_scheduler(scheduler, thread): * try: * if not scheduler.is_shutdown: # <<<<<<<<<<<<<< * scheduler.shutdown() * except ReferenceError: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_scheduler, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4263, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4263, __pyx_L3_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { /* "cassandra/cluster.py":4264 * try: * if not scheduler.is_shutdown: * scheduler.shutdown() # <<<<<<<<<<<<<< * except ReferenceError: * pass */ __pyx_t_7 = __pyx_v_scheduler; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_shutdown, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4264, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4263 * def _stop_scheduler(scheduler, thread): * try: * if not scheduler.is_shutdown: # <<<<<<<<<<<<<< * scheduler.shutdown() * except ReferenceError: */ } /* "cassandra/cluster.py":4262 * * def _stop_scheduler(scheduler, thread): * try: # <<<<<<<<<<<<<< * if not scheduler.is_shutdown: * scheduler.shutdown() */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":4265 * if not scheduler.is_shutdown: * scheduler.shutdown() * except ReferenceError: # <<<<<<<<<<<<<< * pass * */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ReferenceError)))); if (__pyx_t_9) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":4262 * * def _stop_scheduler(scheduler, thread): * try: # <<<<<<<<<<<<<< * if not scheduler.is_shutdown: * scheduler.shutdown() */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":4268 * pass * * thread.join() # <<<<<<<<<<<<<< * * */ __pyx_t_7 = __pyx_v_thread; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4261 * * * def _stop_scheduler(scheduler, thread): # <<<<<<<<<<<<<< * try: * if not scheduler.is_shutdown: */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster._stop_scheduler", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4278 * is_shutdown = False * * def __init__(self, executor): # <<<<<<<<<<<<<< * self._queue = queue.PriorityQueue() * self._scheduled_tasks = set() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_executor = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_executor,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4278, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4278, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 4278, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, i); __PYX_ERR(0, 4278, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4278, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4278, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_executor = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4278, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._Scheduler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler___init__(__pyx_self, __pyx_v_self, __pyx_v_executor); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_executor) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":4279 * * def __init__(self, executor): * self._queue = queue.PriorityQueue() # <<<<<<<<<<<<<< * self._scheduled_tasks = set() * self._count = count() */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_queue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_PriorityQueue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_queue_2, __pyx_t_1) < (0)) __PYX_ERR(0, 4279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4280 * def __init__(self, executor): * self._queue = queue.PriorityQueue() * self._scheduled_tasks = set() # <<<<<<<<<<<<<< * self._count = count() * self._executor = executor */ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4280, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduled_tasks, __pyx_t_1) < (0)) __PYX_ERR(0, 4280, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4281 * self._queue = queue.PriorityQueue() * self._scheduled_tasks = set() * self._count = count() # <<<<<<<<<<<<<< * self._executor = executor * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_count_2, __pyx_t_1) < (0)) __PYX_ERR(0, 4281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4282 * self._scheduled_tasks = set() * self._count = count() * self._executor = executor # <<<<<<<<<<<<<< * * Thread.__init__(self, name="Task Scheduler") */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_executor_2, __pyx_v_executor) < (0)) __PYX_ERR(0, 4282, __pyx_L1_error) /* "cassandra/cluster.py":4284 * self._executor = executor * * Thread.__init__(self, name="Task Scheduler") # <<<<<<<<<<<<<< * self.daemon = True * self.start() */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_v_self}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_kp_u_Task_Scheduler, __pyx_t_4, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4284, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4285 * * Thread.__init__(self, name="Task Scheduler") * self.daemon = True # <<<<<<<<<<<<<< * self.start() * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_daemon, Py_True) < (0)) __PYX_ERR(0, 4285, __pyx_L1_error) /* "cassandra/cluster.py":4286 * Thread.__init__(self, name="Task Scheduler") * self.daemon = True * self.start() # <<<<<<<<<<<<<< * * def shutdown(self): */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4278 * is_shutdown = False * * def __init__(self, executor): # <<<<<<<<<<<<<< * self._queue = queue.PriorityQueue() * self._scheduled_tasks = set() */ /* 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_AddTraceback("cassandra.cluster._Scheduler.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4288 * self.start() * * def shutdown(self): # <<<<<<<<<<<<<< * try: * log.debug("Shutting down Cluster Scheduler") */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_3shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_3shutdown = {"shutdown", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_3shutdown, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_3shutdown(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shutdown (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4288, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4288, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "shutdown", 0) < (0)) __PYX_ERR(0, 4288, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, i); __PYX_ERR(0, 4288, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4288, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("shutdown", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4288, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._Scheduler.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler_2shutdown(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_2shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; size_t __pyx_t_8; int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shutdown", 0); /* "cassandra/cluster.py":4289 * * def shutdown(self): * try: # <<<<<<<<<<<<<< * log.debug("Shutting down Cluster Scheduler") * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":4290 * def shutdown(self): * try: * log.debug("Shutting down Cluster Scheduler") # <<<<<<<<<<<<<< * except AttributeError: * # this can happen on interpreter shutdown */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4290, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4290, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Shutting_down_Cluster_Scheduler}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4290, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4289 * * def shutdown(self): * try: # <<<<<<<<<<<<<< * log.debug("Shutting down Cluster Scheduler") * except AttributeError: */ } __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_L8_try_end; __pyx_L3_error:; __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; /* "cassandra/cluster.py":4291 * try: * log.debug("Shutting down Cluster Scheduler") * except AttributeError: # <<<<<<<<<<<<<< * # this can happen on interpreter shutdown * pass */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError)))); if (__pyx_t_9) { __Pyx_ErrRestore(0,0,0); goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":4289 * * def shutdown(self): * try: # <<<<<<<<<<<<<< * log.debug("Shutting down Cluster Scheduler") * except AttributeError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":4294 * # this can happen on interpreter shutdown * pass * self.is_shutdown = True # <<<<<<<<<<<<<< * self._queue.put_nowait((0, 0, None)) * self.join() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown, Py_True) < (0)) __PYX_ERR(0, 4294, __pyx_L1_error) /* "cassandra/cluster.py":4295 * pass * self.is_shutdown = True * self._queue.put_nowait((0, 0, None)) # <<<<<<<<<<<<<< * self.join() * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_queue_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __pyx_t_5; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_mstate_global->__pyx_tuple[3]}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_put_nowait, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4296 * self.is_shutdown = True * self._queue.put_nowait((0, 0, None)) * self.join() # <<<<<<<<<<<<<< * * def schedule(self, delay, fn, *args, **kwargs): */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_join, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4288 * self.start() * * def shutdown(self): # <<<<<<<<<<<<<< * try: * log.debug("Shutting down Cluster Scheduler") */ /* 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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster._Scheduler.shutdown", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4298 * self.join() * * def schedule(self, delay, fn, *args, **kwargs): # <<<<<<<<<<<<<< * self._insert_task(delay, (fn, args, tuple(kwargs.items()))) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_5schedule(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_5schedule = {"schedule", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_5schedule, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_5schedule(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_delay = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("schedule (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 3, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_delay,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4298, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4298, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 3) ? kwd_pos_args : 3; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "schedule", 1) < (0)) __PYX_ERR(0, 4298, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("schedule", 0, 3, 3, i); __PYX_ERR(0, 4298, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4298, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4298, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4298, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_delay = values[1]; __pyx_v_fn = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("schedule", 0, 3, 3, __pyx_nargs); __PYX_ERR(0, 4298, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster._Scheduler.schedule", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler_4schedule(__pyx_self, __pyx_v_self, __pyx_v_delay, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_4schedule(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("schedule", 0); /* "cassandra/cluster.py":4299 * * def schedule(self, delay, fn, *args, **kwargs): * self._insert_task(delay, (fn, args, tuple(kwargs.items()))) # <<<<<<<<<<<<<< * * def schedule_unique(self, delay, fn, *args, **kwargs): */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 4299, __pyx_L1_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args) != (0)) __PYX_ERR(0, 4299, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4) != (0)) __PYX_ERR(0, 4299, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_5 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_delay, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_insert_task, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4298 * self.join() * * def schedule(self, delay, fn, *args, **kwargs): # <<<<<<<<<<<<<< * self._insert_task(delay, (fn, args, tuple(kwargs.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_AddTraceback("cassandra.cluster._Scheduler.schedule", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4301 * self._insert_task(delay, (fn, args, tuple(kwargs.items()))) * * def schedule_unique(self, delay, fn, *args, **kwargs): # <<<<<<<<<<<<<< * task = (fn, args, tuple(kwargs.items())) * if task not in self._scheduled_tasks: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_7schedule_unique(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_7schedule_unique = {"schedule_unique", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_7schedule_unique, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_7schedule_unique(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_delay = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("schedule_unique (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 3, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_delay,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4301, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4301, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4301, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4301, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 3) ? kwd_pos_args : 3; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "schedule_unique", 1) < (0)) __PYX_ERR(0, 4301, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("schedule_unique", 0, 3, 3, i); __PYX_ERR(0, 4301, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4301, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4301, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4301, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_delay = values[1]; __pyx_v_fn = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("schedule_unique", 0, 3, 3, __pyx_nargs); __PYX_ERR(0, 4301, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster._Scheduler.schedule_unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler_6schedule_unique(__pyx_self, __pyx_v_self, __pyx_v_delay, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_6schedule_unique(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { PyObject *__pyx_v_task = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("schedule_unique", 0); /* "cassandra/cluster.py":4302 * * def schedule_unique(self, delay, fn, *args, **kwargs): * task = (fn, args, tuple(kwargs.items())) # <<<<<<<<<<<<<< * if task not in self._scheduled_tasks: * self._insert_task(delay, task) */ __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 4302, __pyx_L1_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_args) != (0)) __PYX_ERR(0, 4302, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2) != (0)) __PYX_ERR(0, 4302, __pyx_L1_error); __pyx_t_2 = 0; __pyx_v_task = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4303 * def schedule_unique(self, delay, fn, *args, **kwargs): * task = (fn, args, tuple(kwargs.items())) * if task not in self._scheduled_tasks: # <<<<<<<<<<<<<< * self._insert_task(delay, task) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduled_tasks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_task, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":4304 * task = (fn, args, tuple(kwargs.items())) * if task not in self._scheduled_tasks: * self._insert_task(delay, task) # <<<<<<<<<<<<<< * else: * log.debug("Ignoring schedule_unique for already-scheduled task: %r", task) */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_delay, __pyx_v_task}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_insert_task, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4303 * def schedule_unique(self, delay, fn, *args, **kwargs): * task = (fn, args, tuple(kwargs.items())) * if task not in self._scheduled_tasks: # <<<<<<<<<<<<<< * self._insert_task(delay, task) * else: */ goto __pyx_L3; } /* "cassandra/cluster.py":4306 * self._insert_task(delay, task) * else: * log.debug("Ignoring schedule_unique for already-scheduled task: %r", task) # <<<<<<<<<<<<<< * * def _insert_task(self, delay, task): */ /*else*/ { __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Ignoring_schedule_unique_for_alr, __pyx_v_task}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; /* "cassandra/cluster.py":4301 * self._insert_task(delay, (fn, args, tuple(kwargs.items()))) * * def schedule_unique(self, delay, fn, *args, **kwargs): # <<<<<<<<<<<<<< * task = (fn, args, tuple(kwargs.items())) * if task not in self._scheduled_tasks: */ /* 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("cassandra.cluster._Scheduler.schedule_unique", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_task); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4308 * log.debug("Ignoring schedule_unique for already-scheduled task: %r", task) * * def _insert_task(self, delay, task): # <<<<<<<<<<<<<< * if not self.is_shutdown: * run_at = time.time() + delay */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_9_insert_task(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_9_insert_task = {"_insert_task", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_9_insert_task, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_9_insert_task(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_delay = 0; PyObject *__pyx_v_task = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_insert_task (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_delay,&__pyx_mstate_global->__pyx_n_u_task,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4308, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4308, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4308, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4308, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_insert_task", 0) < (0)) __PYX_ERR(0, 4308, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_insert_task", 1, 3, 3, i); __PYX_ERR(0, 4308, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4308, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4308, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4308, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_delay = values[1]; __pyx_v_task = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_insert_task", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4308, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._Scheduler._insert_task", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler_8_insert_task(__pyx_self, __pyx_v_self, __pyx_v_delay, __pyx_v_task); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_8_insert_task(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_delay, PyObject *__pyx_v_task) { PyObject *__pyx_v_run_at = 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; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_insert_task", 0); /* "cassandra/cluster.py":4309 * * def _insert_task(self, delay, task): * if not self.is_shutdown: # <<<<<<<<<<<<<< * run_at = time.time() + delay * self._scheduled_tasks.add(task) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4309, __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(0, 4309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (!__pyx_t_2); if (__pyx_t_3) { /* "cassandra/cluster.py":4310 * def _insert_task(self, delay, task): * if not self.is_shutdown: * run_at = time.time() + delay # <<<<<<<<<<<<<< * self._scheduled_tasks.add(task) * self._queue.put_nowait((run_at, next(self._count), task)) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_v_delay); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_run_at = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":4311 * if not self.is_shutdown: * run_at = time.time() + delay * self._scheduled_tasks.add(task) # <<<<<<<<<<<<<< * self._queue.put_nowait((run_at, next(self._count), task)) * else: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduled_tasks); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_task}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4312 * run_at = time.time() + delay * self._scheduled_tasks.add(task) * self._queue.put_nowait((run_at, next(self._count), task)) # <<<<<<<<<<<<<< * else: * log.debug("Ignoring scheduled task after shutdown: %r", task) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_queue_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_count_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyIter_Next(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_run_at); __Pyx_GIVEREF(__pyx_v_run_at); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_run_at) != (0)) __PYX_ERR(0, 4312, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8) != (0)) __PYX_ERR(0, 4312, __pyx_L1_error); __Pyx_INCREF(__pyx_v_task); __Pyx_GIVEREF(__pyx_v_task); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_task) != (0)) __PYX_ERR(0, 4312, __pyx_L1_error); __pyx_t_8 = 0; __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_put_nowait, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4309 * * def _insert_task(self, delay, task): * if not self.is_shutdown: # <<<<<<<<<<<<<< * run_at = time.time() + delay * self._scheduled_tasks.add(task) */ goto __pyx_L3; } /* "cassandra/cluster.py":4314 * self._queue.put_nowait((run_at, next(self._count), task)) * else: * log.debug("Ignoring scheduled task after shutdown: %r", task) # <<<<<<<<<<<<<< * * def run(self): */ /*else*/ { __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Ignoring_scheduled_task_after_sh, __pyx_v_task}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L3:; /* "cassandra/cluster.py":4308 * log.debug("Ignoring schedule_unique for already-scheduled task: %r", task) * * def _insert_task(self, delay, task): # <<<<<<<<<<<<<< * if not self.is_shutdown: * run_at = time.time() + delay */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster._Scheduler._insert_task", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_run_at); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4316 * log.debug("Ignoring scheduled task after shutdown: %r", task) * * def run(self): # <<<<<<<<<<<<<< * while True: * if self.is_shutdown: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_11run(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_11run = {"run", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_11run, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_11run(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("run (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4316, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4316, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "run", 0) < (0)) __PYX_ERR(0, 4316, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("run", 1, 1, 1, i); __PYX_ERR(0, 4316, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4316, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("run", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4316, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._Scheduler.run", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler_10run(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_10run(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_run_at = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_task = NULL; PyObject *__pyx_v_fn = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_v_kwargs = NULL; PyObject *__pyx_v_future = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; 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; size_t __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); int __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("run", 0); /* "cassandra/cluster.py":4317 * * def run(self): * while True: # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ while (1) { /* "cassandra/cluster.py":4318 * def run(self): * while True: * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4318, __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(0, 4318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4319 * while True: * if self.is_shutdown: * return # <<<<<<<<<<<<<< * * try: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4318 * def run(self): * while True: * if self.is_shutdown: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":4321 * return * * try: # <<<<<<<<<<<<<< * while True: * run_at, i, task = self._queue.get(block=True, timeout=None) */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "cassandra/cluster.py":4322 * * try: * while True: # <<<<<<<<<<<<<< * run_at, i, task = self._queue.get(block=True, timeout=None) * if self.is_shutdown: */ while (1) { /* "cassandra/cluster.py":4323 * try: * while True: * run_at, i, task = self._queue.get(block=True, timeout=None) # <<<<<<<<<<<<<< * if self.is_shutdown: * if task: */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_queue_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, NULL}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_block, Py_True, __pyx_t_9, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4323, __pyx_L6_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, Py_None, __pyx_t_9, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 4323, __pyx_L6_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4323, __pyx_L6_error) __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 != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4323, __pyx_L6_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_7); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_6); } else { __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_XGOTREF(__pyx_t_6); } #else __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4323, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); index = 0; __pyx_t_7 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_7)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 2; __pyx_t_6 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 3) < (0)) __PYX_ERR(0, 4323, __pyx_L6_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L17_unpacking_done; __pyx_L16_unpacking_failed:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4323, __pyx_L6_error) __pyx_L17_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_run_at, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_task, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4324 * while True: * run_at, i, task = self._queue.get(block=True, timeout=None) * if self.is_shutdown: # <<<<<<<<<<<<<< * if task: * log.debug("Not executing scheduled task due to Scheduler shutdown") */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4324, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4324, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4325 * run_at, i, task = self._queue.get(block=True, timeout=None) * if self.is_shutdown: * if task: # <<<<<<<<<<<<<< * log.debug("Not executing scheduled task due to Scheduler shutdown") * return */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_task); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4325, __pyx_L6_error) if (__pyx_t_2) { /* "cassandra/cluster.py":4326 * if self.is_shutdown: * if task: * log.debug("Not executing scheduled task due to Scheduler shutdown") # <<<<<<<<<<<<<< * return * if run_at <= time.time(): */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4326, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4326, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Not_executing_scheduled_task_due}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4326, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4325 * run_at, i, task = self._queue.get(block=True, timeout=None) * if self.is_shutdown: * if task: # <<<<<<<<<<<<<< * log.debug("Not executing scheduled task due to Scheduler shutdown") * return */ } /* "cassandra/cluster.py":4327 * if task: * log.debug("Not executing scheduled task due to Scheduler shutdown") * return # <<<<<<<<<<<<<< * if run_at <= time.time(): * self._scheduled_tasks.discard(task) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L10_try_return; /* "cassandra/cluster.py":4324 * while True: * run_at, i, task = self._queue.get(block=True, timeout=None) * if self.is_shutdown: # <<<<<<<<<<<<<< * if task: * log.debug("Not executing scheduled task due to Scheduler shutdown") */ } /* "cassandra/cluster.py":4328 * log.debug("Not executing scheduled task due to Scheduler shutdown") * return * if run_at <= time.time(): # <<<<<<<<<<<<<< * self._scheduled_tasks.discard(task) * fn, args, kwargs = task */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4328, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4328, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4328, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_9 = PyObject_RichCompare(__pyx_v_run_at, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4328, __pyx_L6_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4328, __pyx_L6_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4329 * return * if run_at <= time.time(): * self._scheduled_tasks.discard(task) # <<<<<<<<<<<<<< * fn, args, kwargs = task * kwargs = dict(kwargs) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_scheduled_tasks); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4329, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_task}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_discard, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4329, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4330 * if run_at <= time.time(): * self._scheduled_tasks.discard(task) * fn, args, kwargs = task # <<<<<<<<<<<<<< * kwargs = dict(kwargs) * future = self._executor.submit(fn, *args, **kwargs) */ if ((likely(PyTuple_CheckExact(__pyx_v_task))) || (PyList_CheckExact(__pyx_v_task))) { PyObject* sequence = __pyx_v_task; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4330, __pyx_L6_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_7); __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_1); } else { __pyx_t_9 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_XGOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_XGOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_XGOTREF(__pyx_t_1); } #else __pyx_t_9 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_task); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4330, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); index = 0; __pyx_t_9 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_9)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_7 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); index = 2; __pyx_t_1 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 3) < (0)) __PYX_ERR(0, 4330, __pyx_L6_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L22_unpacking_done; __pyx_L21_unpacking_failed:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4330, __pyx_L6_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_fn, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_args, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_kwargs, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4331 * self._scheduled_tasks.discard(task) * fn, args, kwargs = task * kwargs = dict(kwargs) # <<<<<<<<<<<<<< * future = self._executor.submit(fn, *args, **kwargs) * future.add_done_callback(self._log_if_failed) */ __pyx_t_7 = NULL; __pyx_t_8 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_kwargs}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyDict_Type), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4331, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4332 * fn, args, kwargs = task * kwargs = dict(kwargs) * future = self._executor.submit(fn, *args, **kwargs) # <<<<<<<<<<<<<< * future.add_done_callback(self._log_if_failed) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_executor_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 4332, __pyx_L6_error); __pyx_t_9 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (likely(PyDict_CheckExact(__pyx_v_kwargs))) { __pyx_t_9 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); } else { __pyx_t_9 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_kwargs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4332, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4333 * kwargs = dict(kwargs) * future = self._executor.submit(fn, *args, **kwargs) * future.add_done_callback(self._log_if_failed) # <<<<<<<<<<<<<< * else: * self._queue.put_nowait((run_at, i, task)) */ __pyx_t_9 = __pyx_v_future; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_log_if_failed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4333, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add_done_callback, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4333, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4328 * log.debug("Not executing scheduled task due to Scheduler shutdown") * return * if run_at <= time.time(): # <<<<<<<<<<<<<< * self._scheduled_tasks.discard(task) * fn, args, kwargs = task */ goto __pyx_L20; } /* "cassandra/cluster.py":4335 * future.add_done_callback(self._log_if_failed) * else: * self._queue.put_nowait((run_at, i, task)) # <<<<<<<<<<<<<< * break * except queue.Empty: */ /*else*/ { __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_queue_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4335, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4335, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_run_at); __Pyx_GIVEREF(__pyx_v_run_at); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_run_at) != (0)) __PYX_ERR(0, 4335, __pyx_L6_error); __Pyx_INCREF(__pyx_v_i); __Pyx_GIVEREF(__pyx_v_i); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_i) != (0)) __PYX_ERR(0, 4335, __pyx_L6_error); __Pyx_INCREF(__pyx_v_task); __Pyx_GIVEREF(__pyx_v_task); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_task) != (0)) __PYX_ERR(0, 4335, __pyx_L6_error); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_put_nowait, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4335, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4336 * else: * self._queue.put_nowait((run_at, i, task)) * break # <<<<<<<<<<<<<< * except queue.Empty: * pass */ goto __pyx_L15_break; } __pyx_L20:; } __pyx_L15_break:; /* "cassandra/cluster.py":4321 * return * * try: # <<<<<<<<<<<<<< * while True: * run_at, i, task = self._queue.get(block=True, timeout=None) */ } __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; goto __pyx_L13_try_end; __pyx_L6_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4337 * self._queue.put_nowait((run_at, i, task)) * break * except queue.Empty: # <<<<<<<<<<<<<< * pass * */ __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_queue); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4337, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_Empty); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4337, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = __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_9, __pyx_t_7); __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_7 = 0; if (__pyx_t_12) { __Pyx_ErrRestore(0,0,0); goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; /* "cassandra/cluster.py":4321 * return * * try: # <<<<<<<<<<<<<< * while True: * run_at, i, task = self._queue.get(block=True, timeout=None) */ __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L10_try_return:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L0; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L13_try_end:; } /* "cassandra/cluster.py":4340 * pass * * time.sleep(0.1) # <<<<<<<<<<<<<< * * def _log_if_failed(self, future): */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sleep); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_float_0_1}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } /* "cassandra/cluster.py":4316 * log.debug("Ignoring scheduled task after shutdown: %r", task) * * def run(self): # <<<<<<<<<<<<<< * while True: * if self.is_shutdown: */ /* 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_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("cassandra.cluster._Scheduler.run", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_run_at); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_task); __Pyx_XDECREF(__pyx_v_fn); __Pyx_XDECREF(__pyx_v_args); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_future); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4342 * time.sleep(0.1) * * def _log_if_failed(self, future): # <<<<<<<<<<<<<< * exc = future.exception() * if exc: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_13_log_if_failed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_10_Scheduler_13_log_if_failed = {"_log_if_failed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_10_Scheduler_13_log_if_failed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_10_Scheduler_13_log_if_failed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_self = 0; PyObject *__pyx_v_future = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_log_if_failed (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_future,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4342, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4342, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4342, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_log_if_failed", 0) < (0)) __PYX_ERR(0, 4342, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_log_if_failed", 1, 2, 2, i); __PYX_ERR(0, 4342, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4342, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4342, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_future = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_log_if_failed", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4342, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster._Scheduler._log_if_failed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_10_Scheduler_12_log_if_failed(__pyx_self, __pyx_v_self, __pyx_v_future); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_10_Scheduler_12_log_if_failed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_future) { PyObject *__pyx_v_exc = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_log_if_failed", 0); /* "cassandra/cluster.py":4343 * * def _log_if_failed(self, future): * exc = future.exception() # <<<<<<<<<<<<<< * if exc: * log.warning( */ __pyx_t_2 = __pyx_v_future; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_exception, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_exc = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4344 * def _log_if_failed(self, future): * exc = future.exception() * if exc: # <<<<<<<<<<<<<< * log.warning( * "An internally scheduled tasked failed with an unhandled exception:", */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_exc); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4344, __pyx_L1_error) if (__pyx_t_4) { /* "cassandra/cluster.py":4345 * exc = future.exception() * if exc: * log.warning( # <<<<<<<<<<<<<< * "An internally scheduled tasked failed with an unhandled exception:", * exc_info=exc) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4347 * log.warning( * "An internally scheduled tasked failed with an unhandled exception:", * exc_info=exc) # <<<<<<<<<<<<<< * * */ __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_An_internally_scheduled_tasked_f}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, __pyx_v_exc, __pyx_t_5, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4345, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4344 * def _log_if_failed(self, future): * exc = future.exception() * if exc: # <<<<<<<<<<<<<< * log.warning( * "An internally scheduled tasked failed with an unhandled exception:", */ } /* "cassandra/cluster.py":4342 * time.sleep(0.1) * * def _log_if_failed(self, future): # <<<<<<<<<<<<<< * exc = future.exception() * if exc: */ /* 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("cassandra.cluster._Scheduler._log_if_failed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4350 * * * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): # <<<<<<<<<<<<<< * try: * log.debug("Refreshing schema in response to schema change. " */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_37refresh_schema_and_set_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_37refresh_schema_and_set_result = {"refresh_schema_and_set_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_37refresh_schema_and_set_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_37refresh_schema_and_set_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_control_conn = 0; PyObject *__pyx_v_response_future = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("refresh_schema_and_set_result (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_control_conn,&__pyx_mstate_global->__pyx_n_u_response_future,&__pyx_mstate_global->__pyx_n_u_connection_2,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4350, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, kwd_pos_args, __pyx_kwds_len, "refresh_schema_and_set_result", 1) < (0)) __PYX_ERR(0, 4350, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("refresh_schema_and_set_result", 1, 3, 3, i); __PYX_ERR(0, 4350, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4350, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4350, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4350, __pyx_L3_error) } __pyx_v_control_conn = values[0]; __pyx_v_response_future = values[1]; __pyx_v_connection = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("refresh_schema_and_set_result", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4350, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.refresh_schema_and_set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_36refresh_schema_and_set_result(__pyx_self, __pyx_v_control_conn, __pyx_v_response_future, __pyx_v_connection, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_36refresh_schema_and_set_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_control_conn, PyObject *__pyx_v_response_future, PyObject *__pyx_v_connection, PyObject *__pyx_v_kwargs) { 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; size_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("refresh_schema_and_set_result", 0); /* "cassandra/cluster.py":4351 * * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): * try: # <<<<<<<<<<<<<< * log.debug("Refreshing schema in response to schema change. " * "%s", kwargs) */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":4352 * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): * try: * log.debug("Refreshing schema in response to schema change. " # <<<<<<<<<<<<<< * "%s", kwargs) * response_future.is_schema_agreed = control_conn._refresh_schema(connection, **kwargs) */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4352, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4352, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4353 * try: * log.debug("Refreshing schema in response to schema change. " * "%s", kwargs) # <<<<<<<<<<<<<< * response_future.is_schema_agreed = control_conn._refresh_schema(connection, **kwargs) * except Exception: */ __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Refreshing_schema_in_response_to, __pyx_v_kwargs}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4352, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4354 * log.debug("Refreshing schema in response to schema change. " * "%s", kwargs) * response_future.is_schema_agreed = control_conn._refresh_schema(connection, **kwargs) # <<<<<<<<<<<<<< * except Exception: * log.exception("Exception refreshing schema in response to schema change:") */ __pyx_t_7 = NULL; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_control_conn, __pyx_mstate_global->__pyx_n_u_refresh_schema_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_connection}; __pyx_t_4 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4354, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_response_future, __pyx_mstate_global->__pyx_n_u_is_schema_agreed, __pyx_t_4) < (0)) __PYX_ERR(0, 4354, __pyx_L6_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4351 * * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): * try: # <<<<<<<<<<<<<< * log.debug("Refreshing schema in response to schema change. " * "%s", kwargs) */ } __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_L11_try_end; __pyx_L6_error:; __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; /* "cassandra/cluster.py":4355 * "%s", kwargs) * response_future.is_schema_agreed = control_conn._refresh_schema(connection, **kwargs) * except Exception: # <<<<<<<<<<<<<< * log.exception("Exception refreshing schema in response to schema change:") * response_future.session.submit(control_conn.refresh_schema, **kwargs) */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_9) { __Pyx_AddTraceback("cassandra.cluster.refresh_schema_and_set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 4355, __pyx_L8_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /* "cassandra/cluster.py":4356 * response_future.is_schema_agreed = control_conn._refresh_schema(connection, **kwargs) * except Exception: * log.exception("Exception refreshing schema in response to schema change:") # <<<<<<<<<<<<<< * response_future.session.submit(control_conn.refresh_schema, **kwargs) * finally: */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4356, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4356, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_Exception_refreshing_schema_in_r}; __pyx_t_7 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4356, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":4357 * except Exception: * log.exception("Exception refreshing schema in response to schema change:") * response_future.session.submit(control_conn.refresh_schema, **kwargs) # <<<<<<<<<<<<<< * finally: * response_future._set_final_result(None) */ __pyx_t_12 = NULL; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_response_future, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4357, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4357, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_control_conn, __pyx_mstate_global->__pyx_n_u_refresh_schema); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4357, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_13 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4357, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_11))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_12); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10}; __pyx_t_7 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4357, __pyx_L8_except_error) __Pyx_GOTREF(__pyx_t_7); } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 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; goto __pyx_L7_exception_handled; } goto __pyx_L8_except_error; /* "cassandra/cluster.py":4351 * * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): * try: # <<<<<<<<<<<<<< * log.debug("Refreshing schema in response to schema change. " * "%s", kwargs) */ __pyx_L8_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L4_error; __pyx_L7_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L11_try_end:; } } /* "cassandra/cluster.py":4359 * response_future.session.submit(control_conn.refresh_schema, **kwargs) * finally: * response_future._set_final_result(None) # <<<<<<<<<<<<<< * * */ /*finally:*/ { /*normal exit:*/{ __pyx_t_5 = __pyx_v_response_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, Py_None}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } __pyx_L4_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 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; __Pyx_ExceptionSwap(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); if ( unlikely(__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0)) __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __pyx_t_5 = __pyx_v_response_future; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, Py_None}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4359, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestore(__pyx_t_3, __pyx_t_2, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L1_error; __pyx_L15_error:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; goto __pyx_L1_error; } __pyx_L5:; } /* "cassandra/cluster.py":4350 * * * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): # <<<<<<<<<<<<<< * try: * log.debug("Refreshing schema in response to schema change. " */ /* 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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("cassandra.cluster.refresh_schema_and_set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4435 * _warned_timeout = False * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, # <<<<<<<<<<<<<< * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): */ static PyObject *__pyx_pf_9cassandra_7cluster_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":4437 * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): # <<<<<<<<<<<<<< * self.session = session * # TODO: normalize handling of retry policy and row factory */ __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 4, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 5, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 6, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 7, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 8, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); /* "cassandra/cluster.py":4435 * _warned_timeout = False * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, # <<<<<<<<<<<<<< * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): */ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 4435, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_session = 0; PyObject *__pyx_v_message = 0; PyObject *__pyx_v_query = 0; PyObject *__pyx_v_timeout = 0; PyObject *__pyx_v_metrics = 0; PyObject *__pyx_v_prepared_statement = 0; PyObject *__pyx_v_retry_policy = 0; PyObject *__pyx_v_row_factory = 0; PyObject *__pyx_v_load_balancer = 0; PyObject *__pyx_v_start_time = 0; PyObject *__pyx_v_speculative_execution_plan = 0; PyObject *__pyx_v_continuous_paging_state = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[14] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_session,&__pyx_mstate_global->__pyx_n_u_message,&__pyx_mstate_global->__pyx_n_u_query,&__pyx_mstate_global->__pyx_n_u_timeout,&__pyx_mstate_global->__pyx_n_u_metrics,&__pyx_mstate_global->__pyx_n_u_prepared_statement,&__pyx_mstate_global->__pyx_n_u_retry_policy,&__pyx_mstate_global->__pyx_n_u_row_factory,&__pyx_mstate_global->__pyx_n_u_load_balancer_2,&__pyx_mstate_global->__pyx_n_u_start_time,&__pyx_mstate_global->__pyx_n_u_speculative_execution_plan,&__pyx_mstate_global->__pyx_n_u_continuous_paging_state,&__pyx_mstate_global->__pyx_n_u_host,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4435, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 14: values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 13: values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 12: values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 11: values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 4435, __pyx_L3_error) if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[7]) values[7] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":4436 * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, # <<<<<<<<<<<<<< * speculative_execution_plan=None, continuous_paging_state=None, host=None): * self.session = session */ if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":4437 * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): # <<<<<<<<<<<<<< * self.session = session * # TODO: normalize handling of retry policy and row factory */ if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[12]) values[12] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[13]) values[13] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 0, 5, 14, i); __PYX_ERR(0, 4435, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 14: values[13] = __Pyx_ArgRef_FASTCALL(__pyx_args, 13); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[13])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 13: values[12] = __Pyx_ArgRef_FASTCALL(__pyx_args, 12); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[12])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 12: values[11] = __Pyx_ArgRef_FASTCALL(__pyx_args, 11); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[11])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 11: values[10] = __Pyx_ArgRef_FASTCALL(__pyx_args, 10); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[10])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 10: values[9] = __Pyx_ArgRef_FASTCALL(__pyx_args, 9); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[9])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 9: values[8] = __Pyx_ArgRef_FASTCALL(__pyx_args, 8); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[8])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 8: values[7] = __Pyx_ArgRef_FASTCALL(__pyx_args, 7); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[7])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 4435, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4435, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4435, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4435, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4435, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4435, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "cassandra/cluster.py":4435 * _warned_timeout = False * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, # <<<<<<<<<<<<<< * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): */ if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[7]) values[7] = __Pyx_NewRef(__pyx_dynamic_args->arg0); /* "cassandra/cluster.py":4436 * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, # <<<<<<<<<<<<<< * speculative_execution_plan=None, continuous_paging_state=None, host=None): * self.session = session */ if (!values[8]) values[8] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[9]) values[9] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[10]) values[10] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":4437 * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): # <<<<<<<<<<<<<< * self.session = session * # TODO: normalize handling of retry policy and row factory */ if (!values[11]) values[11] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[12]) values[12] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[13]) values[13] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_session = values[1]; __pyx_v_message = values[2]; __pyx_v_query = values[3]; __pyx_v_timeout = values[4]; __pyx_v_metrics = values[5]; __pyx_v_prepared_statement = values[6]; __pyx_v_retry_policy = values[7]; __pyx_v_row_factory = values[8]; __pyx_v_load_balancer = values[9]; __pyx_v_start_time = values[10]; __pyx_v_speculative_execution_plan = values[11]; __pyx_v_continuous_paging_state = values[12]; __pyx_v_host = values[13]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 5, 14, __pyx_nargs); __PYX_ERR(0, 4435, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture___init__(__pyx_self, __pyx_v_self, __pyx_v_session, __pyx_v_message, __pyx_v_query, __pyx_v_timeout, __pyx_v_metrics, __pyx_v_prepared_statement, __pyx_v_retry_policy, __pyx_v_row_factory, __pyx_v_load_balancer, __pyx_v_start_time, __pyx_v_speculative_execution_plan, __pyx_v_continuous_paging_state, __pyx_v_host); /* "cassandra/cluster.py":4435 * _warned_timeout = False * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, # <<<<<<<<<<<<<< * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_session, PyObject *__pyx_v_message, PyObject *__pyx_v_query, PyObject *__pyx_v_timeout, PyObject *__pyx_v_metrics, PyObject *__pyx_v_prepared_statement, PyObject *__pyx_v_retry_policy, PyObject *__pyx_v_row_factory, PyObject *__pyx_v_load_balancer, PyObject *__pyx_v_start_time, PyObject *__pyx_v_speculative_execution_plan, PyObject *__pyx_v_continuous_paging_state, PyObject *__pyx_v_host) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":4438 * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): * self.session = session # <<<<<<<<<<<<<< * # TODO: normalize handling of retry policy and row factory * self.row_factory = row_factory or session.row_factory */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session, __pyx_v_session) < (0)) __PYX_ERR(0, 4438, __pyx_L1_error) /* "cassandra/cluster.py":4440 * self.session = session * # TODO: normalize handling of retry policy and row factory * self.row_factory = row_factory or session.row_factory # <<<<<<<<<<<<<< * self._load_balancer = load_balancer or session.cluster._default_load_balancing_policy * self.message = message */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_row_factory); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4440, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_row_factory); __pyx_t_1 = __pyx_v_row_factory; goto __pyx_L3_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L3_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_1) < (0)) __PYX_ERR(0, 4440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4441 * # TODO: normalize handling of retry policy and row factory * self.row_factory = row_factory or session.row_factory * self._load_balancer = load_balancer or session.cluster._default_load_balancing_policy # <<<<<<<<<<<<<< * self.message = message * self.query = query */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_load_balancer); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4441, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_load_balancer); __pyx_t_1 = __pyx_v_load_balancer; goto __pyx_L5_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_session, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_default_load_balancing_policy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_L5_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancer, __pyx_t_1) < (0)) __PYX_ERR(0, 4441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4442 * self.row_factory = row_factory or session.row_factory * self._load_balancer = load_balancer or session.cluster._default_load_balancing_policy * self.message = message # <<<<<<<<<<<<<< * self.query = query * self.timeout = timeout */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message, __pyx_v_message) < (0)) __PYX_ERR(0, 4442, __pyx_L1_error) /* "cassandra/cluster.py":4443 * self._load_balancer = load_balancer or session.cluster._default_load_balancing_policy * self.message = message * self.query = query # <<<<<<<<<<<<<< * self.timeout = timeout * self._retry_policy = retry_policy */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query, __pyx_v_query) < (0)) __PYX_ERR(0, 4443, __pyx_L1_error) /* "cassandra/cluster.py":4444 * self.message = message * self.query = query * self.timeout = timeout # <<<<<<<<<<<<<< * self._retry_policy = retry_policy * self._metrics = metrics */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout, __pyx_v_timeout) < (0)) __PYX_ERR(0, 4444, __pyx_L1_error) /* "cassandra/cluster.py":4445 * self.query = query * self.timeout = timeout * self._retry_policy = retry_policy # <<<<<<<<<<<<<< * self._metrics = metrics * self.prepared_statement = prepared_statement */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_retry_policy_2, __pyx_v_retry_policy) < (0)) __PYX_ERR(0, 4445, __pyx_L1_error) /* "cassandra/cluster.py":4446 * self.timeout = timeout * self._retry_policy = retry_policy * self._metrics = metrics # <<<<<<<<<<<<<< * self.prepared_statement = prepared_statement * self._callback_lock = Lock() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2, __pyx_v_metrics) < (0)) __PYX_ERR(0, 4446, __pyx_L1_error) /* "cassandra/cluster.py":4447 * self._retry_policy = retry_policy * self._metrics = metrics * self.prepared_statement = prepared_statement # <<<<<<<<<<<<<< * self._callback_lock = Lock() * self._start_time = start_time or time.time() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement, __pyx_v_prepared_statement) < (0)) __PYX_ERR(0, 4447, __pyx_L1_error) /* "cassandra/cluster.py":4448 * self._metrics = metrics * self.prepared_statement = prepared_statement * self._callback_lock = Lock() # <<<<<<<<<<<<<< * self._start_time = start_time or time.time() * self._host = host */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_Lock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callback_lock, __pyx_t_1) < (0)) __PYX_ERR(0, 4448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4449 * self.prepared_statement = prepared_statement * self._callback_lock = Lock() * self._start_time = start_time or time.time() # <<<<<<<<<<<<<< * self._host = host * self._spec_execution_plan = speculative_execution_plan or self._spec_execution_plan */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_start_time); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4449, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_start_time); __pyx_t_1 = __pyx_v_start_time; goto __pyx_L7_bool_binop_done; } __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L7_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_start_time_2, __pyx_t_1) < (0)) __PYX_ERR(0, 4449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4450 * self._callback_lock = Lock() * self._start_time = start_time or time.time() * self._host = host # <<<<<<<<<<<<<< * self._spec_execution_plan = speculative_execution_plan or self._spec_execution_plan * self._make_query_plan() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_host_2, __pyx_v_host) < (0)) __PYX_ERR(0, 4450, __pyx_L1_error) /* "cassandra/cluster.py":4451 * self._start_time = start_time or time.time() * self._host = host * self._spec_execution_plan = speculative_execution_plan or self._spec_execution_plan # <<<<<<<<<<<<<< * self._make_query_plan() * self._event = Event() */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_speculative_execution_plan); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4451, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v_speculative_execution_plan); __pyx_t_1 = __pyx_v_speculative_execution_plan; goto __pyx_L9_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_execution_plan); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_L9_bool_binop_done:; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_execution_plan, __pyx_t_1) < (0)) __PYX_ERR(0, 4451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4452 * self._host = host * self._spec_execution_plan = speculative_execution_plan or self._spec_execution_plan * self._make_query_plan() # <<<<<<<<<<<<<< * self._event = Event() * self._errors = {} */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_query_plan_2, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4453 * self._spec_execution_plan = speculative_execution_plan or self._spec_execution_plan * self._make_query_plan() * self._event = Event() # <<<<<<<<<<<<<< * self._errors = {} * self._callbacks = [] */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_Event); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2, __pyx_t_1) < (0)) __PYX_ERR(0, 4453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4454 * self._make_query_plan() * self._event = Event() * self._errors = {} # <<<<<<<<<<<<<< * self._callbacks = [] * self._errbacks = [] */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2, __pyx_t_1) < (0)) __PYX_ERR(0, 4454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4455 * self._event = Event() * self._errors = {} * self._callbacks = [] # <<<<<<<<<<<<<< * self._errbacks = [] * self.attempted_hosts = [] */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callbacks, __pyx_t_1) < (0)) __PYX_ERR(0, 4455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4456 * self._errors = {} * self._callbacks = [] * self._errbacks = [] # <<<<<<<<<<<<<< * self.attempted_hosts = [] * self._start_timer() */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errbacks, __pyx_t_1) < (0)) __PYX_ERR(0, 4456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4457 * self._callbacks = [] * self._errbacks = [] * self.attempted_hosts = [] # <<<<<<<<<<<<<< * self._start_timer() * self._continuous_paging_state = continuous_paging_state */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted_hosts, __pyx_t_1) < (0)) __PYX_ERR(0, 4457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4458 * self._errbacks = [] * self.attempted_hosts = [] * self._start_timer() # <<<<<<<<<<<<<< * self._continuous_paging_state = continuous_paging_state * */ __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_timer, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4459 * self.attempted_hosts = [] * self._start_timer() * self._continuous_paging_state = continuous_paging_state # <<<<<<<<<<<<<< * * @property */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_continuous_paging_state_2, __pyx_v_continuous_paging_state) < (0)) __PYX_ERR(0, 4459, __pyx_L1_error) /* "cassandra/cluster.py":4435 * _warned_timeout = False * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, # <<<<<<<<<<<<<< * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): */ /* 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_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4461 * self._continuous_paging_state = continuous_paging_state * * @property # <<<<<<<<<<<<<< * def _time_remaining(self): * if self.timeout is None: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_3_time_remaining(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_3_time_remaining = {"_time_remaining", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_3_time_remaining, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_3_time_remaining(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_time_remaining (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4461, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4461, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_time_remaining", 0) < (0)) __PYX_ERR(0, 4461, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_time_remaining", 1, 1, 1, i); __PYX_ERR(0, 4461, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4461, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_time_remaining", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4461, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._time_remaining", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_2_time_remaining(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_2_time_remaining(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_time_remaining", 0); /* "cassandra/cluster.py":4463 * @property * def _time_remaining(self): * if self.timeout is None: # <<<<<<<<<<<<<< * return None * return (self._start_time + self.timeout) - time.time() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4464 * def _time_remaining(self): * if self.timeout is None: * return None # <<<<<<<<<<<<<< * return (self._start_time + self.timeout) - time.time() * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4463 * @property * def _time_remaining(self): * if self.timeout is None: # <<<<<<<<<<<<<< * return None * return (self._start_time + self.timeout) - time.time() */ } /* "cassandra/cluster.py":4465 * if self.timeout is None: * return None * return (self._start_time + self.timeout) - time.time() # <<<<<<<<<<<<<< * * def _start_timer(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_start_time_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_6 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4461 * self._continuous_paging_state = continuous_paging_state * * @property # <<<<<<<<<<<<<< * def _time_remaining(self): * if self.timeout is None: */ /* function exit code */ __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_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._time_remaining", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4467 * return (self._start_time + self.timeout) - time.time() * * def _start_timer(self): # <<<<<<<<<<<<<< * if self._timer is None: * spec_delay = self._spec_execution_plan.next_execution(self._current_host) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_5_start_timer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_5_start_timer = {"_start_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_5_start_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_5_start_timer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_start_timer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4467, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4467, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_start_timer", 0) < (0)) __PYX_ERR(0, 4467, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_start_timer", 1, 1, 1, i); __PYX_ERR(0, 4467, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4467, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_start_timer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4467, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._start_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_4_start_timer(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_4_start_timer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_spec_delay = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_start_timer", 0); /* "cassandra/cluster.py":4468 * * def _start_timer(self): * if self._timer is None: # <<<<<<<<<<<<<< * spec_delay = self._spec_execution_plan.next_execution(self._current_host) * if spec_delay >= 0: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4469 * def _start_timer(self): * if self._timer is None: * spec_delay = self._spec_execution_plan.next_execution(self._current_host) # <<<<<<<<<<<<<< * if spec_delay >= 0: * if self._time_remaining is None or self._time_remaining > spec_delay: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_spec_execution_plan); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next_execution, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_spec_delay = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4470 * if self._timer is None: * spec_delay = self._spec_execution_plan.next_execution(self._current_host) * if spec_delay >= 0: # <<<<<<<<<<<<<< * if self._time_remaining is None or self._time_remaining > spec_delay: * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_spec_delay, __pyx_mstate_global->__pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4470, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 4470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4471 * spec_delay = self._spec_execution_plan.next_execution(self._current_host) * if spec_delay >= 0: * if self._time_remaining is None or self._time_remaining > spec_delay: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) * return */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_spec_delay, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4471, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4471, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_7; __pyx_L6_bool_binop_done:; if (__pyx_t_2) { /* "cassandra/cluster.py":4472 * if spec_delay >= 0: * if self._time_remaining is None or self._time_remaining > spec_delay: * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) # <<<<<<<<<<<<<< * return * if self._time_remaining is not None: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_speculative_execute); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_spec_delay, __pyx_t_3}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_timer, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer, __pyx_t_4) < (0)) __PYX_ERR(0, 4472, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4473 * if self._time_remaining is None or self._time_remaining > spec_delay: * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) * return # <<<<<<<<<<<<<< * if self._time_remaining is not None: * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4471 * spec_delay = self._spec_execution_plan.next_execution(self._current_host) * if spec_delay >= 0: * if self._time_remaining is None or self._time_remaining > spec_delay: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) * return */ } /* "cassandra/cluster.py":4470 * if self._timer is None: * spec_delay = self._spec_execution_plan.next_execution(self._current_host) * if spec_delay >= 0: # <<<<<<<<<<<<<< * if self._time_remaining is None or self._time_remaining > spec_delay: * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) */ } /* "cassandra/cluster.py":4474 * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) * return * if self._time_remaining is not None: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_remaining); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = (__pyx_t_4 != Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4475 * return * if self._time_remaining is not None: * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) # <<<<<<<<<<<<<< * * def _cancel_timer(self): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_timeout); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_1, __pyx_t_8}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_timer, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer, __pyx_t_4) < (0)) __PYX_ERR(0, 4475, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4474 * self._timer = self.session.cluster.connection_class.create_timer(spec_delay, self._on_speculative_execute) * return * if self._time_remaining is not None: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) * */ } /* "cassandra/cluster.py":4468 * * def _start_timer(self): * if self._timer is None: # <<<<<<<<<<<<<< * spec_delay = self._spec_execution_plan.next_execution(self._current_host) * if spec_delay >= 0: */ } /* "cassandra/cluster.py":4467 * return (self._start_time + self.timeout) - time.time() * * def _start_timer(self): # <<<<<<<<<<<<<< * if self._timer is None: * spec_delay = self._spec_execution_plan.next_execution(self._current_host) */ /* 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_8); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._start_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_spec_delay); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4477 * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) * * def _cancel_timer(self): # <<<<<<<<<<<<<< * if self._timer: * self._timer.cancel() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_7_cancel_timer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_7_cancel_timer = {"_cancel_timer", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_7_cancel_timer, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_7_cancel_timer(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_cancel_timer (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4477, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4477, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_cancel_timer", 0) < (0)) __PYX_ERR(0, 4477, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_cancel_timer", 1, 1, 1, i); __PYX_ERR(0, 4477, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4477, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_cancel_timer", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4477, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._cancel_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_6_cancel_timer(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_6_cancel_timer(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_cancel_timer", 0); /* "cassandra/cluster.py":4478 * * def _cancel_timer(self): * if self._timer: # <<<<<<<<<<<<<< * self._timer.cancel() * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4478, __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(0, 4478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4479 * def _cancel_timer(self): * if self._timer: * self._timer.cancel() # <<<<<<<<<<<<<< * * def _on_timeout(self, _attempts=0): */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4478 * * def _cancel_timer(self): * if self._timer: # <<<<<<<<<<<<<< * self._timer.cancel() * */ } /* "cassandra/cluster.py":4477 * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) * * def _cancel_timer(self): # <<<<<<<<<<<<<< * if self._timer: * self._timer.cancel() */ /* 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_AddTraceback("cassandra.cluster.ResponseFuture._cancel_timer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4481 * self._timer.cancel() * * def _on_timeout(self, _attempts=0): # <<<<<<<<<<<<<< * """ * Called when the request associated with this ResponseFuture times out. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_9_on_timeout(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_8_on_timeout, "\n Called when the request associated with this ResponseFuture times out.\n\n This function may reschedule itself. The ``_attempts`` parameter tracks\n the number of times this has happened. This parameter should only be\n set in those cases, where ``_on_timeout`` reschedules itself.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_9_on_timeout = {"_on_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_9_on_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_8_on_timeout}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_9_on_timeout(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v__attempts = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_on_timeout (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_attempts,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4481, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4481, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4481, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_on_timeout", 0) < (0)) __PYX_ERR(0, 4481, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_on_timeout", 0, 1, 2, i); __PYX_ERR(0, 4481, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4481, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4481, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_0))); } __pyx_v_self = values[0]; __pyx_v__attempts = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_on_timeout", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4481, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._on_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_8_on_timeout(__pyx_self, __pyx_v_self, __pyx_v__attempts); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_8_on_timeout(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__attempts) { PyObject *__pyx_v_key = NULL; PyObject *__pyx_v_errors = NULL; PyObject *__pyx_v_pool = NULL; PyObject *__pyx_v_connection = NULL; PyObject *__pyx_v_host = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; 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; PyObject *__pyx_t_10 = NULL; size_t __pyx_t_11; 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; PyObject *__pyx_t_18 = NULL; Py_ssize_t __pyx_t_19; PyObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_on_timeout", 0); /* "cassandra/cluster.py":4490 * """ * # PYTHON-853: for short timeouts, we sometimes race with our __init__ * if self._connection is None and _attempts < 3: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer( * 0.01, */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_t_2 == Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = PyObject_RichCompare(__pyx_v__attempts, __pyx_mstate_global->__pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4490, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":4491 * # PYTHON-853: for short timeouts, we sometimes race with our __init__ * if self._connection is None and _attempts < 3: * self._timer = self.session.cluster.connection_class.create_timer( # <<<<<<<<<<<<<< * 0.01, * partial(self._on_timeout, _attempts=_attempts + 1) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); /* "cassandra/cluster.py":4493 * self._timer = self.session.cluster.connection_class.create_timer( * 0.01, * partial(self._on_timeout, _attempts=_attempts + 1) # <<<<<<<<<<<<<< * ) * return */ __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_timeout); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyLong_AddObjC(__pyx_v__attempts, __pyx_mstate_global->__pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_7, __pyx_t_9}; __pyx_t_12 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_attempts, __pyx_t_10, __pyx_t_12, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4493, __pyx_L1_error) __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_12); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_11 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_mstate_global->__pyx_float_0_01, __pyx_t_6}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_timer, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } /* "cassandra/cluster.py":4491 * # PYTHON-853: for short timeouts, we sometimes race with our __init__ * if self._connection is None and _attempts < 3: * self._timer = self.session.cluster.connection_class.create_timer( # <<<<<<<<<<<<<< * 0.01, * partial(self._on_timeout, _attempts=_attempts + 1) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer, __pyx_t_2) < (0)) __PYX_ERR(0, 4491, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4495 * partial(self._on_timeout, _attempts=_attempts + 1) * ) * return # <<<<<<<<<<<<<< * * if self._connection is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4490 * """ * # PYTHON-853: for short timeouts, we sometimes race with our __init__ * if self._connection is None and _attempts < 3: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer( * 0.01, */ } /* "cassandra/cluster.py":4497 * return * * if self._connection is not None: # <<<<<<<<<<<<<< * try: * self._connection._requests.pop(self._req_id) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4498 * * if self._connection is not None: * try: # <<<<<<<<<<<<<< * self._connection._requests.pop(self._req_id) * # PYTHON-1044 */ { __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:*/ { /* "cassandra/cluster.py":4499 * if self._connection is not None: * try: * self._connection._requests.pop(self._req_id) # <<<<<<<<<<<<<< * # PYTHON-1044 * # This request might have been removed from the connection after the latter was defunct by heartbeat. */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4499, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_requests); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4499, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_req_id); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4499, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_pop, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4499, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4498 * * if self._connection is not None: * try: # <<<<<<<<<<<<<< * self._connection._requests.pop(self._req_id) * # PYTHON-1044 */ } __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_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4504 * # We should still raise OperationTimedOut to reject the future so that the main event thread will not * # wait for it endlessly * except KeyError: # <<<<<<<<<<<<<< * key = "Connection defunct by heartbeat" * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} */ __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError)))); if (__pyx_t_16) { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._on_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 4504, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_6); /* "cassandra/cluster.py":4505 * # wait for it endlessly * except KeyError: * key = "Connection defunct by heartbeat" # <<<<<<<<<<<<<< * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} * self._set_final_exception(OperationTimedOut(errors, self._current_host)) */ __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_Connection_defunct_by_heartbeat); __pyx_v_key = __pyx_mstate_global->__pyx_kp_u_Connection_defunct_by_heartbeat; /* "cassandra/cluster.py":4506 * except KeyError: * key = "Connection defunct by heartbeat" * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} # <<<<<<<<<<<<<< * self._set_final_exception(OperationTimedOut(errors, self._current_host)) * return */ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4506, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_v_key, __pyx_mstate_global->__pyx_kp_u_Client_request_timeout_See_Sessi) < (0)) __PYX_ERR(0, 4506, __pyx_L9_except_error) __pyx_v_errors = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":4507 * key = "Connection defunct by heartbeat" * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} * self._set_final_exception(OperationTimedOut(errors, self._current_host)) # <<<<<<<<<<<<<< * return * */ __pyx_t_8 = __pyx_v_self; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_OperationTimedOut); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4507, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4507, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_errors, __pyx_t_7}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4507, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); } __pyx_t_11 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_12}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4507, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4508 * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} * self._set_final_exception(OperationTimedOut(errors, self._current_host)) * return # <<<<<<<<<<<<<< * * pool = self.session._pools.get(self._current_host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L10_except_return; } goto __pyx_L9_except_error; /* "cassandra/cluster.py":4498 * * if self._connection is not None: * try: # <<<<<<<<<<<<<< * self._connection._requests.pop(self._req_id) * # PYTHON-1044 */ __pyx_L9_except_error:; __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_L1_error; __pyx_L10_except_return:; __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_L0; __pyx_L12_try_end:; } /* "cassandra/cluster.py":4510 * return * * pool = self.session._pools.get(self._current_host) # <<<<<<<<<<<<<< * if pool and not pool.is_shutdown: * # Do not return the stream ID to the pool yet. We cannot reuse it */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_11 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_v_pool = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":4511 * * pool = self.session._pools.get(self._current_host) * if pool and not pool.is_shutdown: # <<<<<<<<<<<<<< * # Do not return the stream ID to the pool yet. We cannot reuse it * # because the node might still be processing the query and will */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_pool); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4511, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L16_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 4511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_17 = (!__pyx_t_3); __pyx_t_1 = __pyx_t_17; __pyx_L16_bool_binop_done:; if (__pyx_t_1) { /* "cassandra/cluster.py":4517 * # before the response to the previous query has arrived, the new * # query could get a response from the old query * with self._connection.lock: # <<<<<<<<<<<<<< * self._connection.orphaned_request_ids.add(self._req_id) * if len(self._connection.orphaned_request_ids) >= self._connection.orphaned_threshold: */ /*with:*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_lock_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_2 = NULL; __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4517, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_11, (1-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4517, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_13, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_14); __Pyx_XGOTREF(__pyx_t_13); __Pyx_XGOTREF(__pyx_t_18); /*try:*/ { /* "cassandra/cluster.py":4518 * # query could get a response from the old query * with self._connection.lock: * self._connection.orphaned_request_ids.add(self._req_id) # <<<<<<<<<<<<<< * if len(self._connection.orphaned_request_ids) >= self._connection.orphaned_threshold: * self._connection.orphaned_threshold_reached = True */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4518, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_orphaned_request_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4518, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_req_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4518, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_add, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4518, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4519 * with self._connection.lock: * self._connection.orphaned_request_ids.add(self._req_id) * if len(self._connection.orphaned_request_ids) >= self._connection.orphaned_threshold: # <<<<<<<<<<<<<< * self._connection.orphaned_threshold_reached = True * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_orphaned_request_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_19 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyLong_FromSsize_t(__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_orphaned_threshold); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4519, __pyx_L22_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4520 * self._connection.orphaned_request_ids.add(self._req_id) * if len(self._connection.orphaned_request_ids) >= self._connection.orphaned_threshold: * self._connection.orphaned_threshold_reached = True # <<<<<<<<<<<<<< * * pool.return_connection(self._connection, stream_was_orphaned=True) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4520, __pyx_L22_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_orphaned_threshold_reached, Py_True) < (0)) __PYX_ERR(0, 4520, __pyx_L22_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4519 * with self._connection.lock: * self._connection.orphaned_request_ids.add(self._req_id) * if len(self._connection.orphaned_request_ids) >= self._connection.orphaned_threshold: # <<<<<<<<<<<<<< * self._connection.orphaned_threshold_reached = True * */ } /* "cassandra/cluster.py":4517 * # before the response to the previous query has arrived, the new * # query could get a response from the old query * with self._connection.lock: # <<<<<<<<<<<<<< * self._connection.orphaned_request_ids.add(self._req_id) * if len(self._connection.orphaned_request_ids) >= self._connection.orphaned_threshold: */ } __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L27_try_end; __pyx_L22_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._on_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 4517, __pyx_L24_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __pyx_t_6 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4517, __pyx_L24_except_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_6, NULL); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 4517, __pyx_L24_except_error) __Pyx_GOTREF(__pyx_t_20); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_20); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; if (__pyx_t_1 < (0)) __PYX_ERR(0, 4517, __pyx_L24_except_error) __pyx_t_17 = (!__pyx_t_1); if (unlikely(__pyx_t_17)) { __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_2); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 4517, __pyx_L24_except_error) } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L23_exception_handled; } __pyx_L24_except_error:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_18); goto __pyx_L1_error; __pyx_L23_exception_handled:; __Pyx_XGIVEREF(__pyx_t_14); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_13, __pyx_t_18); __pyx_L27_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_15) { __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 4517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } goto __pyx_L21; } __pyx_L21:; } goto __pyx_L32; __pyx_L18_error:; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L1_error; __pyx_L32:; } /* "cassandra/cluster.py":4522 * self._connection.orphaned_threshold_reached = True * * pool.return_connection(self._connection, stream_was_orphaned=True) # <<<<<<<<<<<<<< * * errors = self._errors */ __pyx_t_4 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_11 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_4, __pyx_t_5}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_stream_was_orphaned, Py_True, __pyx_t_6, __pyx_callargs+2, 0) < (0)) __PYX_ERR(0, 4522, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_return_connection, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4511 * * pool = self.session._pools.get(self._current_host) * if pool and not pool.is_shutdown: # <<<<<<<<<<<<<< * # Do not return the stream ID to the pool yet. We cannot reuse it * # because the node might still be processing the query and will */ } /* "cassandra/cluster.py":4497 * return * * if self._connection is not None: # <<<<<<<<<<<<<< * try: * self._connection._requests.pop(self._req_id) */ } /* "cassandra/cluster.py":4524 * pool.return_connection(self._connection, stream_was_orphaned=True) * * errors = self._errors # <<<<<<<<<<<<<< * if not errors: * if self.is_schema_agreed: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_errors = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":4525 * * errors = self._errors * if not errors: # <<<<<<<<<<<<<< * if self.is_schema_agreed: * key = str(self._current_host.endpoint) if self._current_host else 'no host queried before timeout' */ __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_errors); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 4525, __pyx_L1_error) __pyx_t_1 = (!__pyx_t_17); if (__pyx_t_1) { /* "cassandra/cluster.py":4526 * errors = self._errors * if not errors: * if self.is_schema_agreed: # <<<<<<<<<<<<<< * key = str(self._current_host.endpoint) if self._current_host else 'no host queried before timeout' * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_schema_agreed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4527 * if not errors: * if self.is_schema_agreed: * key = str(self._current_host.endpoint) if self._current_host else 'no host queried before timeout' # <<<<<<<<<<<<<< * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} * else: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_no_host_queried_before_timeout); __pyx_t_2 = __pyx_mstate_global->__pyx_kp_u_no_host_queried_before_timeout; } __pyx_v_key = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4528 * if self.is_schema_agreed: * key = str(self._current_host.endpoint) if self._current_host else 'no host queried before timeout' * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} # <<<<<<<<<<<<<< * else: * connection = self.session.cluster.control_connection._connection */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_v_key, __pyx_mstate_global->__pyx_kp_u_Client_request_timeout_See_Sessi) < (0)) __PYX_ERR(0, 4528, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_errors, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4526 * errors = self._errors * if not errors: * if self.is_schema_agreed: # <<<<<<<<<<<<<< * key = str(self._current_host.endpoint) if self._current_host else 'no host queried before timeout' * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} */ goto __pyx_L34; } /* "cassandra/cluster.py":4530 * errors = {key: "Client request timeout. See Session.execute[_async](timeout)"} * else: * connection = self.session.cluster.control_connection._connection # <<<<<<<<<<<<<< * host = str(connection.endpoint) if connection else 'unknown' * errors = {host: "Request timed out while waiting for schema agreement. See Session.execute[_async](timeout) and Cluster.max_schema_agreement_wait."} */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_connection = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":4531 * else: * connection = self.session.cluster.control_connection._connection * host = str(connection.endpoint) if connection else 'unknown' # <<<<<<<<<<<<<< * errors = {host: "Request timed out while waiting for schema agreement. See Session.execute[_async](timeout) and Cluster.max_schema_agreement_wait."} * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_connection); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4531, __pyx_L1_error) if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_connection, __pyx_mstate_global->__pyx_n_u_endpoint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_Unicode(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __pyx_t_5; __pyx_t_5 = 0; } else { __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_unknown); __pyx_t_6 = __pyx_mstate_global->__pyx_n_u_unknown; } __pyx_v_host = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4532 * connection = self.session.cluster.control_connection._connection * host = str(connection.endpoint) if connection else 'unknown' * errors = {host: "Request timed out while waiting for schema agreement. See Session.execute[_async](timeout) and Cluster.max_schema_agreement_wait."} # <<<<<<<<<<<<<< * * self._set_final_exception(OperationTimedOut(errors, self._current_host)) */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_v_host, __pyx_mstate_global->__pyx_kp_u_Request_timed_out_while_waiting) < (0)) __PYX_ERR(0, 4532, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_errors, __pyx_t_6); __pyx_t_6 = 0; } __pyx_L34:; /* "cassandra/cluster.py":4525 * * errors = self._errors * if not errors: # <<<<<<<<<<<<<< * if self.is_schema_agreed: * key = str(self._current_host.endpoint) if self._current_host else 'no host queried before timeout' */ } /* "cassandra/cluster.py":4534 * errors = {host: "Request timed out while waiting for schema agreement. See Session.execute[_async](timeout) and Cluster.max_schema_agreement_wait."} * * self._set_final_exception(OperationTimedOut(errors, self._current_host)) # <<<<<<<<<<<<<< * * def _on_speculative_execute(self): */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_OperationTimedOut); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_errors, __pyx_t_8}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_11, (3-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_11 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4481 * self._timer.cancel() * * def _on_timeout(self, _attempts=0): # <<<<<<<<<<<<<< * """ * Called when the request associated with this ResponseFuture times out. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __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_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._on_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_key); __Pyx_XDECREF(__pyx_v_errors); __Pyx_XDECREF(__pyx_v_pool); __Pyx_XDECREF(__pyx_v_connection); __Pyx_XDECREF(__pyx_v_host); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4536 * self._set_final_exception(OperationTimedOut(errors, self._current_host)) * * def _on_speculative_execute(self): # <<<<<<<<<<<<<< * self._timer = None * if not self._event.is_set(): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_11_on_speculative_execute(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_11_on_speculative_execute = {"_on_speculative_execute", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_11_on_speculative_execute, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_11_on_speculative_execute(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_on_speculative_execute (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4536, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4536, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_on_speculative_execute", 0) < (0)) __PYX_ERR(0, 4536, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_on_speculative_execute", 1, 1, 1, i); __PYX_ERR(0, 4536, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4536, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_on_speculative_execute", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4536, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._on_speculative_execute", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_10_on_speculative_execute(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_10_on_speculative_execute(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_on_speculative_execute", 0); /* "cassandra/cluster.py":4537 * * def _on_speculative_execute(self): * self._timer = None # <<<<<<<<<<<<<< * if not self._event.is_set(): * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer, Py_None) < (0)) __PYX_ERR(0, 4537, __pyx_L1_error) /* "cassandra/cluster.py":4538 * def _on_speculative_execute(self): * self._timer = None * if not self._event.is_set(): # <<<<<<<<<<<<<< * * # PYTHON-836, the speculative queries must be after */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_set, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (!__pyx_t_5); if (__pyx_t_6) { /* "cassandra/cluster.py":4547 * # We reschedule this call until the main thread has succeeded * # making a query * if not self.attempted_hosts: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer(0.01, self._on_speculative_execute) * return */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted_hosts); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (!__pyx_t_6); if (__pyx_t_5) { /* "cassandra/cluster.py":4548 * # making a query * if not self.attempted_hosts: * self._timer = self.session.cluster.connection_class.create_timer(0.01, self._on_speculative_execute) # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_connection_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_on_speculative_execute); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_float_0_01, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_create_timer, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timer, __pyx_t_1) < (0)) __PYX_ERR(0, 4548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4549 * if not self.attempted_hosts: * self._timer = self.session.cluster.connection_class.create_timer(0.01, self._on_speculative_execute) * return # <<<<<<<<<<<<<< * * if self._time_remaining is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4547 * # We reschedule this call until the main thread has succeeded * # making a query * if not self.attempted_hosts: # <<<<<<<<<<<<<< * self._timer = self.session.cluster.connection_class.create_timer(0.01, self._on_speculative_execute) * return */ } /* "cassandra/cluster.py":4551 * return * * if self._time_remaining is not None: # <<<<<<<<<<<<<< * if self._time_remaining <= 0: * self._on_timeout() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":4552 * * if self._time_remaining is not None: * if self._time_remaining <= 0: # <<<<<<<<<<<<<< * self._on_timeout() * return */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_time_remaining); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_mstate_global->__pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { /* "cassandra/cluster.py":4553 * if self._time_remaining is not None: * if self._time_remaining <= 0: * self._on_timeout() # <<<<<<<<<<<<<< * return * self.send_request(error_no_hosts=False) */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_timeout, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4554 * if self._time_remaining <= 0: * self._on_timeout() * return # <<<<<<<<<<<<<< * self.send_request(error_no_hosts=False) * self._start_timer() */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4552 * * if self._time_remaining is not None: * if self._time_remaining <= 0: # <<<<<<<<<<<<<< * self._on_timeout() * return */ } /* "cassandra/cluster.py":4551 * return * * if self._time_remaining is not None: # <<<<<<<<<<<<<< * if self._time_remaining <= 0: * self._on_timeout() */ } /* "cassandra/cluster.py":4555 * self._on_timeout() * return * self.send_request(error_no_hosts=False) # <<<<<<<<<<<<<< * self._start_timer() * */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_1, NULL}; __pyx_t_7 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_error_no_hosts, Py_False, __pyx_t_7, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4555, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_7); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4556 * return * self.send_request(error_no_hosts=False) * self._start_timer() # <<<<<<<<<<<<<< * * def _make_query_plan(self): */ __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_timer, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4538 * def _on_speculative_execute(self): * self._timer = None * if not self._event.is_set(): # <<<<<<<<<<<<<< * * # PYTHON-836, the speculative queries must be after */ } /* "cassandra/cluster.py":4536 * self._set_final_exception(OperationTimedOut(errors, self._current_host)) * * def _on_speculative_execute(self): # <<<<<<<<<<<<<< * self._timer = None * if not self._event.is_set(): */ /* 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_7); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._on_speculative_execute", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4558 * self._start_timer() * * def _make_query_plan(self): # <<<<<<<<<<<<<< * # set the query_plan according to the load balancing policy, * # or to the explicit host target if set */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_13_make_query_plan(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_13_make_query_plan = {"_make_query_plan", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_13_make_query_plan, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_13_make_query_plan(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_query_plan (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4558, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4558, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_make_query_plan", 0) < (0)) __PYX_ERR(0, 4558, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_make_query_plan", 1, 1, 1, i); __PYX_ERR(0, 4558, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4558, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_make_query_plan", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4558, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._make_query_plan", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_12_make_query_plan(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_12_make_query_plan(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_query_plan", 0); /* "cassandra/cluster.py":4561 * # set the query_plan according to the load balancing policy, * # or to the explicit host target if set * if self._host: # <<<<<<<<<<<<<< * # returning a single value effectively disables retries * self.query_plan = [self._host] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_host_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4561, __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(0, 4561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4563 * if self._host: * # returning a single value effectively disables retries * self.query_plan = [self._host] # <<<<<<<<<<<<<< * else: * # convert the list/generator/etc to an iterator so that subsequent */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_host_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 4563, __pyx_L1_error); __pyx_t_1 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_plan, __pyx_t_3) < (0)) __PYX_ERR(0, 4563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4561 * # set the query_plan according to the load balancing policy, * # or to the explicit host target if set * if self._host: # <<<<<<<<<<<<<< * # returning a single value effectively disables retries * self.query_plan = [self._host] */ goto __pyx_L3; } /* "cassandra/cluster.py":4568 * # calls to send_request (which retries may do) will resume where * # they last left off * self.query_plan = iter(self._load_balancer.make_query_plan(self.session.keyspace, self.query)) # <<<<<<<<<<<<<< * * def send_request(self, error_no_hosts=True): */ /*else*/ { __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_load_balancer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_t_6, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_query_plan, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_plan, __pyx_t_4) < (0)) __PYX_ERR(0, 4568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L3:; /* "cassandra/cluster.py":4558 * self._start_timer() * * def _make_query_plan(self): # <<<<<<<<<<<<<< * # set the query_plan according to the load balancing policy, * # or to the explicit host target if set */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._make_query_plan", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4570 * self.query_plan = iter(self._load_balancer.make_query_plan(self.session.keyspace, self.query)) * * def send_request(self, error_no_hosts=True): # <<<<<<<<<<<<<< * """ Internal """ * # query_plan is an iterator, so this will resume where we last left */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_15send_request(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_14send_request, " Internal "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_15send_request = {"send_request", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_15send_request, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_14send_request}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_15send_request(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_error_no_hosts = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_request (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_error_no_hosts,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4570, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4570, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4570, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "send_request", 0) < (0)) __PYX_ERR(0, 4570, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("send_request", 0, 1, 2, i); __PYX_ERR(0, 4570, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4570, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4570, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True))); } __pyx_v_self = values[0]; __pyx_v_error_no_hosts = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("send_request", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 4570, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.send_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_14send_request(__pyx_self, __pyx_v_self, __pyx_v_error_no_hosts); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_14send_request(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_error_no_hosts) { PyObject *__pyx_v_host = NULL; PyObject *__pyx_v_req_id = 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; size_t __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_request", 0); /* "cassandra/cluster.py":4574 * # query_plan is an iterator, so this will resume where we last left * # off if send_request() is called multiple times * for host in self.query_plan: # <<<<<<<<<<<<<< * req_id = self._query(host) * if req_id is not None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_plan); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4574, __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(0, 4574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4574, __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))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4574, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } __pyx_t_1 = __Pyx_PyList_GetItemRefFast(__pyx_t_2, __pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_3; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4574, __pyx_L1_error) #endif if (__pyx_t_3 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); #endif ++__pyx_t_3; } if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4574, __pyx_L1_error) } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4574, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_host, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4575 * # off if send_request() is called multiple times * for host in self.query_plan: * req_id = self._query(host) # <<<<<<<<<<<<<< * if req_id is not None: * self._req_id = req_id */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_query_2, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_v_req_id, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4576 * for host in self.query_plan: * req_id = self._query(host) * if req_id is not None: # <<<<<<<<<<<<<< * self._req_id = req_id * return True */ __pyx_t_7 = (__pyx_v_req_id != Py_None); if (__pyx_t_7) { /* "cassandra/cluster.py":4577 * req_id = self._query(host) * if req_id is not None: * self._req_id = req_id # <<<<<<<<<<<<<< * return True * if self.timeout is not None and time.time() - self._start_time > self.timeout: */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_req_id, __pyx_v_req_id) < (0)) __PYX_ERR(0, 4577, __pyx_L1_error) /* "cassandra/cluster.py":4578 * if req_id is not None: * self._req_id = req_id * return True # <<<<<<<<<<<<<< * if self.timeout is not None and time.time() - self._start_time > self.timeout: * self._on_timeout() */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4576 * for host in self.query_plan: * req_id = self._query(host) * if req_id is not None: # <<<<<<<<<<<<<< * self._req_id = req_id * return True */ } /* "cassandra/cluster.py":4579 * self._req_id = req_id * return True * if self.timeout is not None and time.time() - self._start_time > self.timeout: # <<<<<<<<<<<<<< * self._on_timeout() * return True */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L7_bool_binop_done; } __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_start_time_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyNumber_Subtract(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_timeout); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __pyx_t_8; __pyx_L7_bool_binop_done:; if (__pyx_t_7) { /* "cassandra/cluster.py":4580 * return True * if self.timeout is not None and time.time() - self._start_time > self.timeout: * self._on_timeout() # <<<<<<<<<<<<<< * return True * if error_no_hosts: */ __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_timeout, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4581 * if self.timeout is not None and time.time() - self._start_time > self.timeout: * self._on_timeout() * return True # <<<<<<<<<<<<<< * if error_no_hosts: * self._set_final_exception(NoHostAvailable( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4579 * self._req_id = req_id * return True * if self.timeout is not None and time.time() - self._start_time > self.timeout: # <<<<<<<<<<<<<< * self._on_timeout() * return True */ } /* "cassandra/cluster.py":4574 * # query_plan is an iterator, so this will resume where we last left * # off if send_request() is called multiple times * for host in self.query_plan: # <<<<<<<<<<<<<< * req_id = self._query(host) * if req_id is not None: */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4582 * self._on_timeout() * return True * if error_no_hosts: # <<<<<<<<<<<<<< * self._set_final_exception(NoHostAvailable( * "Unable to complete the operation against any hosts", self._errors)) */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_error_no_hosts); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4582, __pyx_L1_error) if (__pyx_t_7) { /* "cassandra/cluster.py":4583 * return True * if error_no_hosts: * self._set_final_exception(NoHostAvailable( # <<<<<<<<<<<<<< * "Unable to complete the operation against any hosts", self._errors)) * return False */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_NoHostAvailable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":4584 * if error_no_hosts: * self._set_final_exception(NoHostAvailable( * "Unable to complete the operation against any hosts", self._errors)) # <<<<<<<<<<<<<< * return False * */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Unable_to_complete_the_operation, __pyx_t_11}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_10}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4582 * self._on_timeout() * return True * if error_no_hosts: # <<<<<<<<<<<<<< * self._set_final_exception(NoHostAvailable( * "Unable to complete the operation against any hosts", self._errors)) */ } /* "cassandra/cluster.py":4585 * self._set_final_exception(NoHostAvailable( * "Unable to complete the operation against any hosts", self._errors)) * return False # <<<<<<<<<<<<<< * * def _query(self, host, message=None, cb=None): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; /* "cassandra/cluster.py":4570 * self.query_plan = iter(self._load_balancer.make_query_plan(self.session.keyspace, self.query)) * * def send_request(self, error_no_hosts=True): # <<<<<<<<<<<<<< * """ Internal """ * # query_plan is an iterator, so this will resume where we last left */ /* 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_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.send_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_host); __Pyx_XDECREF(__pyx_v_req_id); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4587 * return False * * def _query(self, host, message=None, cb=None): # <<<<<<<<<<<<<< * if message is None: * message = self.message */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_17_query(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_17_query = {"_query", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_17_query, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_17_query(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_message = 0; PyObject *__pyx_v_cb = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_query (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_message,&__pyx_mstate_global->__pyx_n_u_cb,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4587, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4587, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4587, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4587, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4587, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_query", 0) < (0)) __PYX_ERR(0, 4587, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_query", 0, 2, 4, i); __PYX_ERR(0, 4587, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4587, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4587, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4587, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4587, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_message = values[2]; __pyx_v_cb = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_query", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 4587, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._query", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_16_query(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_message, __pyx_v_cb); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_16_query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_message, PyObject *__pyx_v_cb) { PyObject *__pyx_v_pool = NULL; PyObject *__pyx_v_connection = NULL; PyObject *__pyx_v_request_id = NULL; PyObject *__pyx_v_result_meta = NULL; PyObject *__pyx_v_exc = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_t_14; PyObject *__pyx_t_15 = NULL; PyObject *__pyx_t_16 = NULL; int __pyx_t_17; char const *__pyx_t_18; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; PyObject *__pyx_t_24 = NULL; char const *__pyx_t_25; char const *__pyx_t_26; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_query", 0); __Pyx_INCREF(__pyx_v_message); __Pyx_INCREF(__pyx_v_cb); /* "cassandra/cluster.py":4588 * * def _query(self, host, message=None, cb=None): * if message is None: # <<<<<<<<<<<<<< * message = self.message * */ __pyx_t_1 = (__pyx_v_message == Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":4589 * def _query(self, host, message=None, cb=None): * if message is None: * message = self.message # <<<<<<<<<<<<<< * * pool = self.session._pools.get(host) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4588 * * def _query(self, host, message=None, cb=None): * if message is None: # <<<<<<<<<<<<<< * message = self.message * */ } /* "cassandra/cluster.py":4591 * message = self.message * * pool = self.session._pools.get(host) # <<<<<<<<<<<<<< * if not pool: * self._errors[host] = ConnectionException("Host has been marked down or removed") */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pools); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_host}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_pool = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":4592 * * pool = self.session._pools.get(host) * if not pool: # <<<<<<<<<<<<<< * self._errors[host] = ConnectionException("Host has been marked down or removed") * return None */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pool); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4592, __pyx_L1_error) __pyx_t_7 = (!__pyx_t_1); if (__pyx_t_7) { /* "cassandra/cluster.py":4593 * pool = self.session._pools.get(host) * if not pool: * self._errors[host] = ConnectionException("Host has been marked down or removed") # <<<<<<<<<<<<<< * return None * elif pool.is_shutdown: */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Host_has_been_marked_down_or_rem}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_host, __pyx_t_2) < 0))) __PYX_ERR(0, 4593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4594 * if not pool: * self._errors[host] = ConnectionException("Host has been marked down or removed") * return None # <<<<<<<<<<<<<< * elif pool.is_shutdown: * self._errors[host] = ConnectionException("Pool is shutdown") */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4592 * * pool = self.session._pools.get(host) * if not pool: # <<<<<<<<<<<<<< * self._errors[host] = ConnectionException("Host has been marked down or removed") * return None */ } /* "cassandra/cluster.py":4595 * self._errors[host] = ConnectionException("Host has been marked down or removed") * return None * elif pool.is_shutdown: # <<<<<<<<<<<<<< * self._errors[host] = ConnectionException("Pool is shutdown") * return None */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pool, __pyx_mstate_global->__pyx_n_u_is_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4595, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":4596 * return None * elif pool.is_shutdown: * self._errors[host] = ConnectionException("Pool is shutdown") # <<<<<<<<<<<<<< * return None * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_Pool_is_shutdown}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_v_host, __pyx_t_2) < 0))) __PYX_ERR(0, 4596, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4597 * elif pool.is_shutdown: * self._errors[host] = ConnectionException("Pool is shutdown") * return None # <<<<<<<<<<<<<< * * self._current_host = host */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4595 * self._errors[host] = ConnectionException("Host has been marked down or removed") * return None * elif pool.is_shutdown: # <<<<<<<<<<<<<< * self._errors[host] = ConnectionException("Pool is shutdown") * return None */ } /* "cassandra/cluster.py":4599 * return None * * self._current_host = host # <<<<<<<<<<<<<< * * connection = None */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_host, __pyx_v_host) < (0)) __PYX_ERR(0, 4599, __pyx_L1_error) /* "cassandra/cluster.py":4601 * self._current_host = host * * connection = None # <<<<<<<<<<<<<< * try: * # TODO get connectTimeout from cluster settings */ __Pyx_INCREF(Py_None); __pyx_v_connection = Py_None; /* "cassandra/cluster.py":4602 * * connection = None * try: # <<<<<<<<<<<<<< * # TODO get connectTimeout from cluster settings * connection, request_id = pool.borrow_connection(timeout=2.0) */ { __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:*/ { /* "cassandra/cluster.py":4604 * try: * # TODO get connectTimeout from cluster settings * connection, request_id = pool.borrow_connection(timeout=2.0) # <<<<<<<<<<<<<< * self._connection = connection * result_meta = self.prepared_statement.result_metadata if self.prepared_statement else [] */ __pyx_t_5 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_timeout, __pyx_mstate_global->__pyx_float_2_0, __pyx_t_3, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4604, __pyx_L5_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_borrow_connection, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4604, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_5); } else { __pyx_t_3 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_XGOTREF(__pyx_t_5); } #else __pyx_t_3 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4604, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_4), 2) < (0)) __PYX_ERR(0, 4604, __pyx_L5_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L12_unpacking_done; __pyx_L11_unpacking_failed:; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4604, __pyx_L5_error) __pyx_L12_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_connection, __pyx_t_3); __pyx_t_3 = 0; __pyx_v_request_id = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":4605 * # TODO get connectTimeout from cluster settings * connection, request_id = pool.borrow_connection(timeout=2.0) * self._connection = connection # <<<<<<<<<<<<<< * result_meta = self.prepared_statement.result_metadata if self.prepared_statement else [] * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection, __pyx_v_connection) < (0)) __PYX_ERR(0, 4605, __pyx_L5_error) /* "cassandra/cluster.py":4606 * connection, request_id = pool.borrow_connection(timeout=2.0) * self._connection = connection * result_meta = self.prepared_statement.result_metadata if self.prepared_statement else [] # <<<<<<<<<<<<<< * * if cb is None: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4606, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4606, __pyx_L5_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4606, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_result_metadata); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4606, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4606, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_v_result_meta = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":4608 * result_meta = self.prepared_statement.result_metadata if self.prepared_statement else [] * * if cb is None: # <<<<<<<<<<<<<< * cb = partial(self._set_result, host, connection, pool) * */ __pyx_t_7 = (__pyx_v_cb == Py_None); if (__pyx_t_7) { /* "cassandra/cluster.py":4609 * * if cb is None: * cb = partial(self._set_result, host, connection, pool) # <<<<<<<<<<<<<< * * self.request_encoded_size = connection.send_msg(message, request_id, cb=cb, */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4609, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4609, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_3, __pyx_t_4, __pyx_v_host, __pyx_v_connection, __pyx_v_pool}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (5-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4609, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF_SET(__pyx_v_cb, __pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4608 * result_meta = self.prepared_statement.result_metadata if self.prepared_statement else [] * * if cb is None: # <<<<<<<<<<<<<< * cb = partial(self._set_result, host, connection, pool) * */ } /* "cassandra/cluster.py":4611 * cb = partial(self._set_result, host, connection, pool) * * self.request_encoded_size = connection.send_msg(message, request_id, cb=cb, # <<<<<<<<<<<<<< * encoder=self._protocol_handler.encode_message, * decoder=self._protocol_handler.decode_message, */ __pyx_t_5 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_5); /* "cassandra/cluster.py":4612 * * self.request_encoded_size = connection.send_msg(message, request_id, cb=cb, * encoder=self._protocol_handler.encode_message, # <<<<<<<<<<<<<< * decoder=self._protocol_handler.decode_message, * result_metadata=result_meta) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4612, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_encode_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4612, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4613 * self.request_encoded_size = connection.send_msg(message, request_id, cb=cb, * encoder=self._protocol_handler.encode_message, * decoder=self._protocol_handler.decode_message, # <<<<<<<<<<<<<< * result_metadata=result_meta) * self.attempted_hosts.append(host) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4613, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_decode_message); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4613, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4614 * encoder=self._protocol_handler.encode_message, * decoder=self._protocol_handler.decode_message, * result_metadata=result_meta) # <<<<<<<<<<<<<< * self.attempted_hosts.append(host) * return request_id */ __pyx_t_6 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 4 : 0)] = {__pyx_t_5, __pyx_v_message, __pyx_v_request_id}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4611, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cb, __pyx_v_cb, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4611, __pyx_L5_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_encoder, __pyx_t_3, __pyx_t_4, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 4611, __pyx_L5_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_decoder, __pyx_t_12, __pyx_t_4, __pyx_callargs+3, 2) < (0)) __PYX_ERR(0, 4611, __pyx_L5_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_result_metadata, __pyx_v_result_meta, __pyx_t_4, __pyx_callargs+3, 3) < (0)) __PYX_ERR(0, 4611, __pyx_L5_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_send_msg, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4611, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); } /* "cassandra/cluster.py":4611 * cb = partial(self._set_result, host, connection, pool) * * self.request_encoded_size = connection.send_msg(message, request_id, cb=cb, # <<<<<<<<<<<<<< * encoder=self._protocol_handler.encode_message, * decoder=self._protocol_handler.decode_message, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_request_encoded_size, __pyx_t_2) < (0)) __PYX_ERR(0, 4611, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4615 * decoder=self._protocol_handler.decode_message, * result_metadata=result_meta) * self.attempted_hosts.append(host) # <<<<<<<<<<<<<< * return request_id * except NoConnectionsAvailable as exc: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_attempted_hosts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4615, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_host); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 4615, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4616 * result_metadata=result_meta) * self.attempted_hosts.append(host) * return request_id # <<<<<<<<<<<<<< * except NoConnectionsAvailable as exc: * log.debug("All connections for host %s are at capacity, moving to the next host", host) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_request_id); __pyx_r = __pyx_v_request_id; goto __pyx_L9_try_return; /* "cassandra/cluster.py":4602 * * connection = None * try: # <<<<<<<<<<<<<< * # TODO get connectTimeout from cluster settings * connection, request_id = pool.borrow_connection(timeout=2.0) */ } __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4617 * self.attempted_hosts.append(host) * return request_id * except NoConnectionsAvailable as exc: # <<<<<<<<<<<<<< * log.debug("All connections for host %s are at capacity, moving to the next host", host) * self._errors[host] = exc */ __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_4, &__pyx_t_12); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NoConnectionsAvailable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4617, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_14 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ErrRestore(__pyx_t_2, __pyx_t_4, __pyx_t_12); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_12 = 0; if (__pyx_t_14) { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._query", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 4617, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":4618 * return request_id * except NoConnectionsAvailable as exc: * log.debug("All connections for host %s are at capacity, moving to the next host", host) # <<<<<<<<<<<<<< * self._errors[host] = exc * except ConnectionBusy as exc: */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4618, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4618, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_16))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_16); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_16); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_16, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_All_connections_for_host_s_are_a, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_16, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4618, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4619 * except NoConnectionsAvailable as exc: * log.debug("All connections for host %s are at capacity, moving to the next host", host) * self._errors[host] = exc # <<<<<<<<<<<<<< * except ConnectionBusy as exc: * log.debug("Connection for host %s is busy, moving to the next host", host) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4619, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_host, __pyx_v_exc) < 0))) __PYX_ERR(0, 4619, __pyx_L19_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "cassandra/cluster.py":4617 * self.attempted_hosts.append(host) * return request_id * except NoConnectionsAvailable as exc: # <<<<<<<<<<<<<< * log.debug("All connections for host %s are at capacity, moving to the next host", host) * self._errors[host] = exc */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L20; } __pyx_L19_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18; goto __pyx_L7_except_error; } __pyx_L20:; } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6_exception_handled; } /* "cassandra/cluster.py":4620 * log.debug("All connections for host %s are at capacity, moving to the next host", host) * self._errors[host] = exc * except ConnectionBusy as exc: # <<<<<<<<<<<<<< * log.debug("Connection for host %s is busy, moving to the next host", host) * self._errors[host] = exc */ __Pyx_ErrFetch(&__pyx_t_2, &__pyx_t_4, &__pyx_t_12); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConnectionBusy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4620, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_2, __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_ErrRestore(__pyx_t_2, __pyx_t_4, __pyx_t_12); __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_12 = 0; if (__pyx_t_17) { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._query", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 4620, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":4621 * self._errors[host] = exc * except ConnectionBusy as exc: * log.debug("Connection for host %s is busy, moving to the next host", host) # <<<<<<<<<<<<<< * self._errors[host] = exc * except Exception as exc: */ __pyx_t_16 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4621, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 4621, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_15))) { __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15); assert(__pyx_t_16); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_16); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_15, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_mstate_global->__pyx_kp_u_Connection_for_host_s_is_busy_mo, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_15, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4621, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4622 * except ConnectionBusy as exc: * log.debug("Connection for host %s is busy, moving to the next host", host) * self._errors[host] = exc # <<<<<<<<<<<<<< * except Exception as exc: * log.debug("Error querying host %s", host, exc_info=True) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4622, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_host, __pyx_v_exc) < 0))) __PYX_ERR(0, 4622, __pyx_L30_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "cassandra/cluster.py":4620 * log.debug("All connections for host %s are at capacity, moving to the next host", host) * self._errors[host] = exc * except ConnectionBusy as exc: # <<<<<<<<<<<<<< * log.debug("Connection for host %s is busy, moving to the next host", host) * self._errors[host] = exc */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L31; } __pyx_L30_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); if ( unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_17 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_25 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22); __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_25; goto __pyx_L7_except_error; } __pyx_L31:; } __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L6_exception_handled; } /* "cassandra/cluster.py":4623 * log.debug("Connection for host %s is busy, moving to the next host", host) * self._errors[host] = exc * except Exception as exc: # <<<<<<<<<<<<<< * log.debug("Error querying host %s", host, exc_info=True) * self._errors[host] = exc */ __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_14) { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._query", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_12) < 0) __PYX_ERR(0, 4623, __pyx_L7_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_v_exc = __pyx_t_4; /*try:*/ { /* "cassandra/cluster.py":4624 * self._errors[host] = exc * except Exception as exc: * log.debug("Error querying host %s", host, exc_info=True) # <<<<<<<<<<<<<< * self._errors[host] = exc * if self._metrics is not None: */ __pyx_t_15 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4624, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4624, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_15); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_15, __pyx_mstate_global->__pyx_kp_u_Error_querying_host_s, __pyx_v_host}; __pyx_t_16 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4624, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_16); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_exc_info, Py_True, __pyx_t_16, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4624, __pyx_L41_error) __pyx_t_3 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_16); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4624, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4625 * except Exception as exc: * log.debug("Error querying host %s", host, exc_info=True) * self._errors[host] = exc # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_connection_error() */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4625, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_host, __pyx_v_exc) < 0))) __PYX_ERR(0, 4625, __pyx_L41_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4626 * log.debug("Error querying host %s", host, exc_info=True) * self._errors[host] = exc * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_connection_error() * if connection: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4626, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { /* "cassandra/cluster.py":4627 * self._errors[host] = exc * if self._metrics is not None: * self._metrics.on_connection_error() # <<<<<<<<<<<<<< * if connection: * pool.return_connection(connection) */ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 4627, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_16); __pyx_t_5 = __pyx_t_16; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_connection_error, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4627, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4626 * log.debug("Error querying host %s", host, exc_info=True) * self._errors[host] = exc * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_connection_error() * if connection: */ } /* "cassandra/cluster.py":4628 * if self._metrics is not None: * self._metrics.on_connection_error() * if connection: # <<<<<<<<<<<<<< * pool.return_connection(connection) * */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_connection); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 4628, __pyx_L41_error) if (__pyx_t_7) { /* "cassandra/cluster.py":4629 * self._metrics.on_connection_error() * if connection: * pool.return_connection(connection) # <<<<<<<<<<<<<< * * return None */ __pyx_t_16 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_16); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_connection}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_return_connection, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4629, __pyx_L41_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4628 * if self._metrics is not None: * self._metrics.on_connection_error() * if connection: # <<<<<<<<<<<<<< * pool.return_connection(connection) * */ } } /* "cassandra/cluster.py":4623 * log.debug("Connection for host %s is busy, moving to the next host", host) * self._errors[host] = exc * except Exception as exc: # <<<<<<<<<<<<<< * log.debug("Error querying host %s", host, exc_info=True) * self._errors[host] = exc */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L42; } __pyx_L41_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24); if ( unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_22); __Pyx_XGOTREF(__pyx_t_23); __Pyx_XGOTREF(__pyx_t_24); __pyx_t_14 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_26 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_22); __Pyx_XGIVEREF(__pyx_t_23); __Pyx_XGIVEREF(__pyx_t_24); __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21); __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_26; goto __pyx_L7_except_error; } __pyx_L42:; } __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L6_exception_handled; } goto __pyx_L7_except_error; /* "cassandra/cluster.py":4602 * * connection = None * try: # <<<<<<<<<<<<<< * # TODO get connectTimeout from cluster settings * connection, request_id = pool.borrow_connection(timeout=2.0) */ __pyx_L7_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_L9_try_return:; __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_L0; __pyx_L6_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); } /* "cassandra/cluster.py":4631 * pool.return_connection(connection) * * return None # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4587 * return False * * def _query(self, host, message=None, cb=None): # <<<<<<<<<<<<<< * if message is None: * message = self.message */ /* 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_12); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_16); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_pool); __Pyx_XDECREF(__pyx_v_connection); __Pyx_XDECREF(__pyx_v_request_id); __Pyx_XDECREF(__pyx_v_result_meta); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_cb); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4633 * return None * * @property # <<<<<<<<<<<<<< * def has_more_pages(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_19has_more_pages(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_18has_more_pages, "\n Returns :const:`True` if there are more pages left in the\n query results, :const:`False` otherwise. This should only\n be checked after the first page has been returned.\n\n .. versionadded:: 2.0.0\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_19has_more_pages = {"has_more_pages", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_19has_more_pages, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_18has_more_pages}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_19has_more_pages(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_more_pages (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4633, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4633, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "has_more_pages", 0) < (0)) __PYX_ERR(0, 4633, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("has_more_pages", 1, 1, 1, i); __PYX_ERR(0, 4633, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4633, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("has_more_pages", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4633, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.has_more_pages", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_18has_more_pages(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_18has_more_pages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_more_pages", 0); /* "cassandra/cluster.py":4642 * .. versionadded:: 2.0.0 * """ * return self._paging_state is not None # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_paging_state_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4633 * return None * * @property # <<<<<<<<<<<<<< * def has_more_pages(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.has_more_pages", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4644 * return self._paging_state is not None * * @property # <<<<<<<<<<<<<< * def warnings(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_21warnings(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_20warnings, "\n Warnings returned from the server, if any. This will only be\n set for protocol_version 4+.\n\n Warnings may be returned for such things as oversized batches,\n or too many tombstones in slice queries.\n\n Ensure the future is complete before trying to access this property\n (call :meth:`.result()`, or after callback is invoked).\n Otherwise, it may throw if the response has not been received.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_21warnings = {"warnings", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_21warnings, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_20warnings}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_21warnings(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("warnings (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4644, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4644, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "warnings", 0) < (0)) __PYX_ERR(0, 4644, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("warnings", 1, 1, 1, i); __PYX_ERR(0, 4644, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4644, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("warnings", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4644, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.warnings", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_20warnings(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_20warnings(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("warnings", 0); /* "cassandra/cluster.py":4658 * """ * # TODO: When timers are introduced, just make this wait * if not self._event.is_set(): # <<<<<<<<<<<<<< * raise DriverException("warnings cannot be retrieved before ResponseFuture is finalized") * return self._warnings */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_set, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4658, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (!__pyx_t_5); if (unlikely(__pyx_t_6)) { /* "cassandra/cluster.py":4659 * # TODO: When timers are introduced, just make this wait * if not self._event.is_set(): * raise DriverException("warnings cannot be retrieved before ResponseFuture is finalized") # <<<<<<<<<<<<<< * return self._warnings * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_warnings_cannot_be_retrieved_bef}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4659, __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(0, 4659, __pyx_L1_error) /* "cassandra/cluster.py":4658 * """ * # TODO: When timers are introduced, just make this wait * if not self._event.is_set(): # <<<<<<<<<<<<<< * raise DriverException("warnings cannot be retrieved before ResponseFuture is finalized") * return self._warnings */ } /* "cassandra/cluster.py":4660 * if not self._event.is_set(): * raise DriverException("warnings cannot be retrieved before ResponseFuture is finalized") * return self._warnings # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_warnings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4644 * return self._paging_state is not None * * @property # <<<<<<<<<<<<<< * def warnings(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.warnings", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4662 * return self._warnings * * @property # <<<<<<<<<<<<<< * def custom_payload(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_23custom_payload(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_22custom_payload, "\n The custom payload returned from the server, if any. This will only be\n set by Cassandra servers implementing a custom QueryHandler, and only\n for protocol_version 4+.\n\n Ensure the future is complete before trying to access this property\n (call :meth:`.result()`, or after callback is invoked).\n Otherwise, it may throw if the response has not been received.\n\n :return: :ref:`custom_payload`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_23custom_payload = {"custom_payload", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_23custom_payload, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_22custom_payload}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_23custom_payload(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("custom_payload (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4662, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4662, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "custom_payload", 0) < (0)) __PYX_ERR(0, 4662, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("custom_payload", 1, 1, 1, i); __PYX_ERR(0, 4662, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4662, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("custom_payload", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4662, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.custom_payload", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_22custom_payload(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_22custom_payload(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("custom_payload", 0); /* "cassandra/cluster.py":4676 * """ * # TODO: When timers are introduced, just make this wait * if not self._event.is_set(): # <<<<<<<<<<<<<< * raise DriverException("custom_payload cannot be retrieved before ResponseFuture is finalized") * return self._custom_payload */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_is_set, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 4676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (!__pyx_t_5); if (unlikely(__pyx_t_6)) { /* "cassandra/cluster.py":4677 * # TODO: When timers are introduced, just make this wait * if not self._event.is_set(): * raise DriverException("custom_payload cannot be retrieved before ResponseFuture is finalized") # <<<<<<<<<<<<<< * return self._custom_payload * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_custom_payload_cannot_be_retriev}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4677, __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(0, 4677, __pyx_L1_error) /* "cassandra/cluster.py":4676 * """ * # TODO: When timers are introduced, just make this wait * if not self._event.is_set(): # <<<<<<<<<<<<<< * raise DriverException("custom_payload cannot be retrieved before ResponseFuture is finalized") * return self._custom_payload */ } /* "cassandra/cluster.py":4678 * if not self._event.is_set(): * raise DriverException("custom_payload cannot be retrieved before ResponseFuture is finalized") * return self._custom_payload # <<<<<<<<<<<<<< * * def start_fetching_next_page(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_custom_payload_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4662 * return self._warnings * * @property # <<<<<<<<<<<<<< * def custom_payload(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.custom_payload", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4680 * return self._custom_payload * * def start_fetching_next_page(self): # <<<<<<<<<<<<<< * """ * If there are more pages left in the query result, this asynchronously */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_25start_fetching_next_page(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_24start_fetching_next_page, "\n If there are more pages left in the query result, this asynchronously\n starts fetching the next page. If there are no pages left, :exc:`.QueryExhausted`\n is raised. Also see :attr:`.has_more_pages`.\n\n This should only be called after the first page has been returned.\n\n .. versionadded:: 2.0.0\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_25start_fetching_next_page = {"start_fetching_next_page", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_25start_fetching_next_page, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_24start_fetching_next_page}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_25start_fetching_next_page(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("start_fetching_next_page (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4680, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4680, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "start_fetching_next_page", 0) < (0)) __PYX_ERR(0, 4680, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("start_fetching_next_page", 1, 1, 1, i); __PYX_ERR(0, 4680, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4680, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("start_fetching_next_page", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4680, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.start_fetching_next_page", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_24start_fetching_next_page(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_24start_fetching_next_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { 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; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("start_fetching_next_page", 0); /* "cassandra/cluster.py":4690 * .. versionadded:: 2.0.0 * """ * if not self._paging_state: # <<<<<<<<<<<<<< * raise QueryExhausted() * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_paging_state_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4690, __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(0, 4690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (!__pyx_t_2); if (unlikely(__pyx_t_3)) { /* "cassandra/cluster.py":4691 * """ * if not self._paging_state: * raise QueryExhausted() # <<<<<<<<<<<<<< * * self._make_query_plan() */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_QueryExhausted); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4691, __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(0, 4691, __pyx_L1_error) /* "cassandra/cluster.py":4690 * .. versionadded:: 2.0.0 * """ * if not self._paging_state: # <<<<<<<<<<<<<< * raise QueryExhausted() * */ } /* "cassandra/cluster.py":4693 * raise QueryExhausted() * * self._make_query_plan() # <<<<<<<<<<<<<< * self.message.paging_state = self._paging_state * self._event.clear() */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_make_query_plan_2, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4694 * * self._make_query_plan() * self.message.paging_state = self._paging_state # <<<<<<<<<<<<<< * self._event.clear() * self._final_result = _NOT_SET */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_paging_state_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_paging_state, __pyx_t_1) < (0)) __PYX_ERR(0, 4694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4695 * self._make_query_plan() * self.message.paging_state = self._paging_state * self._event.clear() # <<<<<<<<<<<<<< * self._final_result = _NOT_SET * self._final_exception = None */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_clear, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4696 * self.message.paging_state = self._paging_state * self._event.clear() * self._final_result = _NOT_SET # <<<<<<<<<<<<<< * self._final_exception = None * self._start_timer() */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result, __pyx_t_5) < (0)) __PYX_ERR(0, 4696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4697 * self._event.clear() * self._final_result = _NOT_SET * self._final_exception = None # <<<<<<<<<<<<<< * self._start_timer() * self.send_request() */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception, Py_None) < (0)) __PYX_ERR(0, 4697, __pyx_L1_error) /* "cassandra/cluster.py":4698 * self._final_result = _NOT_SET * self._final_exception = None * self._start_timer() # <<<<<<<<<<<<<< * self.send_request() * */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_timer, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4699 * self._final_exception = None * self._start_timer() * self.send_request() # <<<<<<<<<<<<<< * * def _reprepare(self, prepare_message, host, connection, pool): */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4680 * return self._custom_payload * * def start_fetching_next_page(self): # <<<<<<<<<<<<<< * """ * If there are more pages left in the query result, this asynchronously */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.start_fetching_next_page", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4701 * self.send_request() * * def _reprepare(self, prepare_message, host, connection, pool): # <<<<<<<<<<<<<< * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) * request_id = self._query(host, prepare_message, cb=cb) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_27_reprepare(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_27_reprepare = {"_reprepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_27_reprepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_27_reprepare(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_prepare_message = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_pool = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_reprepare (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_prepare_message,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_pool,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4701, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4701, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4701, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4701, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4701, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4701, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_reprepare", 0) < (0)) __PYX_ERR(0, 4701, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_reprepare", 1, 5, 5, i); __PYX_ERR(0, 4701, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4701, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4701, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4701, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4701, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4701, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_prepare_message = values[1]; __pyx_v_host = values[2]; __pyx_v_connection = values[3]; __pyx_v_pool = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_reprepare", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 4701, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._reprepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_26_reprepare(__pyx_self, __pyx_v_self, __pyx_v_prepare_message, __pyx_v_host, __pyx_v_connection, __pyx_v_pool); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_26_reprepare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_prepare_message, PyObject *__pyx_v_host, PyObject *__pyx_v_connection, PyObject *__pyx_v_pool) { PyObject *__pyx_v_cb = NULL; PyObject *__pyx_v_request_id = 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; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_reprepare", 0); /* "cassandra/cluster.py":4702 * * def _reprepare(self, prepare_message, host, connection, pool): * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) # <<<<<<<<<<<<<< * request_id = self._query(host, prepare_message, cb=cb) * if request_id is None: */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4702, __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_self, __pyx_mstate_global->__pyx_n_u_execute_after_prepare); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[6] = {__pyx_t_2, __pyx_t_5, __pyx_t_4, __pyx_v_host, __pyx_v_connection, __pyx_v_pool}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_6, (6-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __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; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_cb = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4703 * def _reprepare(self, prepare_message, host, connection, pool): * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) * request_id = self._query(host, prepare_message, cb=cb) # <<<<<<<<<<<<<< * if request_id is None: * # try to submit the original prepared statement on some other host */ __pyx_t_3 = __pyx_v_self; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 1 : 0)] = {__pyx_t_3, __pyx_v_host, __pyx_v_prepare_message}; __pyx_t_4 = __Pyx_MakeVectorcallBuilderKwds(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_cb, __pyx_v_cb, __pyx_t_4, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4703, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_query_2, __pyx_callargs+__pyx_t_6, (3-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __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(0, 4703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_request_id = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4704 * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) * request_id = self._query(host, prepare_message, cb=cb) * if request_id is None: # <<<<<<<<<<<<<< * # try to submit the original prepared statement on some other host * self.send_request() */ __pyx_t_7 = (__pyx_v_request_id == Py_None); if (__pyx_t_7) { /* "cassandra/cluster.py":4706 * if request_id is None: * # try to submit the original prepared statement on some other host * self.send_request() # <<<<<<<<<<<<<< * * def _set_result(self, host, connection, pool, response): */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4704 * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) * request_id = self._query(host, prepare_message, cb=cb) * if request_id is None: # <<<<<<<<<<<<<< * # try to submit the original prepared statement on some other host * self.send_request() */ } /* "cassandra/cluster.py":4701 * self.send_request() * * def _reprepare(self, prepare_message, host, connection, pool): # <<<<<<<<<<<<<< * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) * request_id = self._query(host, prepare_message, cb=cb) */ /* 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_5); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._reprepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cb); __Pyx_XDECREF(__pyx_v_request_id); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4708 * self.send_request() * * def _set_result(self, host, connection, pool, response): # <<<<<<<<<<<<<< * try: * self.coordinator_host = host */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_29_set_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_29_set_result = {"_set_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_29_set_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_29_set_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_pool = 0; PyObject *__pyx_v_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_result (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4708, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4708, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4708, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4708, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4708, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4708, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_result", 0) < (0)) __PYX_ERR(0, 4708, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_result", 1, 5, 5, i); __PYX_ERR(0, 4708, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4708, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4708, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4708, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4708, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4708, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_connection = values[2]; __pyx_v_pool = values[3]; __pyx_v_response = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_result", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 4708, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_28_set_result(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_connection, __pyx_v_pool, __pyx_v_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_28_set_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_connection, PyObject *__pyx_v_pool, PyObject *__pyx_v_response) { PyObject *__pyx_v_trace_id = NULL; PyObject *__pyx_v_session = NULL; PyObject *__pyx_v_retry_policy = NULL; PyObject *__pyx_v_retry = NULL; PyObject *__pyx_v_cl = NULL; PyObject *__pyx_v_query_id = NULL; PyObject *__pyx_v_prepared_statement = NULL; PyObject *__pyx_v_current_keyspace = NULL; PyObject *__pyx_v_prepared_keyspace = NULL; PyObject *__pyx_v_prepare_message = NULL; PyObject *__pyx_v_msg = NULL; PyObject *__pyx_v_exc = 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; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15[5]; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; int __pyx_t_19; PyObject *__pyx_t_20 = NULL; int __pyx_t_21; int __pyx_t_22; char const *__pyx_t_23; PyObject *__pyx_t_24 = NULL; PyObject *__pyx_t_25 = NULL; PyObject *__pyx_t_26 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_result", 0); /* "cassandra/cluster.py":4709 * * def _set_result(self, host, connection, pool, response): * try: # <<<<<<<<<<<<<< * self.coordinator_host = host * if pool: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":4710 * def _set_result(self, host, connection, pool, response): * try: * self.coordinator_host = host # <<<<<<<<<<<<<< * if pool: * pool.return_connection(connection) */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_coordinator_host, __pyx_v_host) < (0)) __PYX_ERR(0, 4710, __pyx_L3_error) /* "cassandra/cluster.py":4711 * try: * self.coordinator_host = host * if pool: # <<<<<<<<<<<<<< * pool.return_connection(connection) * */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_pool); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4711, __pyx_L3_error) if (__pyx_t_4) { /* "cassandra/cluster.py":4712 * self.coordinator_host = host * if pool: * pool.return_connection(connection) # <<<<<<<<<<<<<< * * trace_id = getattr(response, 'trace_id', None) */ __pyx_t_6 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_connection}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_return_connection, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4712, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4711 * try: * self.coordinator_host = host * if pool: # <<<<<<<<<<<<<< * pool.return_connection(connection) * */ } /* "cassandra/cluster.py":4714 * pool.return_connection(connection) * * trace_id = getattr(response, 'trace_id', None) # <<<<<<<<<<<<<< * if trace_id: * if not self._query_traces: */ __pyx_t_5 = __Pyx_GetAttr3(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_trace_id, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4714, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_v_trace_id = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":4715 * * trace_id = getattr(response, 'trace_id', None) * if trace_id: # <<<<<<<<<<<<<< * if not self._query_traces: * self._query_traces = [] */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_trace_id); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4715, __pyx_L3_error) if (__pyx_t_4) { /* "cassandra/cluster.py":4716 * trace_id = getattr(response, 'trace_id', None) * if trace_id: * if not self._query_traces: # <<<<<<<<<<<<<< * self._query_traces = [] * self._query_traces.append(QueryTrace(trace_id, self.session)) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4716, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4716, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = (!__pyx_t_4); if (__pyx_t_8) { /* "cassandra/cluster.py":4717 * if trace_id: * if not self._query_traces: * self._query_traces = [] # <<<<<<<<<<<<<< * self._query_traces.append(QueryTrace(trace_id, self.session)) * */ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4717, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces, __pyx_t_5) < (0)) __PYX_ERR(0, 4717, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4716 * trace_id = getattr(response, 'trace_id', None) * if trace_id: * if not self._query_traces: # <<<<<<<<<<<<<< * self._query_traces = [] * self._query_traces.append(QueryTrace(trace_id, self.session)) */ } /* "cassandra/cluster.py":4718 * if not self._query_traces: * self._query_traces = [] * self._query_traces.append(QueryTrace(trace_id, self.session)) # <<<<<<<<<<<<<< * * self._warnings = getattr(response, 'warnings', None) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4718, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_QueryTrace); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4718, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4718, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_trace_id, __pyx_t_11}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4718, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_t_6); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 4718, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4715 * * trace_id = getattr(response, 'trace_id', None) * if trace_id: # <<<<<<<<<<<<<< * if not self._query_traces: * self._query_traces = [] */ } /* "cassandra/cluster.py":4720 * self._query_traces.append(QueryTrace(trace_id, self.session)) * * self._warnings = getattr(response, 'warnings', None) # <<<<<<<<<<<<<< * self._custom_payload = getattr(response, 'custom_payload', None) * */ __pyx_t_6 = __Pyx_GetAttr3(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_warnings_2, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4720, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_warnings, __pyx_t_6) < (0)) __PYX_ERR(0, 4720, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4721 * * self._warnings = getattr(response, 'warnings', None) * self._custom_payload = getattr(response, 'custom_payload', None) # <<<<<<<<<<<<<< * * if isinstance(response, ResultMessage): */ __pyx_t_6 = __Pyx_GetAttr3(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_custom_payload, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4721, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_custom_payload_2, __pyx_t_6) < (0)) __PYX_ERR(0, 4721, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4723 * self._custom_payload = getattr(response, 'custom_payload', None) * * if isinstance(response, ResultMessage): # <<<<<<<<<<<<<< * if response.kind == RESULT_KIND_SET_KEYSPACE: * session = getattr(self, 'session', None) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ResultMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4723, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyObject_IsInstance(__pyx_v_response, __pyx_t_6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 4723, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4724 * * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_SET_KEYSPACE: # <<<<<<<<<<<<<< * session = getattr(self, 'session', None) * # since we're running on the event loop thread, we need to */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4724, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_RESULT_KIND_SET_KEYSPACE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4724, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4724, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4724, __pyx_L3_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4725 * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_SET_KEYSPACE: * session = getattr(self, 'session', None) # <<<<<<<<<<<<<< * # since we're running on the event loop thread, we need to * # use a non-blocking method for setting the keyspace on */ __pyx_t_10 = __Pyx_GetAttr3(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4725, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_session = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":4733 * # self._set_keyspace_completed() being called in the * # event loop thread. * if session: # <<<<<<<<<<<<<< * session._set_keyspace_for_all_pools( * response.new_keyspace, self._set_keyspace_completed) */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_session); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4733, __pyx_L3_error) if (__pyx_t_8) { /* "cassandra/cluster.py":4734 * # event loop thread. * if session: * session._set_keyspace_for_all_pools( # <<<<<<<<<<<<<< * response.new_keyspace, self._set_keyspace_completed) * elif response.kind == RESULT_KIND_SCHEMA_CHANGE: */ __pyx_t_5 = __pyx_v_session; __Pyx_INCREF(__pyx_t_5); /* "cassandra/cluster.py":4735 * if session: * session._set_keyspace_for_all_pools( * response.new_keyspace, self._set_keyspace_completed) # <<<<<<<<<<<<<< * elif response.kind == RESULT_KIND_SCHEMA_CHANGE: * # refresh the schema before responding, but do it in another */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_new_keyspace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4735, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_set_keyspace_completed); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4735, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_11}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_keyspace_for_all_pools, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4734, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":4733 * # self._set_keyspace_completed() being called in the * # event loop thread. * if session: # <<<<<<<<<<<<<< * session._set_keyspace_for_all_pools( * response.new_keyspace, self._set_keyspace_completed) */ } /* "cassandra/cluster.py":4724 * * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_SET_KEYSPACE: # <<<<<<<<<<<<<< * session = getattr(self, 'session', None) * # since we're running on the event loop thread, we need to */ goto __pyx_L13; } /* "cassandra/cluster.py":4736 * session._set_keyspace_for_all_pools( * response.new_keyspace, self._set_keyspace_completed) * elif response.kind == RESULT_KIND_SCHEMA_CHANGE: # <<<<<<<<<<<<<< * # refresh the schema before responding, but do it in another * # thread instead of the event loop thread */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4736, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_RESULT_KIND_SCHEMA_CHANGE); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4736, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_t_11, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4736, __pyx_L3_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4736, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4739 * # refresh the schema before responding, but do it in another * # thread instead of the event loop thread * self.is_schema_agreed = False # <<<<<<<<<<<<<< * self.session.submit( * refresh_schema_and_set_result, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_is_schema_agreed, Py_False) < (0)) __PYX_ERR(0, 4739, __pyx_L3_error) /* "cassandra/cluster.py":4740 * # thread instead of the event loop thread * self.is_schema_agreed = False * self.session.submit( # <<<<<<<<<<<<<< * refresh_schema_and_set_result, * self.session.cluster.control_connection, */ __pyx_t_11 = NULL; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4740, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_submit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4740, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":4741 * self.is_schema_agreed = False * self.session.submit( * refresh_schema_and_set_result, # <<<<<<<<<<<<<< * self.session.cluster.control_connection, * self, connection, **response.schema_change_event) */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_refresh_schema_and_set_result); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4741, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); /* "cassandra/cluster.py":4742 * self.session.submit( * refresh_schema_and_set_result, * self.session.cluster.control_connection, # <<<<<<<<<<<<<< * self, connection, **response.schema_change_event) * elif response.kind == RESULT_KIND_ROWS: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4742, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4742, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_control_connection); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4742, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4743 * refresh_schema_and_set_result, * self.session.cluster.control_connection, * self, connection, **response.schema_change_event) # <<<<<<<<<<<<<< * elif response.kind == RESULT_KIND_ROWS: * self._paging_state = response.paging_state */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_schema_change_event); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4743, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_14); if (unlikely(__pyx_t_14 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4743, __pyx_L3_error) } if (likely(PyDict_CheckExact(__pyx_t_14))) { #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_IS_UNIQUELY_REFERENCED(__pyx_t_14, __Pyx_ReferenceSharing_OwnStrongReference)) { __pyx_t_13 = __pyx_t_14; __pyx_t_14 = 0; } else #endif { __pyx_t_13 = PyDict_Copy(__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4743, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } } else { __pyx_t_13 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4740, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_v_self, __pyx_v_connection}; __pyx_t_6 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4740, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4736 * session._set_keyspace_for_all_pools( * response.new_keyspace, self._set_keyspace_completed) * elif response.kind == RESULT_KIND_SCHEMA_CHANGE: # <<<<<<<<<<<<<< * # refresh the schema before responding, but do it in another * # thread instead of the event loop thread */ goto __pyx_L13; } /* "cassandra/cluster.py":4744 * self.session.cluster.control_connection, * self, connection, **response.schema_change_event) * elif response.kind == RESULT_KIND_ROWS: # <<<<<<<<<<<<<< * self._paging_state = response.paging_state * self._col_names = response.column_names */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4744, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_RESULT_KIND_ROWS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4744, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4744, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4744, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4745 * self, connection, **response.schema_change_event) * elif response.kind == RESULT_KIND_ROWS: * self._paging_state = response.paging_state # <<<<<<<<<<<<<< * self._col_names = response.column_names * self._col_types = response.column_types */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_paging_state); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4745, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_paging_state_2, __pyx_t_13) < (0)) __PYX_ERR(0, 4745, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4746 * elif response.kind == RESULT_KIND_ROWS: * self._paging_state = response.paging_state * self._col_names = response.column_names # <<<<<<<<<<<<<< * self._col_types = response.column_types * if getattr(self.message, 'continuous_paging_options', None): */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4746, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_col_names, __pyx_t_13) < (0)) __PYX_ERR(0, 4746, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4747 * self._paging_state = response.paging_state * self._col_names = response.column_names * self._col_types = response.column_types # <<<<<<<<<<<<<< * if getattr(self.message, 'continuous_paging_options', None): * self._handle_continuous_paging_first_response(connection, response) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_column_types); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4747, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_col_types, __pyx_t_13) < (0)) __PYX_ERR(0, 4747, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4748 * self._col_names = response.column_names * self._col_types = response.column_types * if getattr(self.message, 'continuous_paging_options', None): # <<<<<<<<<<<<<< * self._handle_continuous_paging_first_response(connection, response) * else: */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4748, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = __Pyx_GetAttr3(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_continuous_paging_options, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4748, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4748, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4749 * self._col_types = response.column_types * if getattr(self.message, 'continuous_paging_options', None): * self._handle_continuous_paging_first_response(connection, response) # <<<<<<<<<<<<<< * else: * self._set_final_result(self.row_factory(response.column_names, response.parsed_rows)) */ __pyx_t_13 = __pyx_v_self; __Pyx_INCREF(__pyx_t_13); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_v_connection, __pyx_v_response}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_handle_continuous_paging_first, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4749, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4748 * self._col_names = response.column_names * self._col_types = response.column_types * if getattr(self.message, 'continuous_paging_options', None): # <<<<<<<<<<<<<< * self._handle_continuous_paging_first_response(connection, response) * else: */ goto __pyx_L15; } /* "cassandra/cluster.py":4751 * self._handle_continuous_paging_first_response(connection, response) * else: * self._set_final_result(self.row_factory(response.column_names, response.parsed_rows)) # <<<<<<<<<<<<<< * elif response.kind == RESULT_KIND_VOID: * self._set_final_result(None) */ /*else*/ { __pyx_t_13 = __pyx_v_self; __Pyx_INCREF(__pyx_t_13); __pyx_t_9 = __pyx_v_self; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4751, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_parsed_rows); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4751, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_t_10, __pyx_t_11}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_row_factory, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4751, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_6}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4751, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L15:; /* "cassandra/cluster.py":4744 * self.session.cluster.control_connection, * self, connection, **response.schema_change_event) * elif response.kind == RESULT_KIND_ROWS: # <<<<<<<<<<<<<< * self._paging_state = response.paging_state * self._col_names = response.column_names */ goto __pyx_L13; } /* "cassandra/cluster.py":4752 * else: * self._set_final_result(self.row_factory(response.column_names, response.parsed_rows)) * elif response.kind == RESULT_KIND_VOID: # <<<<<<<<<<<<<< * self._set_final_result(None) * else: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4752, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_RESULT_KIND_VOID); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4752, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_13 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4752, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4752, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4753 * self._set_final_result(self.row_factory(response.column_names, response.parsed_rows)) * elif response.kind == RESULT_KIND_VOID: * self._set_final_result(None) # <<<<<<<<<<<<<< * else: * self._set_final_result(response) */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, Py_None}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4753, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4752 * else: * self._set_final_result(self.row_factory(response.column_names, response.parsed_rows)) * elif response.kind == RESULT_KIND_VOID: # <<<<<<<<<<<<<< * self._set_final_result(None) * else: */ goto __pyx_L13; } /* "cassandra/cluster.py":4755 * self._set_final_result(None) * else: * self._set_final_result(response) # <<<<<<<<<<<<<< * elif isinstance(response, ErrorMessage): * retry_policy = self._retry_policy */ /*else*/ { __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_response}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4755, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __pyx_L13:; /* "cassandra/cluster.py":4723 * self._custom_payload = getattr(response, 'custom_payload', None) * * if isinstance(response, ResultMessage): # <<<<<<<<<<<<<< * if response.kind == RESULT_KIND_SET_KEYSPACE: * session = getattr(self, 'session', None) */ goto __pyx_L12; } /* "cassandra/cluster.py":4756 * else: * self._set_final_result(response) * elif isinstance(response, ErrorMessage): # <<<<<<<<<<<<<< * retry_policy = self._retry_policy * */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ErrorMessage); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4756, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyObject_IsInstance(__pyx_v_response, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 4756, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4757 * self._set_final_result(response) * elif isinstance(response, ErrorMessage): * retry_policy = self._retry_policy # <<<<<<<<<<<<<< * * if isinstance(response, ReadTimeoutErrorMessage): */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_retry_policy_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4757, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_v_retry_policy = __pyx_t_13; __pyx_t_13 = 0; /* "cassandra/cluster.py":4759 * retry_policy = self._retry_policy * * if isinstance(response, ReadTimeoutErrorMessage): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_read_timeout() */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ReadTimeoutErrorMessage); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4759, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyObject_IsInstance(__pyx_v_response, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 4759, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4760 * * if isinstance(response, ReadTimeoutErrorMessage): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_read_timeout() * retry = retry_policy.on_read_timeout( */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4760, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = (__pyx_t_13 != Py_None); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4761 * if isinstance(response, ReadTimeoutErrorMessage): * if self._metrics is not None: * self._metrics.on_read_timeout() # <<<<<<<<<<<<<< * retry = retry_policy.on_read_timeout( * self.query, retry_num=self._query_retries, **response.info) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4761, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_read_timeout, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4761, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4760 * * if isinstance(response, ReadTimeoutErrorMessage): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_read_timeout() * retry = retry_policy.on_read_timeout( */ } /* "cassandra/cluster.py":4762 * if self._metrics is not None: * self._metrics.on_read_timeout() * retry = retry_policy.on_read_timeout( # <<<<<<<<<<<<<< * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, WriteTimeoutErrorMessage): */ __pyx_t_5 = NULL; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_retry_policy, __pyx_mstate_global->__pyx_n_u_on_read_timeout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4762, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); /* "cassandra/cluster.py":4763 * self._metrics.on_read_timeout() * retry = retry_policy.on_read_timeout( * self.query, retry_num=self._query_retries, **response.info) # <<<<<<<<<<<<<< * elif isinstance(response, WriteTimeoutErrorMessage): * if self._metrics is not None: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4763, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":4762 * if self._metrics is not None: * self._metrics.on_read_timeout() * retry = retry_policy.on_read_timeout( # <<<<<<<<<<<<<< * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, WriteTimeoutErrorMessage): */ __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4763, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":4763 * self._metrics.on_read_timeout() * retry = retry_policy.on_read_timeout( * self.query, retry_num=self._query_retries, **response.info) # <<<<<<<<<<<<<< * elif isinstance(response, WriteTimeoutErrorMessage): * if self._metrics is not None: */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4763, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_14); if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_retry_num, __pyx_t_14) < (0)) __PYX_ERR(0, 4763, __pyx_L3_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_10 = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4763, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_t_9 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4763, __pyx_L3_error) } if (__Pyx_MergeKeywords(__pyx_t_10, __pyx_t_9) < (0)) __PYX_ERR(0, 4763, __pyx_L3_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_11}; __pyx_t_13 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4762, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __pyx_v_retry = __pyx_t_13; __pyx_t_13 = 0; /* "cassandra/cluster.py":4759 * retry_policy = self._retry_policy * * if isinstance(response, ReadTimeoutErrorMessage): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_read_timeout() */ goto __pyx_L16; } /* "cassandra/cluster.py":4764 * retry = retry_policy.on_read_timeout( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, WriteTimeoutErrorMessage): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_write_timeout() */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_WriteTimeoutErrorMessage); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4764, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyObject_IsInstance(__pyx_v_response, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 4764, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4765 * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, WriteTimeoutErrorMessage): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_write_timeout() * retry = retry_policy.on_write_timeout( */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4765, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = (__pyx_t_13 != Py_None); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4766 * elif isinstance(response, WriteTimeoutErrorMessage): * if self._metrics is not None: * self._metrics.on_write_timeout() # <<<<<<<<<<<<<< * retry = retry_policy.on_write_timeout( * self.query, retry_num=self._query_retries, **response.info) */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4766, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_6 = __pyx_t_10; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_write_timeout, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4766, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4765 * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, WriteTimeoutErrorMessage): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_write_timeout() * retry = retry_policy.on_write_timeout( */ } /* "cassandra/cluster.py":4767 * if self._metrics is not None: * self._metrics.on_write_timeout() * retry = retry_policy.on_write_timeout( # <<<<<<<<<<<<<< * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, UnavailableErrorMessage): */ __pyx_t_10 = NULL; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_retry_policy, __pyx_mstate_global->__pyx_n_u_on_write_timeout); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4767, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); /* "cassandra/cluster.py":4768 * self._metrics.on_write_timeout() * retry = retry_policy.on_write_timeout( * self.query, retry_num=self._query_retries, **response.info) # <<<<<<<<<<<<<< * elif isinstance(response, UnavailableErrorMessage): * if self._metrics is not None: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4768, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":4767 * if self._metrics is not None: * self._metrics.on_write_timeout() * retry = retry_policy.on_write_timeout( # <<<<<<<<<<<<<< * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, UnavailableErrorMessage): */ __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4768, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":4768 * self._metrics.on_write_timeout() * retry = retry_policy.on_write_timeout( * self.query, retry_num=self._query_retries, **response.info) # <<<<<<<<<<<<<< * elif isinstance(response, UnavailableErrorMessage): * if self._metrics is not None: */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4768, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_14); if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_retry_num, __pyx_t_14) < (0)) __PYX_ERR(0, 4768, __pyx_L3_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_5 = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4768, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_t_9 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4768, __pyx_L3_error) } if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_t_9) < (0)) __PYX_ERR(0, 4768, __pyx_L3_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; __pyx_t_13 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4767, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __pyx_v_retry = __pyx_t_13; __pyx_t_13 = 0; /* "cassandra/cluster.py":4764 * retry = retry_policy.on_read_timeout( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, WriteTimeoutErrorMessage): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_write_timeout() */ goto __pyx_L16; } /* "cassandra/cluster.py":4769 * retry = retry_policy.on_write_timeout( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, UnavailableErrorMessage): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_unavailable() */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_UnavailableErrorMessage); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4769, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = PyObject_IsInstance(__pyx_v_response, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 4769, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4770 * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, UnavailableErrorMessage): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_unavailable() * retry = retry_policy.on_unavailable( */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4770, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = (__pyx_t_13 != Py_None); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4771 * elif isinstance(response, UnavailableErrorMessage): * if self._metrics is not None: * self._metrics.on_unavailable() # <<<<<<<<<<<<<< * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4771, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_unavailable, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4771, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4770 * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, UnavailableErrorMessage): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_unavailable() * retry = retry_policy.on_unavailable( */ } /* "cassandra/cluster.py":4772 * if self._metrics is not None: * self._metrics.on_unavailable() * retry = retry_policy.on_unavailable( # <<<<<<<<<<<<<< * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, */ __pyx_t_5 = NULL; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_retry_policy, __pyx_mstate_global->__pyx_n_u_on_unavailable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4772, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); /* "cassandra/cluster.py":4773 * self._metrics.on_unavailable() * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) # <<<<<<<<<<<<<< * elif isinstance(response, (OverloadedErrorMessage, * IsBootstrappingErrorMessage, */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4773, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":4772 * if self._metrics is not None: * self._metrics.on_unavailable() * retry = retry_policy.on_unavailable( # <<<<<<<<<<<<<< * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, */ __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4773, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); /* "cassandra/cluster.py":4773 * self._metrics.on_unavailable() * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) # <<<<<<<<<<<<<< * elif isinstance(response, (OverloadedErrorMessage, * IsBootstrappingErrorMessage, */ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4773, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_14); if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_retry_num, __pyx_t_14) < (0)) __PYX_ERR(0, 4773, __pyx_L3_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_10 = __pyx_t_9; __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4773, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_t_9 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4773, __pyx_L3_error) } if (__Pyx_MergeKeywords(__pyx_t_10, __pyx_t_9) < (0)) __PYX_ERR(0, 4773, __pyx_L3_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_11}; __pyx_t_13 = __Pyx_PyObject_FastCallDict((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_10); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4772, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __pyx_v_retry = __pyx_t_13; __pyx_t_13 = 0; /* "cassandra/cluster.py":4769 * retry = retry_policy.on_write_timeout( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, UnavailableErrorMessage): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_unavailable() */ goto __pyx_L16; } /* "cassandra/cluster.py":4774 * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, # <<<<<<<<<<<<<< * IsBootstrappingErrorMessage, * TruncateError, ServerError)): */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_OverloadedErrorMessage); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4774, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); /* "cassandra/cluster.py":4775 * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, * IsBootstrappingErrorMessage, # <<<<<<<<<<<<<< * TruncateError, ServerError)): * log.warning("Host %s error: %s.", host, response.summary) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_IsBootstrappingErrorMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4775, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); /* "cassandra/cluster.py":4776 * elif isinstance(response, (OverloadedErrorMessage, * IsBootstrappingErrorMessage, * TruncateError, ServerError)): # <<<<<<<<<<<<<< * log.warning("Host %s error: %s.", host, response.summary) * if self._metrics is not None: */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_TruncateError); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4776, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ServerError); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4776, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":4774 * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, # <<<<<<<<<<<<<< * IsBootstrappingErrorMessage, * TruncateError, ServerError)): */ __pyx_t_4 = PyObject_IsInstance(__pyx_v_response, __pyx_t_13); if (!__pyx_t_4) { } else { __pyx_t_8 = __pyx_t_4; goto __pyx_L20_bool_binop_done; } /* "cassandra/cluster.py":4775 * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, * IsBootstrappingErrorMessage, # <<<<<<<<<<<<<< * TruncateError, ServerError)): * log.warning("Host %s error: %s.", host, response.summary) */ __pyx_t_4 = PyObject_IsInstance(__pyx_v_response, __pyx_t_6); if (!__pyx_t_4) { } else { __pyx_t_8 = __pyx_t_4; goto __pyx_L20_bool_binop_done; } /* "cassandra/cluster.py":4776 * elif isinstance(response, (OverloadedErrorMessage, * IsBootstrappingErrorMessage, * TruncateError, ServerError)): # <<<<<<<<<<<<<< * log.warning("Host %s error: %s.", host, response.summary) * if self._metrics is not None: */ __pyx_t_4 = PyObject_IsInstance(__pyx_v_response, __pyx_t_10); if (!__pyx_t_4) { } else { __pyx_t_8 = __pyx_t_4; goto __pyx_L20_bool_binop_done; } /* "cassandra/cluster.py":4774 * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, # <<<<<<<<<<<<<< * IsBootstrappingErrorMessage, * TruncateError, ServerError)): */ __pyx_t_4 = PyObject_IsInstance(__pyx_v_response, __pyx_t_11); __pyx_t_8 = __pyx_t_4; __pyx_L20_bool_binop_done:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4777 * IsBootstrappingErrorMessage, * TruncateError, ServerError)): * log.warning("Host %s error: %s.", host, response.summary) # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_other_error() */ __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4777, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4777, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_summary); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4777, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_Host_s_error_s, __pyx_v_host, __pyx_t_10}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4777, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4778 * TruncateError, ServerError)): * log.warning("Host %s error: %s.", host, response.summary) * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_other_error() * cl = getattr(self.message, 'consistency_level', None) */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4778, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_8 = (__pyx_t_13 != Py_None); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4779 * log.warning("Host %s error: %s.", host, response.summary) * if self._metrics is not None: * self._metrics.on_other_error() # <<<<<<<<<<<<<< * cl = getattr(self.message, 'consistency_level', None) * retry = retry_policy.on_request_error( */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4779, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_other_error, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4779, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4778 * TruncateError, ServerError)): * log.warning("Host %s error: %s.", host, response.summary) * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_other_error() * cl = getattr(self.message, 'consistency_level', None) */ } /* "cassandra/cluster.py":4780 * if self._metrics is not None: * self._metrics.on_other_error() * cl = getattr(self.message, 'consistency_level', None) # <<<<<<<<<<<<<< * retry = retry_policy.on_request_error( * self.query, cl, error=response, */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4780, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_GetAttr3(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_consistency_level, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4780, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_cl = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":4781 * self._metrics.on_other_error() * cl = getattr(self.message, 'consistency_level', None) * retry = retry_policy.on_request_error( # <<<<<<<<<<<<<< * self.query, cl, error=response, * retry_num=self._query_retries) */ __pyx_t_13 = __pyx_v_retry_policy; __Pyx_INCREF(__pyx_t_13); /* "cassandra/cluster.py":4782 * cl = getattr(self.message, 'consistency_level', None) * retry = retry_policy.on_request_error( * self.query, cl, error=response, # <<<<<<<<<<<<<< * retry_num=self._query_retries) * elif isinstance(response, PreparedQueryNotFound): */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4782, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); /* "cassandra/cluster.py":4783 * retry = retry_policy.on_request_error( * self.query, cl, error=response, * retry_num=self._query_retries) # <<<<<<<<<<<<<< * elif isinstance(response, PreparedQueryNotFound): * if self.prepared_statement: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4783, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_13, __pyx_t_11, __pyx_v_cl}; __pyx_t_5 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4781, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_error, __pyx_v_response, __pyx_t_5, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4781, __pyx_L3_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_retry_num, __pyx_t_6, __pyx_t_5, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 4781, __pyx_L3_error) __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_on_request_error, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_5); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4781, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_v_retry = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":4774 * retry = retry_policy.on_unavailable( * self.query, retry_num=self._query_retries, **response.info) * elif isinstance(response, (OverloadedErrorMessage, # <<<<<<<<<<<<<< * IsBootstrappingErrorMessage, * TruncateError, ServerError)): */ goto __pyx_L16; } /* "cassandra/cluster.py":4784 * self.query, cl, error=response, * retry_num=self._query_retries) * elif isinstance(response, PreparedQueryNotFound): # <<<<<<<<<<<<<< * if self.prepared_statement: * query_id = self.prepared_statement.query_id */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PreparedQueryNotFound); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4784, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = PyObject_IsInstance(__pyx_v_response, __pyx_t_10); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 4784, __pyx_L3_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4785 * retry_num=self._query_retries) * elif isinstance(response, PreparedQueryNotFound): * if self.prepared_statement: # <<<<<<<<<<<<<< * query_id = self.prepared_statement.query_id * assert query_id == response.info, \ */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4785, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4785, __pyx_L3_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_8) { /* "cassandra/cluster.py":4786 * elif isinstance(response, PreparedQueryNotFound): * if self.prepared_statement: * query_id = self.prepared_statement.query_id # <<<<<<<<<<<<<< * assert query_id == response.info, \ * "Got different query ID in server response (%s) than we " \ */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4786, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4786, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_query_id = __pyx_t_5; __pyx_t_5 = 0; /* "cassandra/cluster.py":4787 * if self.prepared_statement: * query_id = self.prepared_statement.query_id * assert query_id == response.info, \ # <<<<<<<<<<<<<< * "Got different query ID in server response (%s) than we " \ * "had before (%s)" % (response.info, query_id) */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4787, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = PyObject_RichCompare(__pyx_v_query_id, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4787, __pyx_L3_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4787, __pyx_L3_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_8)) { /* "cassandra/cluster.py":4789 * assert query_id == response.info, \ * "Got different query ID in server response (%s) than we " \ * "had before (%s)" % (response.info, query_id) # <<<<<<<<<<<<<< * else: * query_id = response.info */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4789, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_10), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4789, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_query_id), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4789, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Got_different_query_ID_in_server; __pyx_t_15[1] = __pyx_t_5; __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u_than_we_had_before; __pyx_t_15[3] = __pyx_t_10; __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__3; /* "cassandra/cluster.py":4788 * query_id = self.prepared_statement.query_id * assert query_id == response.info, \ * "Got different query ID in server response (%s) than we " \ # <<<<<<<<<<<<<< * "had before (%s)" % (response.info, query_id) * else: */ __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 43 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5) + 22 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4788, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), __pyx_t_6, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 4787, __pyx_L3_error) } } #else if ((1)); else __PYX_ERR(0, 4787, __pyx_L3_error) #endif /* "cassandra/cluster.py":4785 * retry_num=self._query_retries) * elif isinstance(response, PreparedQueryNotFound): * if self.prepared_statement: # <<<<<<<<<<<<<< * query_id = self.prepared_statement.query_id * assert query_id == response.info, \ */ goto __pyx_L25; } /* "cassandra/cluster.py":4791 * "had before (%s)" % (response.info, query_id) * else: * query_id = response.info # <<<<<<<<<<<<<< * * try: */ /*else*/ { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4791, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_query_id = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L25:; /* "cassandra/cluster.py":4793 * query_id = response.info * * try: # <<<<<<<<<<<<<< * prepared_statement = self.session.cluster._prepared_statements[query_id] * except KeyError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); /*try:*/ { /* "cassandra/cluster.py":4794 * * try: * prepared_statement = self.session.cluster._prepared_statements[query_id] # <<<<<<<<<<<<<< * except KeyError: * if not self.prepared_statement: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4794, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4794, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_prepared_statements); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4794, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_query_id); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4794, __pyx_L26_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_prepared_statement = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":4793 * query_id = response.info * * try: # <<<<<<<<<<<<<< * prepared_statement = self.session.cluster._prepared_statements[query_id] * except KeyError: */ } __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L31_try_end; __pyx_L26_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4795 * try: * prepared_statement = self.session.cluster._prepared_statements[query_id] * except KeyError: # <<<<<<<<<<<<<< * if not self.prepared_statement: * log.error("Tried to execute unknown prepared statement: id=%s", */ __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_KeyError)))); if (__pyx_t_19) { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 4795, __pyx_L28_except_error) __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); /* "cassandra/cluster.py":4796 * prepared_statement = self.session.cluster._prepared_statements[query_id] * except KeyError: * if not self.prepared_statement: # <<<<<<<<<<<<<< * log.error("Tried to execute unknown prepared statement: id=%s", * query_id.encode('hex')) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4796, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4796, __pyx_L28_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_4 = (!__pyx_t_8); if (__pyx_t_4) { /* "cassandra/cluster.py":4797 * except KeyError: * if not self.prepared_statement: * log.error("Tried to execute unknown prepared statement: id=%s", # <<<<<<<<<<<<<< * query_id.encode('hex')) * self._set_final_exception(response) */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4797, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4797, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4798 * if not self.prepared_statement: * log.error("Tried to execute unknown prepared statement: id=%s", * query_id.encode('hex')) # <<<<<<<<<<<<<< * self._set_final_exception(response) * return */ __pyx_t_20 = __pyx_v_query_id; __Pyx_INCREF(__pyx_t_20); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_mstate_global->__pyx_n_u_hex}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4798, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_14); assert(__pyx_t_13); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_mstate_global->__pyx_kp_u_Tried_to_execute_unknown_prepare, __pyx_t_9}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4797, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4799 * log.error("Tried to execute unknown prepared statement: id=%s", * query_id.encode('hex')) * self._set_final_exception(response) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_14 = __pyx_v_self; __Pyx_INCREF(__pyx_t_14); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_response}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4799, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4800 * query_id.encode('hex')) * self._set_final_exception(response) * return # <<<<<<<<<<<<<< * else: * prepared_statement = self.prepared_statement */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L29_except_return; /* "cassandra/cluster.py":4796 * prepared_statement = self.session.cluster._prepared_statements[query_id] * except KeyError: * if not self.prepared_statement: # <<<<<<<<<<<<<< * log.error("Tried to execute unknown prepared statement: id=%s", * query_id.encode('hex')) */ } /* "cassandra/cluster.py":4802 * return * else: * prepared_statement = self.prepared_statement # <<<<<<<<<<<<<< * self.session.cluster._prepared_statements[query_id] = prepared_statement * */ /*else*/ { __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4802, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF_SET(__pyx_v_prepared_statement, __pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4803 * else: * prepared_statement = self.prepared_statement * self.session.cluster._prepared_statements[query_id] = prepared_statement # <<<<<<<<<<<<<< * * current_keyspace = self._connection.keyspace */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4803, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4803, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_prepared_statements); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4803, __pyx_L28_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_query_id, __pyx_v_prepared_statement) < 0))) __PYX_ERR(0, 4803, __pyx_L28_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L27_exception_handled; } goto __pyx_L28_except_error; /* "cassandra/cluster.py":4793 * query_id = response.info * * try: # <<<<<<<<<<<<<< * prepared_statement = self.session.cluster._prepared_statements[query_id] * except KeyError: */ __pyx_L28_except_error:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); goto __pyx_L3_error; __pyx_L29_except_return:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); goto __pyx_L7_try_return; __pyx_L27_exception_handled:; __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_L31_try_end:; } /* "cassandra/cluster.py":4805 * self.session.cluster._prepared_statements[query_id] = prepared_statement * * current_keyspace = self._connection.keyspace # <<<<<<<<<<<<<< * prepared_keyspace = prepared_statement.keyspace * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4805, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4805, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_current_keyspace = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":4806 * * current_keyspace = self._connection.keyspace * prepared_keyspace = prepared_statement.keyspace # <<<<<<<<<<<<<< * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ * and prepared_keyspace and current_keyspace != prepared_keyspace: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4806, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_prepared_keyspace = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":4807 * current_keyspace = self._connection.keyspace * prepared_keyspace = prepared_statement.keyspace * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ # <<<<<<<<<<<<<< * and prepared_keyspace and current_keyspace != prepared_keyspace: * self._set_final_exception( */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_uses_keyspace_flag); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 4807, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_21 = (!__pyx_t_8); if (__pyx_t_21) { } else { __pyx_t_4 = __pyx_t_21; goto __pyx_L36_bool_binop_done; } /* "cassandra/cluster.py":4808 * prepared_keyspace = prepared_statement.keyspace * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ * and prepared_keyspace and current_keyspace != prepared_keyspace: # <<<<<<<<<<<<<< * self._set_final_exception( * ValueError("The Session's current keyspace (%s) does " */ __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_v_prepared_keyspace); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 4808, __pyx_L3_error) if (__pyx_t_21) { } else { __pyx_t_4 = __pyx_t_21; goto __pyx_L36_bool_binop_done; } __pyx_t_6 = PyObject_RichCompare(__pyx_v_current_keyspace, __pyx_v_prepared_keyspace, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4808, __pyx_L3_error) __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 4808, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_21; __pyx_L36_bool_binop_done:; /* "cassandra/cluster.py":4807 * current_keyspace = self._connection.keyspace * prepared_keyspace = prepared_statement.keyspace * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ # <<<<<<<<<<<<<< * and prepared_keyspace and current_keyspace != prepared_keyspace: * self._set_final_exception( */ if (__pyx_t_4) { /* "cassandra/cluster.py":4809 * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ * and prepared_keyspace and current_keyspace != prepared_keyspace: * self._set_final_exception( # <<<<<<<<<<<<<< * ValueError("The Session's current keyspace (%s) does " * "not match the keyspace the statement was " */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); /* "cassandra/cluster.py":4810 * and prepared_keyspace and current_keyspace != prepared_keyspace: * self._set_final_exception( * ValueError("The Session's current keyspace (%s) does " # <<<<<<<<<<<<<< * "not match the keyspace the statement was " * "prepared with (%s)" % */ __pyx_t_5 = NULL; /* "cassandra/cluster.py":4813 * "not match the keyspace the statement was " * "prepared with (%s)" % * (current_keyspace, prepared_keyspace))) # <<<<<<<<<<<<<< * return * */ __pyx_t_14 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_current_keyspace), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4813, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_prepared_keyspace), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4813, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_The_Session_s_current_keyspace; __pyx_t_15[1] = __pyx_t_14; __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u_does_not_match_the_keyspace_the; __pyx_t_15[3] = __pyx_t_9; __pyx_t_15[4] = __pyx_mstate_global->__pyx_kp_u__3; /* "cassandra/cluster.py":4810 * and prepared_keyspace and current_keyspace != prepared_keyspace: * self._set_final_exception( * ValueError("The Session's current keyspace (%s) does " # <<<<<<<<<<<<<< * "not match the keyspace the statement was " * "prepared with (%s)" % */ __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, 32 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14) + 63 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4810, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_13}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4810, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4809, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4814 * "prepared with (%s)" % * (current_keyspace, prepared_keyspace))) * return # <<<<<<<<<<<<<< * * log.debug("Re-preparing unrecognized prepared statement against host %s: %s", */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L7_try_return; /* "cassandra/cluster.py":4807 * current_keyspace = self._connection.keyspace * prepared_keyspace = prepared_statement.keyspace * if not ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) \ # <<<<<<<<<<<<<< * and prepared_keyspace and current_keyspace != prepared_keyspace: * self._set_final_exception( */ } /* "cassandra/cluster.py":4816 * return * * log.debug("Re-preparing unrecognized prepared statement against host %s: %s", # <<<<<<<<<<<<<< * host, prepared_statement.query_string) * prepared_keyspace = prepared_statement.keyspace \ */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4816, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4816, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4817 * * log.debug("Re-preparing unrecognized prepared statement against host %s: %s", * host, prepared_statement.query_string) # <<<<<<<<<<<<<< * prepared_keyspace = prepared_statement.keyspace \ * if ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) else None */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_query_string); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4817, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_Re_preparing_unrecognized_prepar, __pyx_v_host, __pyx_t_11}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4816, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4819 * host, prepared_statement.query_string) * prepared_keyspace = prepared_statement.keyspace \ * if ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) else None # <<<<<<<<<<<<<< * prepare_message = PrepareMessage(query=prepared_statement.query_string, * keyspace=prepared_keyspace) */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_uses_keyspace_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_cluster); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_protocol_version); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); } __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 4819, __pyx_L3_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__pyx_t_4) { /* "cassandra/cluster.py":4818 * log.debug("Re-preparing unrecognized prepared statement against host %s: %s", * host, prepared_statement.query_string) * prepared_keyspace = prepared_statement.keyspace \ # <<<<<<<<<<<<<< * if ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) else None * prepare_message = PrepareMessage(query=prepared_statement.query_string, */ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_keyspace); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4818, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_6 = __pyx_t_13; __pyx_t_13 = 0; } else { /* "cassandra/cluster.py":4819 * host, prepared_statement.query_string) * prepared_keyspace = prepared_statement.keyspace \ * if ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) else None # <<<<<<<<<<<<<< * prepare_message = PrepareMessage(query=prepared_statement.query_string, * keyspace=prepared_keyspace) */ __Pyx_INCREF(Py_None); __pyx_t_6 = Py_None; } __Pyx_DECREF_SET(__pyx_v_prepared_keyspace, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4820 * prepared_keyspace = prepared_statement.keyspace \ * if ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) else None * prepare_message = PrepareMessage(query=prepared_statement.query_string, # <<<<<<<<<<<<<< * keyspace=prepared_keyspace) * # since this might block, run on the executor to avoid hanging */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_PrepareMessage); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4820, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_prepared_statement, __pyx_mstate_global->__pyx_n_u_query_string); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4820, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); /* "cassandra/cluster.py":4821 * if ProtocolVersion.uses_keyspace_flag(self.session.cluster.protocol_version) else None * prepare_message = PrepareMessage(query=prepared_statement.query_string, * keyspace=prepared_keyspace) # <<<<<<<<<<<<<< * # since this might block, run on the executor to avoid hanging * # the event loop thread */ __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_13); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4820, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query, __pyx_t_10, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4820, __pyx_L3_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyspace, __pyx_v_prepared_keyspace, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 4820, __pyx_L3_error) __pyx_t_6 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4820, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_v_prepare_message = __pyx_t_6; __pyx_t_6 = 0; /* "cassandra/cluster.py":4824 * # since this might block, run on the executor to avoid hanging * # the event loop thread * self.session.submit(self._reprepare, prepare_message, host, connection, pool) # <<<<<<<<<<<<<< * return * else: */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4824, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = __pyx_t_11; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_reprepare); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4824, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = 0; { PyObject *__pyx_callargs[6] = {__pyx_t_5, __pyx_t_10, __pyx_v_prepare_message, __pyx_v_host, __pyx_v_connection, __pyx_v_pool}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submit, __pyx_callargs+__pyx_t_7, (6-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4824, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4825 * # the event loop thread * self.session.submit(self._reprepare, prepare_message, host, connection, pool) * return # <<<<<<<<<<<<<< * else: * if hasattr(response, 'to_exception'): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L7_try_return; /* "cassandra/cluster.py":4784 * self.query, cl, error=response, * retry_num=self._query_retries) * elif isinstance(response, PreparedQueryNotFound): # <<<<<<<<<<<<<< * if self.prepared_statement: * query_id = self.prepared_statement.query_id */ } /* "cassandra/cluster.py":4827 * return * else: * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * self._set_final_exception(response.to_exception()) * else: */ /*else*/ { __pyx_t_4 = __Pyx_HasAttr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_to_exception); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4827, __pyx_L3_error) if (__pyx_t_4) { /* "cassandra/cluster.py":4828 * else: * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) # <<<<<<<<<<<<<< * else: * self._set_final_exception(response) */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = __pyx_v_response; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_exception, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4828, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4828, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4827 * return * else: * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * self._set_final_exception(response.to_exception()) * else: */ goto __pyx_L39; } /* "cassandra/cluster.py":4830 * self._set_final_exception(response.to_exception()) * else: * self._set_final_exception(response) # <<<<<<<<<<<<<< * return * */ /*else*/ { __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_response}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4830, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L39:; /* "cassandra/cluster.py":4831 * else: * self._set_final_exception(response) * return # <<<<<<<<<<<<<< * * self._handle_retry_decision(retry, response, host) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L7_try_return; } __pyx_L16:; /* "cassandra/cluster.py":4833 * return * * self._handle_retry_decision(retry, response, host) # <<<<<<<<<<<<<< * elif isinstance(response, ConnectionException): * if self._metrics is not None: */ __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_7 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_v_retry, __pyx_v_response, __pyx_v_host}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_handle_retry_decision, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4833, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4756 * else: * self._set_final_result(response) * elif isinstance(response, ErrorMessage): # <<<<<<<<<<<<<< * retry_policy = self._retry_policy * */ goto __pyx_L12; } /* "cassandra/cluster.py":4834 * * self._handle_retry_decision(retry, response, host) * elif isinstance(response, ConnectionException): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_connection_error() */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4834, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_IsInstance(__pyx_v_response, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4834, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "cassandra/cluster.py":4835 * self._handle_retry_decision(retry, response, host) * elif isinstance(response, ConnectionException): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_connection_error() * if not isinstance(response, ConnectionShutdown): */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4835, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = (__pyx_t_6 != Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { /* "cassandra/cluster.py":4836 * elif isinstance(response, ConnectionException): * if self._metrics is not None: * self._metrics.on_connection_error() # <<<<<<<<<<<<<< * if not isinstance(response, ConnectionShutdown): * self._connection.defunct(response) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4836, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __pyx_t_11; __Pyx_INCREF(__pyx_t_10); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_connection_error, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4836, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4835 * self._handle_retry_decision(retry, response, host) * elif isinstance(response, ConnectionException): * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_connection_error() * if not isinstance(response, ConnectionShutdown): */ } /* "cassandra/cluster.py":4837 * if self._metrics is not None: * self._metrics.on_connection_error() * if not isinstance(response, ConnectionShutdown): # <<<<<<<<<<<<<< * self._connection.defunct(response) * cl = getattr(self.message, 'consistency_level', None) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_ConnectionShutdown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4837, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = PyObject_IsInstance(__pyx_v_response, __pyx_t_6); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 4837, __pyx_L3_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_21 = (!__pyx_t_4); if (__pyx_t_21) { /* "cassandra/cluster.py":4838 * self._metrics.on_connection_error() * if not isinstance(response, ConnectionShutdown): * self._connection.defunct(response) # <<<<<<<<<<<<<< * cl = getattr(self.message, 'consistency_level', None) * retry = self._retry_policy.on_request_error( */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4838, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_response}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_defunct, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4838, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":4837 * if self._metrics is not None: * self._metrics.on_connection_error() * if not isinstance(response, ConnectionShutdown): # <<<<<<<<<<<<<< * self._connection.defunct(response) * cl = getattr(self.message, 'consistency_level', None) */ } /* "cassandra/cluster.py":4839 * if not isinstance(response, ConnectionShutdown): * self._connection.defunct(response) * cl = getattr(self.message, 'consistency_level', None) # <<<<<<<<<<<<<< * retry = self._retry_policy.on_request_error( * self.query, cl, error=response, retry_num=self._query_retries) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4839, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = __Pyx_GetAttr3(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_consistency_level, Py_None); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4839, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_cl = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":4840 * self._connection.defunct(response) * cl = getattr(self.message, 'consistency_level', None) * retry = self._retry_policy.on_request_error( # <<<<<<<<<<<<<< * self.query, cl, error=response, retry_num=self._query_retries) * self._handle_retry_decision(retry, response, host) */ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_retry_policy_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4840, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = __pyx_t_11; __Pyx_INCREF(__pyx_t_6); /* "cassandra/cluster.py":4841 * cl = getattr(self.message, 'consistency_level', None) * retry = self._retry_policy.on_request_error( * self.query, cl, error=response, retry_num=self._query_retries) # <<<<<<<<<<<<<< * self._handle_retry_decision(retry, response, host) * elif isinstance(response, Exception): */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4841, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4841, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_7 = 0; { PyObject *__pyx_callargs[3 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_6, __pyx_t_5, __pyx_v_cl}; __pyx_t_9 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4840, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_error, __pyx_v_response, __pyx_t_9, __pyx_callargs+3, 0) < (0)) __PYX_ERR(0, 4840, __pyx_L3_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_retry_num, __pyx_t_13, __pyx_t_9, __pyx_callargs+3, 1) < (0)) __PYX_ERR(0, 4840, __pyx_L3_error) __pyx_t_10 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_on_request_error, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4840, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_v_retry = __pyx_t_10; __pyx_t_10 = 0; /* "cassandra/cluster.py":4842 * retry = self._retry_policy.on_request_error( * self.query, cl, error=response, retry_num=self._query_retries) * self._handle_retry_decision(retry, response, host) # <<<<<<<<<<<<<< * elif isinstance(response, Exception): * if hasattr(response, 'to_exception'): */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_11, __pyx_v_retry, __pyx_v_response, __pyx_v_host}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_handle_retry_decision, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4842, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":4834 * * self._handle_retry_decision(retry, response, host) * elif isinstance(response, ConnectionException): # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.on_connection_error() */ goto __pyx_L12; } /* "cassandra/cluster.py":4843 * self.query, cl, error=response, retry_num=self._query_retries) * self._handle_retry_decision(retry, response, host) * elif isinstance(response, Exception): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) */ __pyx_t_21 = __Pyx_PyException_Check(__pyx_v_response); if (__pyx_t_21) { /* "cassandra/cluster.py":4844 * self._handle_retry_decision(retry, response, host) * elif isinstance(response, Exception): * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * self._set_final_exception(response.to_exception()) * else: */ __pyx_t_21 = __Pyx_HasAttr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_to_exception); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 4844, __pyx_L3_error) if (__pyx_t_21) { /* "cassandra/cluster.py":4845 * elif isinstance(response, Exception): * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) # <<<<<<<<<<<<<< * else: * self._set_final_exception(response) */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); __pyx_t_13 = __pyx_v_response; __Pyx_INCREF(__pyx_t_13); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_exception, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4845, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4845, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":4844 * self._handle_retry_decision(retry, response, host) * elif isinstance(response, Exception): * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * self._set_final_exception(response.to_exception()) * else: */ goto __pyx_L42; } /* "cassandra/cluster.py":4847 * self._set_final_exception(response.to_exception()) * else: * self._set_final_exception(response) # <<<<<<<<<<<<<< * else: * # we got some other kind of response message */ /*else*/ { __pyx_t_9 = __pyx_v_self; __Pyx_INCREF(__pyx_t_9); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_response}; __pyx_t_10 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4847, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_L42:; /* "cassandra/cluster.py":4843 * self.query, cl, error=response, retry_num=self._query_retries) * self._handle_retry_decision(retry, response, host) * elif isinstance(response, Exception): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) */ goto __pyx_L12; } /* "cassandra/cluster.py":4850 * else: * # we got some other kind of response message * msg = "Got unexpected message: %r" % (response,) # <<<<<<<<<<<<<< * exc = ConnectionException(msg, host) * self._cancel_timer() */ /*else*/ { __pyx_t_10 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_response), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4850, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Got_unexpected_message, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4850, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_msg = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4851 * # we got some other kind of response message * msg = "Got unexpected message: %r" % (response,) * exc = ConnectionException(msg, host) # <<<<<<<<<<<<<< * self._cancel_timer() * self._connection.defunct(exc) */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4851, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_10, __pyx_v_msg, __pyx_v_host}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4851, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_v_exc = __pyx_t_9; __pyx_t_9 = 0; /* "cassandra/cluster.py":4852 * msg = "Got unexpected message: %r" % (response,) * exc = ConnectionException(msg, host) * self._cancel_timer() # <<<<<<<<<<<<<< * self._connection.defunct(exc) * self._set_final_exception(exc) */ __pyx_t_11 = __pyx_v_self; __Pyx_INCREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel_timer, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4852, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4853 * exc = ConnectionException(msg, host) * self._cancel_timer() * self._connection.defunct(exc) # <<<<<<<<<<<<<< * self._set_final_exception(exc) * except Exception as exc: */ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_connection); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4853, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __pyx_t_10; __Pyx_INCREF(__pyx_t_11); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_exc}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_defunct, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4853, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4854 * self._cancel_timer() * self._connection.defunct(exc) * self._set_final_exception(exc) # <<<<<<<<<<<<<< * except Exception as exc: * # almost certainly caused by a bug, but we need to set something here */ __pyx_t_10 = __pyx_v_self; __Pyx_INCREF(__pyx_t_10); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_exc}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4854, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __pyx_L12:; /* "cassandra/cluster.py":4709 * * def _set_result(self, host, connection, pool, response): * try: # <<<<<<<<<<<<<< * self.coordinator_host = host * if pool: */ } __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_L8_try_end; __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":4855 * self._connection.defunct(exc) * self._set_final_exception(exc) * except Exception as exc: # <<<<<<<<<<<<<< * # almost certainly caused by a bug, but we need to set something here * log.exception("Unexpected exception while handling result in ResponseFuture:") */ __pyx_t_19 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_19) { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 4855, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_exc, __pyx_t_10); /*try:*/ { /* "cassandra/cluster.py":4857 * except Exception as exc: * # almost certainly caused by a bug, but we need to set something here * log.exception("Unexpected exception while handling result in ResponseFuture:") # <<<<<<<<<<<<<< * self._set_final_exception(exc) * */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4857, __pyx_L48_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4857, __pyx_L48_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_14))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_14); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_14); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_14, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_Unexpected_exception_while_handl}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4857, __pyx_L48_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":4858 * # almost certainly caused by a bug, but we need to set something here * log.exception("Unexpected exception while handling result in ResponseFuture:") * self._set_final_exception(exc) # <<<<<<<<<<<<<< * * def _handle_continuous_paging_first_response(self, connection, response): */ __pyx_t_14 = __pyx_v_self; __Pyx_INCREF(__pyx_t_14); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_exc}; __pyx_t_13 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4858, __pyx_L48_error) __Pyx_GOTREF(__pyx_t_13); } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } /* "cassandra/cluster.py":4855 * self._connection.defunct(exc) * self._set_final_exception(exc) * except Exception as exc: # <<<<<<<<<<<<<< * # almost certainly caused by a bug, but we need to set something here * log.exception("Unexpected exception while handling result in ResponseFuture:") */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; goto __pyx_L49; } __pyx_L48_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26); if ( unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_17, &__pyx_t_16); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_24); __Pyx_XGOTREF(__pyx_t_25); __Pyx_XGOTREF(__pyx_t_26); __pyx_t_19 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename; { __Pyx_DECREF(__pyx_v_exc); __pyx_v_exc = 0; } __Pyx_XGIVEREF(__pyx_t_24); __Pyx_XGIVEREF(__pyx_t_25); __Pyx_XGIVEREF(__pyx_t_26); __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_ErrRestore(__pyx_t_18, __pyx_t_17, __pyx_t_16); __pyx_t_18 = 0; __pyx_t_17 = 0; __pyx_t_16 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_lineno = __pyx_t_19; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23; goto __pyx_L5_except_error; } __pyx_L49:; } __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_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":4709 * * def _set_result(self, host, connection, pool, response): * try: # <<<<<<<<<<<<<< * self.coordinator_host = host * if pool: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); __pyx_L8_try_end:; } /* "cassandra/cluster.py":4708 * self.send_request() * * def _set_result(self, host, connection, pool, response): # <<<<<<<<<<<<<< * try: * self.coordinator_host = host */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_trace_id); __Pyx_XDECREF(__pyx_v_session); __Pyx_XDECREF(__pyx_v_retry_policy); __Pyx_XDECREF(__pyx_v_retry); __Pyx_XDECREF(__pyx_v_cl); __Pyx_XDECREF(__pyx_v_query_id); __Pyx_XDECREF(__pyx_v_prepared_statement); __Pyx_XDECREF(__pyx_v_current_keyspace); __Pyx_XDECREF(__pyx_v_prepared_keyspace); __Pyx_XDECREF(__pyx_v_prepare_message); __Pyx_XDECREF(__pyx_v_msg); __Pyx_XDECREF(__pyx_v_exc); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4860 * self._set_final_exception(exc) * * def _handle_continuous_paging_first_response(self, connection, response): # <<<<<<<<<<<<<< * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, * self._protocol_handler.decode_message, */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_31_handle_continuous_paging_first_response(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_31_handle_continuous_paging_first_response = {"_handle_continuous_paging_first_response", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_31_handle_continuous_paging_first_response, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_31_handle_continuous_paging_first_response(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handle_continuous_paging_first_response (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4860, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4860, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4860, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4860, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_continuous_paging_first_response", 0) < (0)) __PYX_ERR(0, 4860, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_continuous_paging_first_response", 1, 3, 3, i); __PYX_ERR(0, 4860, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4860, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4860, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4860, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_connection = values[1]; __pyx_v_response = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_handle_continuous_paging_first_response", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 4860, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._handle_continuous_paging_first_response", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_30_handle_continuous_paging_first_response(__pyx_self, __pyx_v_self, __pyx_v_connection, __pyx_v_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_30_handle_continuous_paging_first_response(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_connection, PyObject *__pyx_v_response) { 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; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_handle_continuous_paging_first_response", 0); /* "cassandra/cluster.py":4861 * * def _handle_continuous_paging_first_response(self, connection, response): * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, # <<<<<<<<<<<<<< * self._protocol_handler.decode_message, * self.row_factory, */ __pyx_t_2 = __pyx_v_connection; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_stream_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); /* "cassandra/cluster.py":4862 * def _handle_continuous_paging_first_response(self, connection, response): * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, * self._protocol_handler.decode_message, # <<<<<<<<<<<<<< * self.row_factory, * self._continuous_paging_state) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_protocol_handler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_decode_message); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4863 * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, * self._protocol_handler.decode_message, * self.row_factory, # <<<<<<<<<<<<<< * self._continuous_paging_state) * self._continuous_paging_session.on_message(response) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":4864 * self._protocol_handler.decode_message, * self.row_factory, * self._continuous_paging_state) # <<<<<<<<<<<<<< * self._continuous_paging_session.on_message(response) * self._set_final_result(self._continuous_paging_session.results()) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_continuous_paging_state_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_t_3, __pyx_t_5, __pyx_t_4, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new_continuous_paging_session, __pyx_callargs+__pyx_t_7, (5-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__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; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "cassandra/cluster.py":4861 * * def _handle_continuous_paging_first_response(self, connection, response): * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, # <<<<<<<<<<<<<< * self._protocol_handler.decode_message, * self.row_factory, */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_continuous_paging_session, __pyx_t_1) < (0)) __PYX_ERR(0, 4861, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4865 * self.row_factory, * self._continuous_paging_state) * self._continuous_paging_session.on_message(response) # <<<<<<<<<<<<<< * self._set_final_result(self._continuous_paging_session.results()) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_continuous_paging_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_response}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_message, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 4865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4866 * self._continuous_paging_state) * self._continuous_paging_session.on_message(response) * self._set_final_result(self._continuous_paging_session.results()) # <<<<<<<<<<<<<< * * def _set_keyspace_completed(self, errors): */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_continuous_paging_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_results, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4860 * self._set_final_exception(exc) * * def _handle_continuous_paging_first_response(self, connection, response): # <<<<<<<<<<<<<< * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, * self._protocol_handler.decode_message, */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._handle_continuous_paging_first_response", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4868 * self._set_final_result(self._continuous_paging_session.results()) * * def _set_keyspace_completed(self, errors): # <<<<<<<<<<<<<< * if not errors: * self._set_final_result(None) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_33_set_keyspace_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_33_set_keyspace_completed = {"_set_keyspace_completed", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_33_set_keyspace_completed, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_33_set_keyspace_completed(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_errors = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_keyspace_completed (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_errors,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4868, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4868, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4868, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_keyspace_completed", 0) < (0)) __PYX_ERR(0, 4868, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_keyspace_completed", 1, 2, 2, i); __PYX_ERR(0, 4868, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4868, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4868, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_errors = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_keyspace_completed", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4868, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_keyspace_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_32_set_keyspace_completed(__pyx_self, __pyx_v_self, __pyx_v_errors); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_32_set_keyspace_completed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_errors) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_keyspace_completed", 0); /* "cassandra/cluster.py":4869 * * def _set_keyspace_completed(self, errors): * if not errors: # <<<<<<<<<<<<<< * self._set_final_result(None) * else: */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_errors); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4869, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { /* "cassandra/cluster.py":4870 * def _set_keyspace_completed(self, errors): * if not errors: * self._set_final_result(None) # <<<<<<<<<<<<<< * else: * self._set_final_exception(ConnectionException( */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, Py_None}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4869 * * def _set_keyspace_completed(self, errors): * if not errors: # <<<<<<<<<<<<<< * self._set_final_result(None) * else: */ goto __pyx_L3; } /* "cassandra/cluster.py":4872 * self._set_final_result(None) * else: * self._set_final_exception(ConnectionException( # <<<<<<<<<<<<<< * "Failed to set keyspace on all hosts: %s" % (errors,))) * */ /*else*/ { __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "cassandra/cluster.py":4873 * else: * self._set_final_exception(ConnectionException( * "Failed to set keyspace on all hosts: %s" % (errors,))) # <<<<<<<<<<<<<< * * def _execute_after_prepare(self, host, connection, pool, response): */ __pyx_t_9 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_errors), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Failed_to_set_keyspace_on_all_ho, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; /* "cassandra/cluster.py":4868 * self._set_final_result(self._continuous_paging_session.results()) * * def _set_keyspace_completed(self, errors): # <<<<<<<<<<<<<< * if not errors: * self._set_final_result(None) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __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_AddTraceback("cassandra.cluster.ResponseFuture._set_keyspace_completed", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4875 * "Failed to set keyspace on all hosts: %s" % (errors,))) * * def _execute_after_prepare(self, host, connection, pool, response): # <<<<<<<<<<<<<< * """ * Handle the response to our attempt to prepare a statement. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_35_execute_after_prepare(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_34_execute_after_prepare, "\n Handle the response to our attempt to prepare a statement.\n If it succeeded, run the original query again against the same host.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_35_execute_after_prepare = {"_execute_after_prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_35_execute_after_prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_34_execute_after_prepare}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_35_execute_after_prepare(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_host = 0; PyObject *__pyx_v_connection = 0; PyObject *__pyx_v_pool = 0; PyObject *__pyx_v_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_execute_after_prepare (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_connection_2,&__pyx_mstate_global->__pyx_n_u_pool,&__pyx_mstate_global->__pyx_n_u_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4875, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4875, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4875, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4875, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4875, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4875, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_execute_after_prepare", 0) < (0)) __PYX_ERR(0, 4875, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_execute_after_prepare", 1, 5, 5, i); __PYX_ERR(0, 4875, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4875, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4875, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4875, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4875, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 4875, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_host = values[1]; __pyx_v_connection = values[2]; __pyx_v_pool = values[3]; __pyx_v_response = values[4]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_execute_after_prepare", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 4875, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._execute_after_prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_34_execute_after_prepare(__pyx_self, __pyx_v_self, __pyx_v_host, __pyx_v_connection, __pyx_v_pool, __pyx_v_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_34_execute_after_prepare(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_host, PyObject *__pyx_v_connection, PyObject *__pyx_v_pool, PyObject *__pyx_v_response) { PyObject *__pyx_v_new_metadata_id = NULL; PyObject *__pyx_v_request_id = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; 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; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15[4]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_execute_after_prepare", 0); /* "cassandra/cluster.py":4880 * If it succeeded, run the original query again against the same host. * """ * if pool: # <<<<<<<<<<<<<< * pool.return_connection(connection) * */ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_pool); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4880, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":4881 * """ * if pool: * pool.return_connection(connection) # <<<<<<<<<<<<<< * * if self._final_exception: */ __pyx_t_3 = __pyx_v_pool; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_connection}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_return_connection, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4880 * If it succeeded, run the original query again against the same host. * """ * if pool: # <<<<<<<<<<<<<< * pool.return_connection(connection) * */ } /* "cassandra/cluster.py":4883 * pool.return_connection(connection) * * if self._final_exception: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4884 * * if self._final_exception: * return # <<<<<<<<<<<<<< * * if isinstance(response, ResultMessage): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4883 * pool.return_connection(connection) * * if self._final_exception: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":4886 * return * * if isinstance(response, ResultMessage): # <<<<<<<<<<<<<< * if response.kind == RESULT_KIND_PREPARED: * if self.prepared_statement: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ResultMessage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyObject_IsInstance(__pyx_v_response, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4887 * * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_PREPARED: # <<<<<<<<<<<<<< * if self.prepared_statement: * if self.prepared_statement.query_id != response.query_id: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_kind); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_RESULT_KIND_PREPARED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4888 * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_PREPARED: * if self.prepared_statement: # <<<<<<<<<<<<<< * if self.prepared_statement.query_id != response.query_id: * self._set_final_exception(DriverException( */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4889 * if response.kind == RESULT_KIND_PREPARED: * if self.prepared_statement: * if self.prepared_statement.query_id != response.query_id: # <<<<<<<<<<<<<< * self._set_final_exception(DriverException( * "ID mismatch while trying to reprepare (expected {expected}, got {got}). " */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 4889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4890 * if self.prepared_statement: * if self.prepared_statement.query_id != response.query_id: * self._set_final_exception(DriverException( # <<<<<<<<<<<<<< * "ID mismatch while trying to reprepare (expected {expected}, got {got}). " * "This prepared statement won't work anymore. " */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); /* "cassandra/cluster.py":4894 * "This prepared statement won't work anymore. " * "This usually happens when you run a 'USE...' " * "query after the statement was prepared.".format( # <<<<<<<<<<<<<< * expected=hexlify(self.prepared_statement.query_id), got=hexlify(response.query_id) * ) */ __pyx_t_9 = __pyx_mstate_global->__pyx_kp_u_ID_mismatch_while_trying_to_repr; __Pyx_INCREF(__pyx_t_9); /* "cassandra/cluster.py":4895 * "This usually happens when you run a 'USE...' " * "query after the statement was prepared.".format( * expected=hexlify(self.prepared_statement.query_id), got=hexlify(response.query_id) # <<<<<<<<<<<<<< * ) * )) */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_hexlify); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_14}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_hexlify); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_query_id); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_14); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_13}; __pyx_t_12 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); } __pyx_t_4 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_9, NULL}; __pyx_t_11 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_expected, __pyx_t_10, __pyx_t_11, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 4894, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_got, __pyx_t_12, __pyx_t_11, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 4894, __pyx_L1_error) __pyx_t_8 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_format, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_11); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); } __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4889 * if response.kind == RESULT_KIND_PREPARED: * if self.prepared_statement: * if self.prepared_statement.query_id != response.query_id: # <<<<<<<<<<<<<< * self._set_final_exception(DriverException( * "ID mismatch while trying to reprepare (expected {expected}, got {got}). " */ } /* "cassandra/cluster.py":4898 * ) * )) * self.prepared_statement.result_metadata = response.column_metadata # <<<<<<<<<<<<<< * new_metadata_id = response.result_metadata_id * if new_metadata_id is not None: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_column_metadata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_result_metadata, __pyx_t_2) < (0)) __PYX_ERR(0, 4898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4899 * )) * self.prepared_statement.result_metadata = response.column_metadata * new_metadata_id = response.result_metadata_id # <<<<<<<<<<<<<< * if new_metadata_id is not None: * self.prepared_statement.result_metadata_id = new_metadata_id */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_result_metadata_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_new_metadata_id = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4900 * self.prepared_statement.result_metadata = response.column_metadata * new_metadata_id = response.result_metadata_id * if new_metadata_id is not None: # <<<<<<<<<<<<<< * self.prepared_statement.result_metadata_id = new_metadata_id * */ __pyx_t_1 = (__pyx_v_new_metadata_id != Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":4901 * new_metadata_id = response.result_metadata_id * if new_metadata_id is not None: * self.prepared_statement.result_metadata_id = new_metadata_id # <<<<<<<<<<<<<< * * # use self._query to re-use the same host and */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_prepared_statement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyObject_SetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_result_metadata_id, __pyx_v_new_metadata_id) < (0)) __PYX_ERR(0, 4901, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4900 * self.prepared_statement.result_metadata = response.column_metadata * new_metadata_id = response.result_metadata_id * if new_metadata_id is not None: # <<<<<<<<<<<<<< * self.prepared_statement.result_metadata_id = new_metadata_id * */ } /* "cassandra/cluster.py":4888 * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_PREPARED: * if self.prepared_statement: # <<<<<<<<<<<<<< * if self.prepared_statement.query_id != response.query_id: * self._set_final_exception(DriverException( */ } /* "cassandra/cluster.py":4905 * # use self._query to re-use the same host and * # at the same time properly borrow the connection * request_id = self._query(host) # <<<<<<<<<<<<<< * if request_id is None: * # this host errored out, move on to the next */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_host}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_query_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_request_id = __pyx_t_3; __pyx_t_3 = 0; /* "cassandra/cluster.py":4906 * # at the same time properly borrow the connection * request_id = self._query(host) * if request_id is None: # <<<<<<<<<<<<<< * # this host errored out, move on to the next * self.send_request() */ __pyx_t_1 = (__pyx_v_request_id == Py_None); if (__pyx_t_1) { /* "cassandra/cluster.py":4908 * if request_id is None: * # this host errored out, move on to the next * self.send_request() # <<<<<<<<<<<<<< * else: * self._set_final_exception(ConnectionException( */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4906 * # at the same time properly borrow the connection * request_id = self._query(host) * if request_id is None: # <<<<<<<<<<<<<< * # this host errored out, move on to the next * self.send_request() */ } /* "cassandra/cluster.py":4887 * * if isinstance(response, ResultMessage): * if response.kind == RESULT_KIND_PREPARED: # <<<<<<<<<<<<<< * if self.prepared_statement: * if self.prepared_statement.query_id != response.query_id: */ goto __pyx_L6; } /* "cassandra/cluster.py":4910 * self.send_request() * else: * self._set_final_exception(ConnectionException( # <<<<<<<<<<<<<< * "Got unexpected response when preparing statement " * "on host %s: %s" % (host, response))) */ /*else*/ { __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); /* "cassandra/cluster.py":4912 * self._set_final_exception(ConnectionException( * "Got unexpected response when preparing statement " * "on host %s: %s" % (host, response))) # <<<<<<<<<<<<<< * elif isinstance(response, ErrorMessage): * if hasattr(response, 'to_exception'): */ __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_host), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_response), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Got_unexpected_response_when_pre_2; __pyx_t_15[1] = __pyx_t_6; __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9; __pyx_t_15[3] = __pyx_t_11; /* "cassandra/cluster.py":4911 * else: * self._set_final_exception(ConnectionException( * "Got unexpected response when preparing statement " # <<<<<<<<<<<<<< * "on host %s: %s" % (host, response))) * elif isinstance(response, ErrorMessage): */ __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 57 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_12}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L6:; /* "cassandra/cluster.py":4886 * return * * if isinstance(response, ResultMessage): # <<<<<<<<<<<<<< * if response.kind == RESULT_KIND_PREPARED: * if self.prepared_statement: */ goto __pyx_L5; } /* "cassandra/cluster.py":4913 * "Got unexpected response when preparing statement " * "on host %s: %s" % (host, response))) * elif isinstance(response, ErrorMessage): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ErrorMessage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_IsInstance(__pyx_v_response, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4913, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4914 * "on host %s: %s" % (host, response))) * elif isinstance(response, ErrorMessage): * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * self._set_final_exception(response.to_exception()) * else: */ __pyx_t_1 = __Pyx_HasAttr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_to_exception); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4914, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":4915 * elif isinstance(response, ErrorMessage): * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) # <<<<<<<<<<<<<< * else: * self._set_final_exception(response) */ __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = __pyx_v_response; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_exception, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_2}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4914 * "on host %s: %s" % (host, response))) * elif isinstance(response, ErrorMessage): * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * self._set_final_exception(response.to_exception()) * else: */ goto __pyx_L11; } /* "cassandra/cluster.py":4917 * self._set_final_exception(response.to_exception()) * else: * self._set_final_exception(response) # <<<<<<<<<<<<<< * elif isinstance(response, ConnectionException): * log.debug("Connection error when preparing statement on host %s: %s", */ /*else*/ { __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_response}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L11:; /* "cassandra/cluster.py":4913 * "Got unexpected response when preparing statement " * "on host %s: %s" % (host, response))) * elif isinstance(response, ErrorMessage): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * self._set_final_exception(response.to_exception()) */ goto __pyx_L5; } /* "cassandra/cluster.py":4918 * else: * self._set_final_exception(response) * elif isinstance(response, ConnectionException): # <<<<<<<<<<<<<< * log.debug("Connection error when preparing statement on host %s: %s", * host, response) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_IsInstance(__pyx_v_response, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4918, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":4919 * self._set_final_exception(response) * elif isinstance(response, ConnectionException): * log.debug("Connection error when preparing statement on host %s: %s", # <<<<<<<<<<<<<< * host, response) * # try again on a different host, preparing again if necessary */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_debug); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":4920 * elif isinstance(response, ConnectionException): * log.debug("Connection error when preparing statement on host %s: %s", * host, response) # <<<<<<<<<<<<<< * # try again on a different host, preparing again if necessary * self._errors[host] = response */ __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_8))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_8, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Connection_error_when_preparing, __pyx_v_host, __pyx_v_response}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_8, __pyx_callargs+__pyx_t_4, (4-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4919, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4922 * host, response) * # try again on a different host, preparing again if necessary * self._errors[host] = response # <<<<<<<<<<<<<< * self.send_request() * else: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4922, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_host, __pyx_v_response) < 0))) __PYX_ERR(0, 4922, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4923 * # try again on a different host, preparing again if necessary * self._errors[host] = response * self.send_request() # <<<<<<<<<<<<<< * else: * self._set_final_exception(ConnectionException( */ __pyx_t_8 = __pyx_v_self; __Pyx_INCREF(__pyx_t_8); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":4918 * else: * self._set_final_exception(response) * elif isinstance(response, ConnectionException): # <<<<<<<<<<<<<< * log.debug("Connection error when preparing statement on host %s: %s", * host, response) */ goto __pyx_L5; } /* "cassandra/cluster.py":4925 * self.send_request() * else: * self._set_final_exception(ConnectionException( # <<<<<<<<<<<<<< * "Got unexpected response type when preparing " * "statement on host %s: %s" % (host, response))) */ /*else*/ { __pyx_t_8 = __pyx_v_self; __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_ConnectionException); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 4925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); /* "cassandra/cluster.py":4927 * self._set_final_exception(ConnectionException( * "Got unexpected response type when preparing " * "statement on host %s: %s" % (host, response))) # <<<<<<<<<<<<<< * * def _set_final_result(self, response): */ __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_host), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_response), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_15[0] = __pyx_mstate_global->__pyx_kp_u_Got_unexpected_response_type_whe; __pyx_t_15[1] = __pyx_t_7; __pyx_t_15[2] = __pyx_mstate_global->__pyx_kp_u__9; __pyx_t_15[3] = __pyx_t_11; /* "cassandra/cluster.py":4926 * else: * self._set_final_exception(ConnectionException( * "Got unexpected response type when preparing " # <<<<<<<<<<<<<< * "statement on host %s: %s" % (host, response))) * */ __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, 62 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_2}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L5:; /* "cassandra/cluster.py":4875 * "Failed to set keyspace on all hosts: %s" % (errors,))) * * def _execute_after_prepare(self, host, connection, pool, response): # <<<<<<<<<<<<<< * """ * Handle the response to our attempt to prepare a statement. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __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_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._execute_after_prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_new_metadata_id); __Pyx_XDECREF(__pyx_v_request_id); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4929 * "statement on host %s: %s" % (host, response))) * * def _set_final_result(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_37_set_final_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_37_set_final_result = {"_set_final_result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_37_set_final_result, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_37_set_final_result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_final_result (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4929, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4929, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4929, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_final_result", 0) < (0)) __PYX_ERR(0, 4929, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_final_result", 1, 2, 2, i); __PYX_ERR(0, 4929, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4929, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4929, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_response = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_final_result", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4929, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_36_set_final_result(__pyx_self, __pyx_v_self, __pyx_v_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ResponseFuture_17_set_final_result_2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":4941 * # registered callback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._callbacks * ) */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_17_set_final_result_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_19_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 4941, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_14ResponseFuture_17_set_final_result_2generator9, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ResponseFuture__set_final_result, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_result.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ResponseFuture_17_set_final_result_2generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); 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)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 4941, __pyx_L1_error) } /* "cassandra/cluster.py":4942 * to_call = tuple( * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._callbacks # <<<<<<<<<<<<<< * ) * */ if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 4942, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4942, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4942, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4942, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4942, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4942, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4942, __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_INCREF(__pyx_t_5); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); } #else __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4942, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < (0)) __PYX_ERR(0, 4942, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4942, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fn); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fn, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_args); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_args, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_kwargs); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_kwargs, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":4941 * # registered callback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._callbacks * ) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_response)) { __Pyx_RaiseClosureNameError("response"); __PYX_ERR(0, 4941, __pyx_L1_error) } __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_fn) != (0)) __PYX_ERR(0, 4941, __pyx_L1_error); __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_response); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_response); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_response) != (0)) __PYX_ERR(0, 4941, __pyx_L1_error); __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_cur_scope->__pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyNumber_Add(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4941, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_v_kwargs))) { __pyx_t_6 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_6 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4941, __pyx_L1_error) /* "cassandra/cluster.py":4942 * to_call = tuple( * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._callbacks # <<<<<<<<<<<<<< * ) * */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "cassandra/cluster.py":4941 * # registered callback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._callbacks * ) */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4929 * "statement on host %s: %s" % (host, response))) * * def _set_final_result(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_36_set_final_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *__pyx_cur_scope; PyObject *__pyx_v_to_call = NULL; PyObject *__pyx_v_callback_partial = NULL; PyObject *__pyx_gb_9cassandra_7cluster_14ResponseFuture_17_set_final_result_2generator9 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_t_4; 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; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_final_result", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_18__set_final_result(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 4929, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_response = __pyx_v_response; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_response); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_response); /* "cassandra/cluster.py":4930 * * def _set_final_result(self, response): * self._cancel_timer() # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.request_timer.addValue(time.time() - self._start_time) */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel_timer, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4931 * def _set_final_result(self, response): * self._cancel_timer() * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.request_timer.addValue(time.time() - self._start_time) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "cassandra/cluster.py":4932 * self._cancel_timer() * if self._metrics is not None: * self._metrics.request_timer.addValue(time.time() - self._start_time) # <<<<<<<<<<<<<< * * with self._callback_lock: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_request_timer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_start_time_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyNumber_Subtract(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_addValue, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4931 * def _set_final_result(self, response): * self._cancel_timer() * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.request_timer.addValue(time.time() - self._start_time) * */ } /* "cassandra/cluster.py":4934 * self._metrics.request_timer.addValue(time.time() - self._start_time) * * with self._callback_lock: # <<<<<<<<<<<<<< * self._final_result = response * # save off current callbacks inside lock for execution outside it */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callback_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = NULL; __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4934, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4934, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "cassandra/cluster.py":4935 * * with self._callback_lock: * self._final_result = response # <<<<<<<<<<<<<< * # save off current callbacks inside lock for execution outside it * # -- prevents case where _final_result is set, then a callback is */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result, __pyx_cur_scope->__pyx_v_response) < (0)) __PYX_ERR(0, 4935, __pyx_L8_error) /* "cassandra/cluster.py":4942 * to_call = tuple( * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._callbacks # <<<<<<<<<<<<<< * ) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4942, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); /* "cassandra/cluster.py":4941 * # registered callback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._callbacks * ) */ __pyx_t_6 = __pyx_pf_9cassandra_7cluster_14ResponseFuture_17_set_final_result_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4941, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4940 * # added and executed on the spot, then executed again as a * # registered callback * to_call = tuple( # <<<<<<<<<<<<<< * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._callbacks */ __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4940, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_to_call = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4934 * self._metrics.request_timer.addValue(time.time() - self._start_time) * * with self._callback_lock: # <<<<<<<<<<<<<< * self._final_result = response * # save off current callbacks inside lock for execution outside it */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_result", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 4934, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4934, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4934, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_4 < (0)) __PYX_ERR(0, 4934, __pyx_L10_except_error) __pyx_t_15 = (!__pyx_t_4); if (unlikely(__pyx_t_15)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 4934, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_10) { __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } goto __pyx_L7; } __pyx_L7:; } goto __pyx_L17; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":4945 * ) * * self._event.set() # <<<<<<<<<<<<<< * * # apply each callback */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4945, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4948 * * # apply each callback * for callback_partial in to_call: # <<<<<<<<<<<<<< * callback_partial() * */ if (unlikely(!__pyx_v_to_call)) { __Pyx_RaiseUnboundLocalError("to_call"); __PYX_ERR(0, 4948, __pyx_L1_error) } __pyx_t_2 = __pyx_v_to_call; __Pyx_INCREF(__pyx_t_2); __pyx_t_16 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4948, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_16)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_16); #endif ++__pyx_t_16; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_callback_partial, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4949 * # apply each callback * for callback_partial in to_call: * callback_partial() # <<<<<<<<<<<<<< * * def _set_final_exception(self, response): */ __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_callback_partial); __pyx_t_7 = __pyx_v_callback_partial; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4949, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4948 * * # apply each callback * for callback_partial in to_call: # <<<<<<<<<<<<<< * callback_partial() * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4929 * "statement on host %s: %s" % (host, response))) * * def _set_final_result(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ /* 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_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_to_call); __Pyx_XDECREF(__pyx_v_callback_partial); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_14ResponseFuture_17_set_final_result_2generator9); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4951 * callback_partial() * * def _set_final_exception(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_39_set_final_exception(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_39_set_final_exception = {"_set_final_exception", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_39_set_final_exception, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_39_set_final_exception(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_final_exception (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4951, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4951, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4951, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_final_exception", 0) < (0)) __PYX_ERR(0, 4951, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_final_exception", 1, 2, 2, i); __PYX_ERR(0, 4951, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4951, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4951, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_response = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_final_exception", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 4951, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_38_set_final_exception(__pyx_self, __pyx_v_self, __pyx_v_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "cassandra/cluster.py":4963 * # registered errback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._errbacks * ) */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_21_genexpr(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 4963, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_2generator10, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19]), (PyObject *) __pyx_cur_scope, __pyx_mstate_global->__pyx_n_u_genexpr, __pyx_mstate_global->__pyx_n_u_ResponseFuture__set_final_except, __pyx_mstate_global->__pyx_n_u_cassandra_cluster); if (unlikely(!gen)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_exception.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_2generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *__pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); 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)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(__pyx_sent_value != Py_None)) { if (unlikely(__pyx_sent_value)) PyErr_SetString(PyExc_TypeError, "can't send non-None value to a just-started generator"); __PYX_ERR(0, 4963, __pyx_L1_error) } /* "cassandra/cluster.py":4964 * to_call = tuple( * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._errbacks # <<<<<<<<<<<<<< * ) * self._event.set() */ if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 4964, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_genexpr_arg_0)) { __pyx_t_1 = __pyx_cur_scope->__pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_genexpr_arg_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4964, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4964, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } __pyx_t_4 = __Pyx_PyList_GetItemRefFast(__pyx_t_1, __pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_2; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4964, __pyx_L1_error) #endif if (__pyx_t_2 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2)); #else __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_2); #endif ++__pyx_t_2; } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4964, __pyx_L1_error) } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 4964, __pyx_L1_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_4); if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { PyObject* sequence = __pyx_t_4; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4964, __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_INCREF(__pyx_t_5); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); __Pyx_INCREF(__pyx_t_7); } else { __pyx_t_5 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyList_GetItemRefFast(sequence, 2, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_7); } #else __pyx_t_5 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < (0)) __PYX_ERR(0, 4964, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4964, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fn); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fn, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_args); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_args, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_kwargs); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_kwargs, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":4963 * # registered errback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._errbacks * ) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_partial); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_response)) { __Pyx_RaiseClosureNameError("response"); __PYX_ERR(0, 4963, __pyx_L1_error) } __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fn); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_fn) != (0)) __PYX_ERR(0, 4963, __pyx_L1_error); __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_response); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_response); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_response) != (0)) __PYX_ERR(0, 4963, __pyx_L1_error); __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_cur_scope->__pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = PyNumber_Add(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_kwargs == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 4963, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_cur_scope->__pyx_v_kwargs))) { __pyx_t_6 = PyDict_Copy(__pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_6 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_cur_scope->__pyx_v_kwargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; __pyx_t_7 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); __Pyx_Coroutine_ResetAndClearException(__pyx_generator); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L8_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 4963, __pyx_L1_error) /* "cassandra/cluster.py":4964 * to_call = tuple( * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._errbacks # <<<<<<<<<<<<<< * ) * self._event.set() */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "cassandra/cluster.py":4963 * # registered errback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._errbacks * ) */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); if (__Pyx_PyErr_Occurred()) { __Pyx_Generator_Replace_StopIteration(0); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); } __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); #if !CYTHON_USE_EXC_INFO_STACK __Pyx_Coroutine_ResetAndClearException(__pyx_generator); #endif __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4951 * callback_partial() * * def _set_final_exception(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_38_set_final_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *__pyx_cur_scope; PyObject *__pyx_v_to_call = NULL; PyObject *__pyx_v_callback_partial = NULL; PyObject *__pyx_gb_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_2generator10 = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_t_4; 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; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; int __pyx_t_15; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_final_exception", 0); __pyx_cur_scope = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception(__pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 4951, __pyx_L1_error) } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } __pyx_cur_scope->__pyx_v_response = __pyx_v_response; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_response); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_response); /* "cassandra/cluster.py":4952 * * def _set_final_exception(self, response): * self._cancel_timer() # <<<<<<<<<<<<<< * if self._metrics is not None: * self._metrics.request_timer.addValue(time.time() - self._start_time) */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel_timer, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4952, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4953 * def _set_final_exception(self, response): * self._cancel_timer() * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.request_timer.addValue(time.time() - self._start_time) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "cassandra/cluster.py":4954 * self._cancel_timer() * if self._metrics is not None: * self._metrics.request_timer.addValue(time.time() - self._start_time) # <<<<<<<<<<<<<< * * with self._callback_lock: */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_request_timer); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_9, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_start_time_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = PyNumber_Subtract(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_addValue, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4953 * def _set_final_exception(self, response): * self._cancel_timer() * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.request_timer.addValue(time.time() - self._start_time) * */ } /* "cassandra/cluster.py":4956 * self._metrics.request_timer.addValue(time.time() - self._start_time) * * with self._callback_lock: # <<<<<<<<<<<<<< * self._final_exception = response * # save off current errbacks inside lock for execution outside it -- */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callback_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = NULL; __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4956, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_7); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4956, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); __Pyx_XGOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_t_12); __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { /* "cassandra/cluster.py":4957 * * with self._callback_lock: * self._final_exception = response # <<<<<<<<<<<<<< * # save off current errbacks inside lock for execution outside it -- * # prevents case where _final_exception is set, then an errback is */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception, __pyx_cur_scope->__pyx_v_response) < (0)) __PYX_ERR(0, 4957, __pyx_L8_error) /* "cassandra/cluster.py":4964 * to_call = tuple( * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._errbacks # <<<<<<<<<<<<<< * ) * self._event.set() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4964, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); /* "cassandra/cluster.py":4963 * # registered errback * to_call = tuple( * partial(fn, response, *args, **kwargs) # <<<<<<<<<<<<<< * for (fn, args, kwargs) in self._errbacks * ) */ __pyx_t_6 = __pyx_pf_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 4963, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4962 * # added and executed on the spot, then executed again as a * # registered errback * to_call = tuple( # <<<<<<<<<<<<<< * partial(fn, response, *args, **kwargs) * for (fn, args, kwargs) in self._errbacks */ __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4962, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_to_call = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4956 * self._metrics.request_timer.addValue(time.time() - self._start_time) * * with self._callback_lock: # <<<<<<<<<<<<<< * self._final_exception = response * # save off current errbacks inside lock for execution outside it -- */ } __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L13_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 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; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /*except:*/ { __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 4956, __pyx_L10_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_2); __pyx_t_7 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 4956, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4956, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_4 < (0)) __PYX_ERR(0, 4956, __pyx_L10_except_error) __pyx_t_15 = (!__pyx_t_4); if (unlikely(__pyx_t_15)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = 0; __PYX_ERR(0, 4956, __pyx_L10_except_error) } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L9_exception_handled; } __pyx_L10_except_error:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); goto __pyx_L1_error; __pyx_L9_exception_handled:; __Pyx_XGIVEREF(__pyx_t_11); __Pyx_XGIVEREF(__pyx_t_12); __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_L13_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_10) { __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 4956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } goto __pyx_L7; } __pyx_L7:; } goto __pyx_L17; __pyx_L4_error:; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":4966 * for (fn, args, kwargs) in self._errbacks * ) * self._event.set() # <<<<<<<<<<<<<< * * # apply each callback */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4966, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4969 * * # apply each callback * for callback_partial in to_call: # <<<<<<<<<<<<<< * callback_partial() * */ if (unlikely(!__pyx_v_to_call)) { __Pyx_RaiseUnboundLocalError("to_call"); __PYX_ERR(0, 4969, __pyx_L1_error) } __pyx_t_2 = __pyx_v_to_call; __Pyx_INCREF(__pyx_t_2); __pyx_t_16 = 0; for (;;) { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 4969, __pyx_L1_error) #endif if (__pyx_t_16 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_16)); #else __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_16); #endif ++__pyx_t_16; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_callback_partial, __pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4970 * # apply each callback * for callback_partial in to_call: * callback_partial() # <<<<<<<<<<<<<< * * def _handle_retry_decision(self, retry_decision, response, host): */ __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_callback_partial); __pyx_t_7 = __pyx_v_callback_partial; __pyx_t_3 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_3 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (__pyx_t_3*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4969 * * # apply each callback * for callback_partial in to_call: # <<<<<<<<<<<<<< * callback_partial() * */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4951 * callback_partial() * * def _set_final_exception(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ /* 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_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._set_final_exception", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_to_call); __Pyx_XDECREF(__pyx_v_callback_partial); __Pyx_XDECREF(__pyx_gb_9cassandra_7cluster_14ResponseFuture_20_set_final_exception_2generator10); __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4972 * callback_partial() * * def _handle_retry_decision(self, retry_decision, response, host): # <<<<<<<<<<<<<< * * def exception_from_response(response): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_41_handle_retry_decision(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_41_handle_retry_decision = {"_handle_retry_decision", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_41_handle_retry_decision, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_41_handle_retry_decision(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_retry_decision = 0; PyObject *__pyx_v_response = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_handle_retry_decision (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_retry_decision,&__pyx_mstate_global->__pyx_n_u_response,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4972, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4972, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4972, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4972, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4972, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_handle_retry_decision", 0) < (0)) __PYX_ERR(0, 4972, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_handle_retry_decision", 1, 4, 4, i); __PYX_ERR(0, 4972, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4972, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4972, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4972, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4972, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_retry_decision = values[1]; __pyx_v_response = values[2]; __pyx_v_host = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_handle_retry_decision", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 4972, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._handle_retry_decision", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_40_handle_retry_decision(__pyx_self, __pyx_v_self, __pyx_v_retry_decision, __pyx_v_response, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4974 * def _handle_retry_decision(self, retry_decision, response, host): * * def exception_from_response(response): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * return response.to_exception() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_1exception_from_response(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_1exception_from_response = {"exception_from_response", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_1exception_from_response, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_1exception_from_response(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exception_from_response (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4974, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4974, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "exception_from_response", 0) < (0)) __PYX_ERR(0, 4974, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("exception_from_response", 1, 1, 1, i); __PYX_ERR(0, 4974, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4974, __pyx_L3_error) } __pyx_v_response = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("exception_from_response", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 4974, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._handle_retry_decision.exception_from_response", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_exception_from_response(__pyx_self, __pyx_v_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_exception_from_response(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_response) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exception_from_response", 0); /* "cassandra/cluster.py":4975 * * def exception_from_response(response): * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * return response.to_exception() * else: */ __pyx_t_1 = __Pyx_HasAttr(__pyx_v_response, __pyx_mstate_global->__pyx_n_u_to_exception); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 4975, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":4976 * def exception_from_response(response): * if hasattr(response, 'to_exception'): * return response.to_exception() # <<<<<<<<<<<<<< * else: * return response */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_response; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_to_exception, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":4975 * * def exception_from_response(response): * if hasattr(response, 'to_exception'): # <<<<<<<<<<<<<< * return response.to_exception() * else: */ } /* "cassandra/cluster.py":4978 * return response.to_exception() * else: * return response # <<<<<<<<<<<<<< * * retry_type, consistency = retry_decision */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_response); __pyx_r = __pyx_v_response; goto __pyx_L0; } /* "cassandra/cluster.py":4974 * def _handle_retry_decision(self, retry_decision, response, host): * * def exception_from_response(response): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * return response.to_exception() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._handle_retry_decision.exception_from_response", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4972 * callback_partial() * * def _handle_retry_decision(self, retry_decision, response, host): # <<<<<<<<<<<<<< * * def exception_from_response(response): */ static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_40_handle_retry_decision(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_retry_decision, PyObject *__pyx_v_response, PyObject *__pyx_v_host) { PyObject *__pyx_v_exception_from_response = 0; PyObject *__pyx_v_retry_type = NULL; PyObject *__pyx_v_consistency = NULL; PyObject *__pyx_v_reuse = 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)(PyObject *); int __pyx_t_5; int __pyx_t_6; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_handle_retry_decision", 0); /* "cassandra/cluster.py":4974 * def _handle_retry_decision(self, retry_decision, response, host): * * def exception_from_response(response): # <<<<<<<<<<<<<< * if hasattr(response, 'to_exception'): * return response.to_exception() */ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_1exception_from_response, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__handle_retry_dec, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_exception_from_response = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4980 * return response * * retry_type, consistency = retry_decision # <<<<<<<<<<<<<< * if retry_type in (RetryPolicy.RETRY, RetryPolicy.RETRY_NEXT_HOST): * self._query_retries += 1 */ if ((likely(PyTuple_CheckExact(__pyx_v_retry_decision))) || (PyList_CheckExact(__pyx_v_retry_decision))) { PyObject* sequence = __pyx_v_retry_decision; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 4980, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_2); } else { __pyx_t_1 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); } #else __pyx_t_1 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_retry_decision); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4980, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < (0)) __PYX_ERR(0, 4980, __pyx_L1_error) __pyx_t_4 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L4_unpacking_done; __pyx_L3_unpacking_failed:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 4980, __pyx_L1_error) __pyx_L4_unpacking_done:; } __pyx_v_retry_type = __pyx_t_1; __pyx_t_1 = 0; __pyx_v_consistency = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":4981 * * retry_type, consistency = retry_decision * if retry_type in (RetryPolicy.RETRY, RetryPolicy.RETRY_NEXT_HOST): # <<<<<<<<<<<<<< * self._query_retries += 1 * reuse = retry_type == RetryPolicy.RETRY */ __Pyx_INCREF(__pyx_v_retry_type); __pyx_t_2 = __pyx_v_retry_type; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RETRY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RETRY_NEXT_HOST); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 4981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_6; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __pyx_t_5; if (__pyx_t_6) { /* "cassandra/cluster.py":4982 * retry_type, consistency = retry_decision * if retry_type in (RetryPolicy.RETRY, RetryPolicy.RETRY_NEXT_HOST): * self._query_retries += 1 # <<<<<<<<<<<<<< * reuse = retry_type == RetryPolicy.RETRY * self._retry(reuse, consistency, host) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyLong_AddObjC(__pyx_t_2, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4982, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_retries, __pyx_t_1) < (0)) __PYX_ERR(0, 4982, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4983 * if retry_type in (RetryPolicy.RETRY, RetryPolicy.RETRY_NEXT_HOST): * self._query_retries += 1 * reuse = retry_type == RetryPolicy.RETRY # <<<<<<<<<<<<<< * self._retry(reuse, consistency, host) * elif retry_type is RetryPolicy.RETHROW: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RETRY); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_RichCompare(__pyx_v_retry_type, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_reuse = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":4984 * self._query_retries += 1 * reuse = retry_type == RetryPolicy.RETRY * self._retry(reuse, consistency, host) # <<<<<<<<<<<<<< * elif retry_type is RetryPolicy.RETHROW: * self._set_final_exception(exception_from_response(response)) */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_reuse, __pyx_v_consistency, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_retry, __pyx_callargs+__pyx_t_7, (4-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4981 * * retry_type, consistency = retry_decision * if retry_type in (RetryPolicy.RETRY, RetryPolicy.RETRY_NEXT_HOST): # <<<<<<<<<<<<<< * self._query_retries += 1 * reuse = retry_type == RetryPolicy.RETRY */ goto __pyx_L5; } /* "cassandra/cluster.py":4985 * reuse = retry_type == RetryPolicy.RETRY * self._retry(reuse, consistency, host) * elif retry_type is RetryPolicy.RETHROW: # <<<<<<<<<<<<<< * self._set_final_exception(exception_from_response(response)) * else: # IGNORE */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_RETHROW); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4985, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_v_retry_type == __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { /* "cassandra/cluster.py":4986 * self._retry(reuse, consistency, host) * elif retry_type is RetryPolicy.RETHROW: * self._set_final_exception(exception_from_response(response)) # <<<<<<<<<<<<<< * else: # IGNORE * if self._metrics is not None: */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = __pyx_pf_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_exception_from_response(__pyx_v_exception_from_response, __pyx_v_response); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4985 * reuse = retry_type == RetryPolicy.RETRY * self._retry(reuse, consistency, host) * elif retry_type is RetryPolicy.RETHROW: # <<<<<<<<<<<<<< * self._set_final_exception(exception_from_response(response)) * else: # IGNORE */ goto __pyx_L5; } /* "cassandra/cluster.py":4988 * self._set_final_exception(exception_from_response(response)) * else: # IGNORE * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_ignore() * self._set_final_result(None) */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { /* "cassandra/cluster.py":4989 * else: # IGNORE * if self._metrics is not None: * self._metrics.on_ignore() # <<<<<<<<<<<<<< * self._set_final_result(None) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_ignore, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4989, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4988 * self._set_final_exception(exception_from_response(response)) * else: # IGNORE * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_ignore() * self._set_final_result(None) */ } /* "cassandra/cluster.py":4990 * if self._metrics is not None: * self._metrics.on_ignore() * self._set_final_result(None) # <<<<<<<<<<<<<< * * self._errors[host] = exception_from_response(response) */ __pyx_t_1 = __pyx_v_self; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, Py_None}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; /* "cassandra/cluster.py":4992 * self._set_final_result(None) * * self._errors[host] = exception_from_response(response) # <<<<<<<<<<<<<< * * def _retry(self, reuse_connection, consistency_level, host): */ __pyx_t_2 = __pyx_pf_9cassandra_7cluster_14ResponseFuture_22_handle_retry_decision_exception_from_response(__pyx_v_exception_from_response, __pyx_v_response); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errors_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4992, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_host, __pyx_t_2) < 0))) __PYX_ERR(0, 4992, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":4972 * callback_partial() * * def _handle_retry_decision(self, retry_decision, response, host): # <<<<<<<<<<<<<< * * def exception_from_response(response): */ /* 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("cassandra.cluster.ResponseFuture._handle_retry_decision", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exception_from_response); __Pyx_XDECREF(__pyx_v_retry_type); __Pyx_XDECREF(__pyx_v_consistency); __Pyx_XDECREF(__pyx_v_reuse); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":4994 * self._errors[host] = exception_from_response(response) * * def _retry(self, reuse_connection, consistency_level, host): # <<<<<<<<<<<<<< * if self._final_exception: * # the connection probably broke while we were waiting */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_43_retry(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_43_retry = {"_retry", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_43_retry, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_43_retry(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_reuse_connection = 0; PyObject *__pyx_v_consistency_level = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_retry (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_reuse_connection,&__pyx_mstate_global->__pyx_n_u_consistency_level,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 4994, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4994, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4994, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4994, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4994, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_retry", 0) < (0)) __PYX_ERR(0, 4994, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_retry", 1, 4, 4, i); __PYX_ERR(0, 4994, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 4994, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 4994, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 4994, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 4994, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_reuse_connection = values[1]; __pyx_v_consistency_level = values[2]; __pyx_v_host = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_retry", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 4994, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._retry", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_42_retry(__pyx_self, __pyx_v_self, __pyx_v_reuse_connection, __pyx_v_consistency_level, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_42_retry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reuse_connection, PyObject *__pyx_v_consistency_level, PyObject *__pyx_v_host) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_retry", 0); /* "cassandra/cluster.py":4995 * * def _retry(self, reuse_connection, consistency_level, host): * if self._final_exception: # <<<<<<<<<<<<<< * # the connection probably broke while we were waiting * # to retry the operation */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4995, __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(0, 4995, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":4998 * # the connection probably broke while we were waiting * # to retry the operation * return # <<<<<<<<<<<<<< * * if self._metrics is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":4995 * * def _retry(self, reuse_connection, consistency_level, host): * if self._final_exception: # <<<<<<<<<<<<<< * # the connection probably broke while we were waiting * # to retry the operation */ } /* "cassandra/cluster.py":5000 * return * * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_retry() * if consistency_level is not None: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5000, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5001 * * if self._metrics is not None: * self._metrics.on_retry() # <<<<<<<<<<<<<< * if consistency_level is not None: * self.message.consistency_level = consistency_level */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_metrics_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_on_retry, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 5001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5000 * return * * if self._metrics is not None: # <<<<<<<<<<<<<< * self._metrics.on_retry() * if consistency_level is not None: */ } /* "cassandra/cluster.py":5002 * if self._metrics is not None: * self._metrics.on_retry() * if consistency_level is not None: # <<<<<<<<<<<<<< * self.message.consistency_level = consistency_level * */ __pyx_t_2 = (__pyx_v_consistency_level != Py_None); if (__pyx_t_2) { /* "cassandra/cluster.py":5003 * self._metrics.on_retry() * if consistency_level is not None: * self.message.consistency_level = consistency_level # <<<<<<<<<<<<<< * * # don't retry on the event loop thread */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_v_consistency_level) < (0)) __PYX_ERR(0, 5003, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5002 * if self._metrics is not None: * self._metrics.on_retry() * if consistency_level is not None: # <<<<<<<<<<<<<< * self.message.consistency_level = consistency_level * */ } /* "cassandra/cluster.py":5006 * * # don't retry on the event loop thread * self.session.submit(self._retry_task, reuse_connection, host) # <<<<<<<<<<<<<< * * def _retry_task(self, reuse_connection, host): */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_retry_task); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_6, __pyx_v_reuse_connection, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_submit, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":4994 * self._errors[host] = exception_from_response(response) * * def _retry(self, reuse_connection, consistency_level, host): # <<<<<<<<<<<<<< * if self._final_exception: * # the connection probably broke while we were waiting */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._retry", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5008 * self.session.submit(self._retry_task, reuse_connection, host) * * def _retry_task(self, reuse_connection, host): # <<<<<<<<<<<<<< * if self._final_exception: * # the connection probably broke while we were waiting */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_45_retry_task(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_45_retry_task = {"_retry_task", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_45_retry_task, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_45_retry_task(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_reuse_connection = 0; PyObject *__pyx_v_host = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_retry_task (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_reuse_connection,&__pyx_mstate_global->__pyx_n_u_host,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5008, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5008, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5008, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5008, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_retry_task", 0) < (0)) __PYX_ERR(0, 5008, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_retry_task", 1, 3, 3, i); __PYX_ERR(0, 5008, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5008, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5008, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5008, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_reuse_connection = values[1]; __pyx_v_host = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_retry_task", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5008, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._retry_task", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_44_retry_task(__pyx_self, __pyx_v_self, __pyx_v_reuse_connection, __pyx_v_host); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_44_retry_task(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reuse_connection, PyObject *__pyx_v_host) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_retry_task", 0); /* "cassandra/cluster.py":5009 * * def _retry_task(self, reuse_connection, host): * if self._final_exception: # <<<<<<<<<<<<<< * # the connection probably broke while we were waiting * # to retry the operation */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5009, __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(0, 5009, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5012 * # the connection probably broke while we were waiting * # to retry the operation * return # <<<<<<<<<<<<<< * * if reuse_connection and self._query(host) is not None: */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":5009 * * def _retry_task(self, reuse_connection, host): * if self._final_exception: # <<<<<<<<<<<<<< * # the connection probably broke while we were waiting * # to retry the operation */ } /* "cassandra/cluster.py":5014 * return * * if reuse_connection and self._query(host) is not None: # <<<<<<<<<<<<<< * return * */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_reuse_connection); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5014, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_host}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_query_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_3 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { /* "cassandra/cluster.py":5015 * * if reuse_connection and self._query(host) is not None: * return # <<<<<<<<<<<<<< * * # otherwise, move onto another host */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":5014 * return * * if reuse_connection and self._query(host) is not None: # <<<<<<<<<<<<<< * return * */ } /* "cassandra/cluster.py":5018 * * # otherwise, move onto another host * self.send_request() # <<<<<<<<<<<<<< * * def result(self): */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_send_request, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5018, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5008 * self.session.submit(self._retry_task, reuse_connection, host) * * def _retry_task(self, reuse_connection, host): # <<<<<<<<<<<<<< * if self._final_exception: * # the connection probably broke while we were waiting */ /* 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_4); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._retry_task", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5020 * self.send_request() * * def result(self): # <<<<<<<<<<<<<< * """ * Return the final result or raise an Exception if errors were */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_47result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_46result, "\n Return the final result or raise an Exception if errors were\n encountered. If the final result or error has not been set\n yet, this method will block until it is set, or the timeout\n set for the request expires.\n\n Timeout is specified in the Session request execution functions.\n If the timeout is exceeded, an :exc:`cassandra.OperationTimedOut` will be raised.\n This is a client-side timeout. For more information\n about server-side coordinator timeouts, see :class:`.policies.RetryPolicy`.\n\n Example usage::\n\n >>> future = session.execute_async(\"SELECT * FROM mycf\")\n >>> # do other stuff...\n\n >>> try:\n ... rows = future.result()\n ... for row in rows:\n ... ... # process results\n ... except Exception:\n ... log.exception(\"Operation failed:\")\n\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_47result = {"result", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_47result, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_46result}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_47result(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("result (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5020, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5020, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "result", 0) < (0)) __PYX_ERR(0, 5020, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("result", 1, 1, 1, i); __PYX_ERR(0, 5020, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5020, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("result", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5020, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_46result(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_46result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("result", 0); /* "cassandra/cluster.py":5045 * * """ * self._event.wait() # <<<<<<<<<<<<<< * if self._final_result is not _NOT_SET: * return ResultSet(self, self._final_result) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_event_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_wait, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5046 * """ * self._event.wait() * if self._final_result is not _NOT_SET: # <<<<<<<<<<<<<< * return ResultSet(self, self._final_result) * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = (__pyx_t_1 != __pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_5)) { /* "cassandra/cluster.py":5047 * self._event.wait() * if self._final_result is not _NOT_SET: * return ResultSet(self, self._final_result) # <<<<<<<<<<<<<< * else: * raise self._final_exception */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ResultSet); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_self, __pyx_t_6}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_4, (3-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5046 * """ * self._event.wait() * if self._final_result is not _NOT_SET: # <<<<<<<<<<<<<< * return ResultSet(self, self._final_result) * else: */ } /* "cassandra/cluster.py":5049 * return ResultSet(self, self._final_result) * else: * raise self._final_exception # <<<<<<<<<<<<<< * * def get_query_trace_ids(self): */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5049, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 5049, __pyx_L1_error) } /* "cassandra/cluster.py":5020 * self.send_request() * * def result(self): # <<<<<<<<<<<<<< * """ * Return the final result or raise an Exception if errors were */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5051 * raise self._final_exception * * def get_query_trace_ids(self): # <<<<<<<<<<<<<< * """ * Returns the trace session ids for this future, if tracing was enabled (does not fetch trace data). */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_49get_query_trace_ids(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_48get_query_trace_ids, "\n Returns the trace session ids for this future, if tracing was enabled (does not fetch trace data).\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_49get_query_trace_ids = {"get_query_trace_ids", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_49get_query_trace_ids, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_48get_query_trace_ids}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_49get_query_trace_ids(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_query_trace_ids (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5051, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5051, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_query_trace_ids", 0) < (0)) __PYX_ERR(0, 5051, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_query_trace_ids", 1, 1, 1, i); __PYX_ERR(0, 5051, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5051, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_query_trace_ids", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5051, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.get_query_trace_ids", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_48get_query_trace_ids(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_48get_query_trace_ids(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_9genexpr24__pyx_v_trace = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_query_trace_ids", 0); /* "cassandra/cluster.py":5055 * Returns the trace session ids for this future, if tracing was enabled (does not fetch trace data). * """ * return [trace.trace_id for trace in self._query_traces] # <<<<<<<<<<<<<< * * def get_query_trace(self, max_wait=None, query_cl=ConsistencyLevel.LOCAL_ONE): */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5055, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5055, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5055, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5055, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { { Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5055, __pyx_L5_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } __pyx_t_2 = __Pyx_PyList_GetItemRefFast(__pyx_t_3, __pyx_t_4, __Pyx_ReferenceSharing_OwnStrongReference); ++__pyx_t_4; } else { { Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 5055, __pyx_L5_error) #endif if (__pyx_t_4 >= __pyx_temp) break; } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_2 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4)); #else __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); #endif ++__pyx_t_4; } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5055, __pyx_L5_error) } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 5055, __pyx_L5_error) PyErr_Clear(); } break; } } __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_trace, __pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr24__pyx_v_trace, __pyx_mstate_global->__pyx_n_u_trace_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5055, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 5055, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_trace); __pyx_9genexpr24__pyx_v_trace = 0; goto __pyx_L9_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_trace); __pyx_9genexpr24__pyx_v_trace = 0; goto __pyx_L1_error; __pyx_L9_exit_scope:; } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5051 * raise self._final_exception * * def get_query_trace_ids(self): # <<<<<<<<<<<<<< * """ * Returns the trace session ids for this future, if tracing was enabled (does not fetch trace data). */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.get_query_trace_ids", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_trace); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5057 * return [trace.trace_id for trace in self._query_traces] * * def get_query_trace(self, max_wait=None, query_cl=ConsistencyLevel.LOCAL_ONE): # <<<<<<<<<<<<<< * """ * Fetches and returns the query trace of the last response, or `None` if tracing was */ static PyObject *__pyx_pf_9cassandra_7cluster_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 5057, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 5057, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5057, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 5057, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_51get_query_trace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_50get_query_trace, "\n Fetches and returns the query trace of the last response, or `None` if tracing was\n not enabled.\n\n Note that this may raise an exception if there are problems retrieving the trace\n details from Cassandra. If the trace is not available after `max_wait`,\n :exc:`cassandra.query.TraceUnavailable` will be raised.\n\n If the ResponseFuture is not done (async execution) and you try to retrieve the trace,\n :exc:`cassandra.query.TraceUnavailable` will be raised.\n\n `query_cl` is the consistency level used to poll the trace tables.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_51get_query_trace = {"get_query_trace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_51get_query_trace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_50get_query_trace}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_51get_query_trace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_max_wait = 0; PyObject *__pyx_v_query_cl = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_query_trace (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_max_wait,&__pyx_mstate_global->__pyx_n_u_query_cl,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5057, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5057, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5057, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5057, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_query_trace", 0) < (0)) __PYX_ERR(0, 5057, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_query_trace", 0, 1, 3, i); __PYX_ERR(0, 5057, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5057, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5057, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5057, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0); } __pyx_v_self = values[0]; __pyx_v_max_wait = values[1]; __pyx_v_query_cl = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_query_trace", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 5057, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.get_query_trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_50get_query_trace(__pyx_self, __pyx_v_self, __pyx_v_max_wait, __pyx_v_query_cl); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_50get_query_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait, PyObject *__pyx_v_query_cl) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_query_trace", 0); /* "cassandra/cluster.py":5071 * `query_cl` is the consistency level used to poll the trace tables. * """ * if self._final_result is _NOT_SET and self._final_exception is None: # <<<<<<<<<<<<<< * raise TraceUnavailable( * "Trace information was not available. The ResponseFuture is not done.") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_2 == __pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __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; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { /* "cassandra/cluster.py":5072 * """ * if self._final_result is _NOT_SET and self._final_exception is None: * raise TraceUnavailable( # <<<<<<<<<<<<<< * "Trace information was not available. The ResponseFuture is not done.") * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_TraceUnavailable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_Trace_information_was_not_availa}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 5072, __pyx_L1_error) /* "cassandra/cluster.py":5071 * `query_cl` is the consistency level used to poll the trace tables. * """ * if self._final_result is _NOT_SET and self._final_exception is None: # <<<<<<<<<<<<<< * raise TraceUnavailable( * "Trace information was not available. The ResponseFuture is not done.") */ } /* "cassandra/cluster.py":5075 * "Trace information was not available. The ResponseFuture is not done.") * * if self._query_traces: # <<<<<<<<<<<<<< * return self._get_query_trace(len(self._query_traces) - 1, max_wait, query_cl) * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5075, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { /* "cassandra/cluster.py":5076 * * if self._query_traces: * return self._get_query_trace(len(self._query_traces) - 1, max_wait, query_cl) # <<<<<<<<<<<<<< * * def get_all_query_traces(self, max_wait_per=None, query_cl=ConsistencyLevel.LOCAL_ONE): */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __pyx_v_self; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyLong_FromSsize_t((__pyx_t_7 - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_t_2, __pyx_v_max_wait, __pyx_v_query_cl}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_query_trace, __pyx_callargs+__pyx_t_6, (4-__pyx_t_6) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5075 * "Trace information was not available. The ResponseFuture is not done.") * * if self._query_traces: # <<<<<<<<<<<<<< * return self._get_query_trace(len(self._query_traces) - 1, max_wait, query_cl) * */ } /* "cassandra/cluster.py":5057 * return [trace.trace_id for trace in self._query_traces] * * def get_query_trace(self, max_wait=None, query_cl=ConsistencyLevel.LOCAL_ONE): # <<<<<<<<<<<<<< * """ * Fetches and returns the query trace of the last response, or `None` if tracing was */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.get_query_trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5078 * return self._get_query_trace(len(self._query_traces) - 1, max_wait, query_cl) * * def get_all_query_traces(self, max_wait_per=None, query_cl=ConsistencyLevel.LOCAL_ONE): # <<<<<<<<<<<<<< * """ * Fetches and returns the query traces for all query pages, if tracing was enabled. */ static PyObject *__pyx_pf_9cassandra_7cluster_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_None) != (0)) __PYX_ERR(0, 5078, __pyx_L1_error); __Pyx_INCREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) != (0)) __PYX_ERR(0, 5078, __pyx_L1_error); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 5078, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None) != (0)) __PYX_ERR(0, 5078, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_53get_all_query_traces(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_52get_all_query_traces, "\n Fetches and returns the query traces for all query pages, if tracing was enabled.\n\n See note in :meth:`~.get_query_trace` regarding possible exceptions.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_53get_all_query_traces = {"get_all_query_traces", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_53get_all_query_traces, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_52get_all_query_traces}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_53get_all_query_traces(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_max_wait_per = 0; PyObject *__pyx_v_query_cl = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_all_query_traces (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_max_wait_per,&__pyx_mstate_global->__pyx_n_u_query_cl,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5078, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5078, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5078, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5078, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_all_query_traces", 0) < (0)) __PYX_ERR(0, 5078, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_all_query_traces", 0, 1, 3, i); __PYX_ERR(0, 5078, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5078, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5078, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5078, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[2]) values[2] = __Pyx_NewRef(__pyx_dynamic_args->arg0); } __pyx_v_self = values[0]; __pyx_v_max_wait_per = values[1]; __pyx_v_query_cl = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_all_query_traces", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 5078, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.get_all_query_traces", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_52get_all_query_traces(__pyx_self, __pyx_v_self, __pyx_v_max_wait_per, __pyx_v_query_cl); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_52get_all_query_traces(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait_per, PyObject *__pyx_v_query_cl) { Py_ssize_t __pyx_9genexpr25__pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_all_query_traces", 0); /* "cassandra/cluster.py":5084 * See note in :meth:`~.get_query_trace` regarding possible exceptions. * """ * if self._query_traces: # <<<<<<<<<<<<<< * return [self._get_query_trace(i, max_wait_per, query_cl) for i in range(len(self._query_traces))] * return [] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5084, __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(0, 5084, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5085 * """ * if self._query_traces: * return [self._get_query_trace(i, max_wait_per, query_cl) for i in range(len(self._query_traces))] # <<<<<<<<<<<<<< * return [] * */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_9genexpr25__pyx_v_i = __pyx_t_6; __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = PyLong_FromSsize_t(__pyx_9genexpr25__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = 0; { PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_t_8, __pyx_v_max_wait_per, __pyx_v_query_cl}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_query_trace, __pyx_callargs+__pyx_t_9, (4-__pyx_t_9) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 5085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } /* exit inner scope */ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5084 * See note in :meth:`~.get_query_trace` regarding possible exceptions. * """ * if self._query_traces: # <<<<<<<<<<<<<< * return [self._get_query_trace(i, max_wait_per, query_cl) for i in range(len(self._query_traces))] * return [] */ } /* "cassandra/cluster.py":5086 * if self._query_traces: * return [self._get_query_trace(i, max_wait_per, query_cl) for i in range(len(self._query_traces))] * return [] # <<<<<<<<<<<<<< * * def _get_query_trace(self, i, max_wait, query_cl): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5078 * return self._get_query_trace(len(self._query_traces) - 1, max_wait, query_cl) * * def get_all_query_traces(self, max_wait_per=None, query_cl=ConsistencyLevel.LOCAL_ONE): # <<<<<<<<<<<<<< * """ * Fetches and returns the query traces for all query pages, if tracing was enabled. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.get_all_query_traces", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5088 * return [] * * def _get_query_trace(self, i, max_wait, query_cl): # <<<<<<<<<<<<<< * trace = self._query_traces[i] * if not trace.events: */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_55_get_query_trace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_55_get_query_trace = {"_get_query_trace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_55_get_query_trace, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_55_get_query_trace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_i = 0; PyObject *__pyx_v_max_wait = 0; PyObject *__pyx_v_query_cl = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_get_query_trace (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_i,&__pyx_mstate_global->__pyx_n_u_max_wait,&__pyx_mstate_global->__pyx_n_u_query_cl,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5088, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5088, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5088, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5088, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5088, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_get_query_trace", 0) < (0)) __PYX_ERR(0, 5088, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_get_query_trace", 1, 4, 4, i); __PYX_ERR(0, 5088, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5088, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5088, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5088, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5088, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_i = values[1]; __pyx_v_max_wait = values[2]; __pyx_v_query_cl = values[3]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_get_query_trace", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 5088, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._get_query_trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_54_get_query_trace(__pyx_self, __pyx_v_self, __pyx_v_i, __pyx_v_max_wait, __pyx_v_query_cl); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_54_get_query_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_max_wait, PyObject *__pyx_v_query_cl) { PyObject *__pyx_v_trace = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_query_trace", 0); /* "cassandra/cluster.py":5089 * * def _get_query_trace(self, i, max_wait, query_cl): * trace = self._query_traces[i] # <<<<<<<<<<<<<< * if not trace.events: * trace.populate(max_wait=max_wait, query_cl=query_cl) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query_traces); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5089, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_trace = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":5090 * def _get_query_trace(self, i, max_wait, query_cl): * trace = self._query_traces[i] * if not trace.events: # <<<<<<<<<<<<<< * trace.populate(max_wait=max_wait, query_cl=query_cl) * return trace */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_trace, __pyx_mstate_global->__pyx_n_u_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (!__pyx_t_3); if (__pyx_t_4) { /* "cassandra/cluster.py":5091 * trace = self._query_traces[i] * if not trace.events: * trace.populate(max_wait=max_wait, query_cl=query_cl) # <<<<<<<<<<<<<< * return trace * */ __pyx_t_1 = __pyx_v_trace; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 2 : 0)] = {__pyx_t_1, NULL}; __pyx_t_6 = __Pyx_MakeVectorcallBuilderKwds(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_max_wait, __pyx_v_max_wait, __pyx_t_6, __pyx_callargs+1, 0) < (0)) __PYX_ERR(0, 5091, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_query_cl, __pyx_v_query_cl, __pyx_t_6, __pyx_callargs+1, 1) < (0)) __PYX_ERR(0, 5091, __pyx_L1_error) __pyx_t_2 = __Pyx_Object_VectorcallMethod_CallFromBuilder((PyObject*)__pyx_mstate_global->__pyx_n_u_populate, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_6); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5091, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":5090 * def _get_query_trace(self, i, max_wait, query_cl): * trace = self._query_traces[i] * if not trace.events: # <<<<<<<<<<<<<< * trace.populate(max_wait=max_wait, query_cl=query_cl) * return trace */ } /* "cassandra/cluster.py":5092 * if not trace.events: * trace.populate(max_wait=max_wait, query_cl=query_cl) * return trace # <<<<<<<<<<<<<< * * def add_callback(self, fn, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_trace); __pyx_r = __pyx_v_trace; goto __pyx_L0; /* "cassandra/cluster.py":5088 * return [] * * def _get_query_trace(self, i, max_wait, query_cl): # <<<<<<<<<<<<<< * trace = self._query_traces[i] * if not trace.events: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture._get_query_trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_trace); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5094 * return trace * * def add_callback(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Attaches a callback function to be called when the final results arrive. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_57add_callback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_56add_callback, "\n Attaches a callback function to be called when the final results arrive.\n\n By default, `fn` will be called with the results as the first and only\n argument. If `*args` or `**kwargs` are supplied, they will be passed\n through as additional positional or keyword arguments to `fn`.\n\n If an error is hit while executing the operation, a callback attached\n here will not be called. Use :meth:`.add_errback()` or :meth:`add_callbacks()`\n if you wish to handle that case.\n\n If the final result has already been seen when this method is called,\n the callback will be called immediately (before this method returns).\n\n Note: in the case that the result is not available when the callback is added,\n the callback is executed by IO event thread. This means that the callback\n should not block or attempt further synchronous requests, because no further\n IO will be processed until the callback returns.\n\n **Important**: if the callback you attach results in an exception being\n raised, **the exception will be ignored**, so please ensure your\n callback handles all error cases that you care about.\n\n Usage example::\n\n >>> session = cluster.connect(\"mykeyspace\")\n\n >>> def handle_results(rows, start_time, should_log=False):\n ... if should_log:\n ... log.info(\"Total time: %f\", time.time() - start_time)\n ... ...\n\n >>> future = session.execute_async(\"SELECT * FROM users\")\n >>> future.add_callback(handle_results, time.time(), should_log=True)\n\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_57add_callback = {"add_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_57add_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_56add_callback}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_57add_callback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_callback (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5094, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5094, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5094, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "add_callback", 1) < (0)) __PYX_ERR(0, 5094, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_callback", 0, 2, 2, i); __PYX_ERR(0, 5094, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5094, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5094, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_fn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_callback", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 5094, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.add_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_56add_callback(__pyx_self, __pyx_v_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_56add_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_v_run_now; 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; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_callback", 0); /* "cassandra/cluster.py":5131 * * """ * run_now = False # <<<<<<<<<<<<<< * with self._callback_lock: * # Always add fn to self._callbacks, even when we're about to */ __pyx_v_run_now = 0; /* "cassandra/cluster.py":5132 * """ * run_now = False * with self._callback_lock: # <<<<<<<<<<<<<< * # Always add fn to self._callbacks, even when we're about to * # execute it, to prevent races with functions like */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callback_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5132, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5132, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":5136 * # execute it, to prevent races with functions like * # start_fetching_next_page that reset _final_result * self._callbacks.append((fn, args, kwargs)) # <<<<<<<<<<<<<< * if self._final_result is not _NOT_SET: * run_now = True */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5136, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5136, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 5136, __pyx_L7_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args) != (0)) __PYX_ERR(0, 5136, __pyx_L7_error); __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_kwargs) != (0)) __PYX_ERR(0, 5136, __pyx_L7_error); __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 5136, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":5137 * # start_fetching_next_page that reset _final_result * self._callbacks.append((fn, args, kwargs)) * if self._final_result is not _NOT_SET: # <<<<<<<<<<<<<< * run_now = True * if run_now: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5137, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5137, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = (__pyx_t_3 != __pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_11) { /* "cassandra/cluster.py":5138 * self._callbacks.append((fn, args, kwargs)) * if self._final_result is not _NOT_SET: * run_now = True # <<<<<<<<<<<<<< * if run_now: * fn(self._final_result, *args, **kwargs) */ __pyx_v_run_now = 1; /* "cassandra/cluster.py":5137 * # start_fetching_next_page that reset _final_result * self._callbacks.append((fn, args, kwargs)) * if self._final_result is not _NOT_SET: # <<<<<<<<<<<<<< * run_now = True * if run_now: */ } /* "cassandra/cluster.py":5132 * """ * run_now = False * with self._callback_lock: # <<<<<<<<<<<<<< * # Always add fn to self._callbacks, even when we're about to * # execute it, to prevent races with functions like */ } __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_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("cassandra.cluster.ResponseFuture.add_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 5132, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5132, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5132, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 5132, __pyx_L9_except_error) __pyx_t_13 = (!__pyx_t_11); if (unlikely(__pyx_t_13)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 5132, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L17; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":5139 * if self._final_result is not _NOT_SET: * run_now = True * if run_now: # <<<<<<<<<<<<<< * fn(self._final_result, *args, **kwargs) * return self */ if (__pyx_v_run_now) { /* "cassandra/cluster.py":5140 * run_now = True * if run_now: * fn(self._final_result, *args, **kwargs) # <<<<<<<<<<<<<< * return self * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 5140, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_fn, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5139 * if self._final_result is not _NOT_SET: * run_now = True * if run_now: # <<<<<<<<<<<<<< * fn(self._final_result, *args, **kwargs) * return self */ } /* "cassandra/cluster.py":5141 * if run_now: * fn(self._final_result, *args, **kwargs) * return self # <<<<<<<<<<<<<< * * def add_errback(self, fn, *args, **kwargs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; /* "cassandra/cluster.py":5094 * return trace * * def add_callback(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Attaches a callback function to be called when the final results arrive. */ /* function exit code */ __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("cassandra.cluster.ResponseFuture.add_callback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5143 * return self * * def add_errback(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Like :meth:`.add_callback()`, but handles error cases. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_59add_errback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_58add_errback, "\n Like :meth:`.add_callback()`, but handles error cases.\n An Exception instance will be passed as the first positional argument\n to `fn`.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_59add_errback = {"add_errback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_59add_errback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_58add_errback}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_59add_errback(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_fn = 0; PyObject *__pyx_v_args = 0; PyObject *__pyx_v_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_errback (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 2, __pyx_nargs); if (unlikely(!__pyx_v_args)) { __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_fn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5143, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5143, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5143, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; } const Py_ssize_t kwd_pos_args = __pyx_nargs; const Py_ssize_t used_pos_args = (kwd_pos_args < 2) ? kwd_pos_args : 2; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, __pyx_kwds_len, "add_errback", 1) < (0)) __PYX_ERR(0, 5143, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_errback", 0, 2, 2, i); __PYX_ERR(0, 5143, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs < 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5143, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5143, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_fn = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_errback", 0, 2, 2, __pyx_nargs); __PYX_ERR(0, 5143, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.add_errback", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_58add_errback(__pyx_self, __pyx_v_self, __pyx_v_fn, __pyx_v_args, __pyx_v_kwargs); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_DECREF(__pyx_v_args); __Pyx_DECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_58add_errback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fn, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { int __pyx_v_run_now; 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; size_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; int __pyx_t_13; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_errback", 0); /* "cassandra/cluster.py":5149 * to `fn`. * """ * run_now = False # <<<<<<<<<<<<<< * with self._callback_lock: * # Always add fn to self._errbacks, even when we're about to execute */ __pyx_v_run_now = 0; /* "cassandra/cluster.py":5150 * """ * run_now = False * with self._callback_lock: # <<<<<<<<<<<<<< * # Always add fn to self._errbacks, even when we're about to execute * # it, to prevent races with functions like start_fetching_next_page */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callback_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5150, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5150, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":5154 * # it, to prevent races with functions like start_fetching_next_page * # that reset _final_exception * self._errbacks.append((fn, args, kwargs)) # <<<<<<<<<<<<<< * if self._final_exception: * run_now = True */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errbacks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5154, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5154, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_fn); __Pyx_GIVEREF(__pyx_v_fn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_fn) != (0)) __PYX_ERR(0, 5154, __pyx_L7_error); __Pyx_INCREF(__pyx_v_args); __Pyx_GIVEREF(__pyx_v_args); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_args) != (0)) __PYX_ERR(0, 5154, __pyx_L7_error); __Pyx_INCREF(__pyx_v_kwargs); __Pyx_GIVEREF(__pyx_v_kwargs); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_kwargs) != (0)) __PYX_ERR(0, 5154, __pyx_L7_error); __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 5154, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":5155 * # that reset _final_exception * self._errbacks.append((fn, args, kwargs)) * if self._final_exception: # <<<<<<<<<<<<<< * run_now = True * if run_now: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5155, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 5155, __pyx_L7_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_11) { /* "cassandra/cluster.py":5156 * self._errbacks.append((fn, args, kwargs)) * if self._final_exception: * run_now = True # <<<<<<<<<<<<<< * if run_now: * fn(self._final_exception, *args, **kwargs) */ __pyx_v_run_now = 1; /* "cassandra/cluster.py":5155 * # that reset _final_exception * self._errbacks.append((fn, args, kwargs)) * if self._final_exception: # <<<<<<<<<<<<<< * run_now = True * if run_now: */ } /* "cassandra/cluster.py":5150 * """ * run_now = False * with self._callback_lock: # <<<<<<<<<<<<<< * # Always add fn to self._errbacks, even when we're about to execute * # it, to prevent races with functions like start_fetching_next_page */ } __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_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("cassandra.cluster.ResponseFuture.add_errback", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 5150, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5150, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 5150, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 5150, __pyx_L9_except_error) __pyx_t_13 = (!__pyx_t_11); if (unlikely(__pyx_t_13)) { __Pyx_GIVEREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 5150, __pyx_L9_except_error) } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } goto __pyx_L6; } __pyx_L6:; } goto __pyx_L17; __pyx_L3_error:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L1_error; __pyx_L17:; } /* "cassandra/cluster.py":5157 * if self._final_exception: * run_now = True * if run_now: # <<<<<<<<<<<<<< * fn(self._final_exception, *args, **kwargs) * return self */ if (__pyx_v_run_now) { /* "cassandra/cluster.py":5158 * run_now = True * if run_now: * fn(self._final_exception, *args, **kwargs) # <<<<<<<<<<<<<< * return self * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5) != (0)) __PYX_ERR(0, 5158, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_fn, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":5157 * if self._final_exception: * run_now = True * if run_now: # <<<<<<<<<<<<<< * fn(self._final_exception, *args, **kwargs) * return self */ } /* "cassandra/cluster.py":5159 * if run_now: * fn(self._final_exception, *args, **kwargs) * return self # <<<<<<<<<<<<<< * * def add_callbacks(self, callback, errback, */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; /* "cassandra/cluster.py":5143 * return self * * def add_errback(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Like :meth:`.add_callback()`, but handles error cases. */ /* function exit code */ __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("cassandra.cluster.ResponseFuture.add_errback", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5161 * return self * * def add_callbacks(self, callback, errback, # <<<<<<<<<<<<<< * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_61add_callbacks(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_14ResponseFuture_60add_callbacks, "\n A convenient combination of :meth:`.add_callback()` and\n :meth:`.add_errback()`.\n\n Example usage::\n\n >>> session = cluster.connect()\n >>> query = \"SELECT * FROM mycf\"\n >>> future = session.execute_async(query)\n\n >>> def log_results(results, level='debug'):\n ... for row in results:\n ... log.log(level, \"Result: %s\", row)\n\n >>> def log_error(exc, query):\n ... log.error(\"Query '%s' failed: %s\", query, exc)\n\n >>> future.add_callbacks(\n ... callback=log_results, callback_kwargs={'level': 'info'},\n ... errback=log_error, errback_args=(query,))\n\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_61add_callbacks = {"add_callbacks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_61add_callbacks, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_14ResponseFuture_60add_callbacks}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_61add_callbacks(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_callback = 0; PyObject *__pyx_v_errback = 0; PyObject *__pyx_v_callback_args = 0; PyObject *__pyx_v_callback_kwargs = 0; PyObject *__pyx_v_errback_args = 0; PyObject *__pyx_v_errback_kwargs = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[7] = {0,0,0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_callbacks (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_callback,&__pyx_mstate_global->__pyx_n_u_errback,&__pyx_mstate_global->__pyx_n_u_callback_args,&__pyx_mstate_global->__pyx_n_u_callback_kwargs,&__pyx_mstate_global->__pyx_n_u_errback_args,&__pyx_mstate_global->__pyx_n_u_errback_kwargs,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5161, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "add_callbacks", 0) < (0)) __PYX_ERR(0, 5161, __pyx_L3_error) /* "cassandra/cluster.py":5162 * * def add_callbacks(self, callback, errback, * callback_args=(), callback_kwargs=None, # <<<<<<<<<<<<<< * errback_args=(), errback_kwargs=None): * """ */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_empty_tuple))); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); /* "cassandra/cluster.py":5163 * def add_callbacks(self, callback, errback, * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): # <<<<<<<<<<<<<< * """ * A convenient combination of :meth:`.add_callback()` and */ if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_empty_tuple))); if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("add_callbacks", 0, 3, 7, i); __PYX_ERR(0, 5161, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 7: values[6] = __Pyx_ArgRef_FASTCALL(__pyx_args, 6); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[6])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 6: values[5] = __Pyx_ArgRef_FASTCALL(__pyx_args, 5); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[5])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 5161, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5161, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5161, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5161, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_empty_tuple))); /* "cassandra/cluster.py":5162 * * def add_callbacks(self, callback, errback, * callback_args=(), callback_kwargs=None, # <<<<<<<<<<<<<< * errback_args=(), errback_kwargs=None): * """ */ if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[5]) values[5] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_empty_tuple))); /* "cassandra/cluster.py":5163 * def add_callbacks(self, callback, errback, * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): # <<<<<<<<<<<<<< * """ * A convenient combination of :meth:`.add_callback()` and */ if (!values[6]) values[6] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_callback = values[1]; __pyx_v_errback = values[2]; __pyx_v_callback_args = values[3]; __pyx_v_callback_kwargs = values[4]; __pyx_v_errback_args = values[5]; __pyx_v_errback_kwargs = values[6]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("add_callbacks", 0, 3, 7, __pyx_nargs); __PYX_ERR(0, 5161, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.add_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_60add_callbacks(__pyx_self, __pyx_v_self, __pyx_v_callback, __pyx_v_errback, __pyx_v_callback_args, __pyx_v_callback_kwargs, __pyx_v_errback_args, __pyx_v_errback_kwargs); /* "cassandra/cluster.py":5161 * return self * * def add_callbacks(self, callback, errback, # <<<<<<<<<<<<<< * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_60add_callbacks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_callback, PyObject *__pyx_v_errback, PyObject *__pyx_v_callback_args, PyObject *__pyx_v_callback_kwargs, PyObject *__pyx_v_errback_args, PyObject *__pyx_v_errback_kwargs) { 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_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_callbacks", 0); /* "cassandra/cluster.py":5186 * * """ * self.add_callback(callback, *callback_args, **(callback_kwargs or {})) # <<<<<<<<<<<<<< * self.add_errback(errback, *errback_args, **(errback_kwargs or {})) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_add_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_callback); __Pyx_GIVEREF(__pyx_v_callback); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_callback) != (0)) __PYX_ERR(0, 5186, __pyx_L1_error); __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_callback_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5186, __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; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_callback_kwargs); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 5186, __pyx_L1_error) if (!__pyx_t_5) { } else { __Pyx_INCREF(__pyx_v_callback_kwargs); __pyx_t_2 = __pyx_v_callback_kwargs; goto __pyx_L3_bool_binop_done; } __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_6); __pyx_t_2 = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_L3_bool_binop_done:; if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 5186, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_2))) { #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_IS_UNIQUELY_REFERENCED(__pyx_t_2, __Pyx_ReferenceSharing_OwnStrongReference)) { __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; } else #endif { __pyx_t_3 = PyDict_Copy(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } else { __pyx_t_3 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5186, __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_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __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(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":5187 * """ * self.add_callback(callback, *callback_args, **(callback_kwargs or {})) * self.add_errback(errback, *errback_args, **(errback_kwargs or {})) # <<<<<<<<<<<<<< * * def clear_callbacks(self): */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_add_errback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_errback); __Pyx_GIVEREF(__pyx_v_errback); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_errback) != (0)) __PYX_ERR(0, 5187, __pyx_L1_error); __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_errback_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_errback_kwargs); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 5187, __pyx_L1_error) if (!__pyx_t_5) { } else { __Pyx_INCREF(__pyx_v_errback_kwargs); __pyx_t_3 = __pyx_v_errback_kwargs; goto __pyx_L5_bool_binop_done; } __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_3 == Py_None)) { PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); __PYX_ERR(0, 5187, __pyx_L1_error) } if (likely(PyDict_CheckExact(__pyx_t_3))) { #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_IS_UNIQUELY_REFERENCED(__pyx_t_3, __Pyx_ReferenceSharing_OwnStrongReference)) { __pyx_t_4 = __pyx_t_3; __pyx_t_3 = 0; } else #endif { __pyx_t_4 = PyDict_Copy(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } else { __pyx_t_4 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __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; /* "cassandra/cluster.py":5161 * return self * * def add_callbacks(self, callback, errback, # <<<<<<<<<<<<<< * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.add_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5189 * self.add_errback(errback, *errback_args, **(errback_kwargs or {})) * * def clear_callbacks(self): # <<<<<<<<<<<<<< * with self._callback_lock: * self._callbacks = [] */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_63clear_callbacks(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_63clear_callbacks = {"clear_callbacks", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_63clear_callbacks, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_63clear_callbacks(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear_callbacks (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5189, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5189, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "clear_callbacks", 0) < (0)) __PYX_ERR(0, 5189, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("clear_callbacks", 1, 1, 1, i); __PYX_ERR(0, 5189, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5189, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("clear_callbacks", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5189, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.clear_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_62clear_callbacks(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_62clear_callbacks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; size_t __pyx_t_6; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clear_callbacks", 0); /* "cassandra/cluster.py":5190 * * def clear_callbacks(self): * with self._callback_lock: # <<<<<<<<<<<<<< * self._callbacks = [] * self._errbacks = [] */ /*with:*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callback_lock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_exit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5190, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (1-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5190, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_3); } __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_7, &__pyx_t_8, &__pyx_t_9); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { /* "cassandra/cluster.py":5191 * def clear_callbacks(self): * with self._callback_lock: * self._callbacks = [] # <<<<<<<<<<<<<< * self._errbacks = [] * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5191, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_callbacks, __pyx_t_1) < (0)) __PYX_ERR(0, 5191, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5192 * with self._callback_lock: * self._callbacks = [] * self._errbacks = [] # <<<<<<<<<<<<<< * * def __str__(self): */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5192, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_errbacks, __pyx_t_1) < (0)) __PYX_ERR(0, 5192, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5190 * * def clear_callbacks(self): * with self._callback_lock: # <<<<<<<<<<<<<< * self._callbacks = [] * self._errbacks = [] */ } __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_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("cassandra.cluster.ResponseFuture.clear_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 5190, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __pyx_t_4 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5190, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5190, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_10); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_11 < (0)) __PYX_ERR(0, 5190, __pyx_L9_except_error) __pyx_t_12 = (!__pyx_t_11); if (unlikely(__pyx_t_12)) { __Pyx_GIVEREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_5); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; __PYX_ERR(0, 5190, __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_5); __pyx_t_5 = 0; goto __pyx_L8_exception_handled; } __pyx_L9_except_error:; __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_L1_error; __pyx_L8_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_L12_try_end:; } } /*finally:*/ { /*normal exit:*/{ if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1], NULL); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 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:; } /* "cassandra/cluster.py":5189 * self.add_errback(errback, *errback_args, **(errback_kwargs or {})) * * def clear_callbacks(self): # <<<<<<<<<<<<<< * with self._callback_lock: * self._callbacks = [] */ /* 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("cassandra.cluster.ResponseFuture.clear_callbacks", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5194 * self._errbacks = [] * * def __str__(self): # <<<<<<<<<<<<<< * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result * return "" \ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_65__str__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_14ResponseFuture_65__str__ = {"__str__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_14ResponseFuture_65__str__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_14ResponseFuture_65__str__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5194, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5194, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__str__", 0) < (0)) __PYX_ERR(0, 5194, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, i); __PYX_ERR(0, 5194, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5194, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__str__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5194, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_14ResponseFuture_64__str__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_14ResponseFuture_64__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = 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; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8[11]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "cassandra/cluster.py":5195 * * def __str__(self): * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result # <<<<<<<<<<<<<< * return "" \ * % (self.query, self._req_id, result, self._final_exception, self.coordinator_host) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = (__pyx_t_2 == __pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_no_result_yet); __pyx_t_1 = __pyx_mstate_global->__pyx_kp_u_no_result_yet; } else { __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":5196 * def __str__(self): * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result * return "" \ # <<<<<<<<<<<<<< * % (self.query, self._req_id, result, self._final_exception, self.coordinator_host) * __repr__ = __str__ */ __Pyx_XDECREF(__pyx_r); /* "cassandra/cluster.py":5197 * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result * return "" \ * % (self.query, self._req_id, result, self._final_exception, self.coordinator_host) # <<<<<<<<<<<<<< * __repr__ = __str__ * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_req_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_1), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_v_result), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_final_exception); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_coordinator_host); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8[0] = __pyx_mstate_global->__pyx_kp_u_ResponseFuture_query; __pyx_t_8[1] = __pyx_t_3; __pyx_t_8[2] = __pyx_mstate_global->__pyx_kp_u_request_id; __pyx_t_8[3] = __pyx_t_2; __pyx_t_8[4] = __pyx_mstate_global->__pyx_kp_u_result_2; __pyx_t_8[5] = __pyx_t_1; __pyx_t_8[6] = __pyx_mstate_global->__pyx_kp_u_exception_2; __pyx_t_8[7] = __pyx_t_6; __pyx_t_8[8] = __pyx_mstate_global->__pyx_kp_u_coordinator_host_2; __pyx_t_8[9] = __pyx_t_7; __pyx_t_8[10] = __pyx_mstate_global->__pyx_kp_u__10; /* "cassandra/cluster.py":5196 * def __str__(self): * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result * return "" \ # <<<<<<<<<<<<<< * % (self.query, self._req_id, result, self._final_exception, self.coordinator_host) * __repr__ = __str__ */ __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_8, 11, 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 13 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 8 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 11 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 1, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __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; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5194 * self._errbacks = [] * * def __str__(self): # <<<<<<<<<<<<<< * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result * return "" \ */ /* 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_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cassandra.cluster.ResponseFuture.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5233 * """ * * def __init__(self, response_future, initial_response): # <<<<<<<<<<<<<< * self.response_future = response_future * self.column_names = response_future._col_names */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_1__init__ = {"__init__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_1__init__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_response_future = 0; PyObject *__pyx_v_initial_response = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_response_future,&__pyx_mstate_global->__pyx_n_u_initial_response,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5233, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5233, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5233, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5233, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(0, 5233, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, i); __PYX_ERR(0, 5233, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5233, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5233, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 5233, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_response_future = values[1]; __pyx_v_initial_response = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 5233, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet___init__(__pyx_self, __pyx_v_self, __pyx_v_response_future, __pyx_v_initial_response); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_response_future, PyObject *__pyx_v_initial_response) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cassandra/cluster.py":5234 * * def __init__(self, response_future, initial_response): * self.response_future = response_future # <<<<<<<<<<<<<< * self.column_names = response_future._col_names * self.column_types = response_future._col_types */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future, __pyx_v_response_future) < (0)) __PYX_ERR(0, 5234, __pyx_L1_error) /* "cassandra/cluster.py":5235 * def __init__(self, response_future, initial_response): * self.response_future = response_future * self.column_names = response_future._col_names # <<<<<<<<<<<<<< * self.column_types = response_future._col_types * self._set_current_rows(initial_response) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_response_future, __pyx_mstate_global->__pyx_n_u_col_names); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_t_1) < (0)) __PYX_ERR(0, 5235, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5236 * self.response_future = response_future * self.column_names = response_future._col_names * self.column_types = response_future._col_types # <<<<<<<<<<<<<< * self._set_current_rows(initial_response) * self._page_iter = None */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_response_future, __pyx_mstate_global->__pyx_n_u_col_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_column_types, __pyx_t_1) < (0)) __PYX_ERR(0, 5236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5237 * self.column_names = response_future._col_names * self.column_types = response_future._col_types * self._set_current_rows(initial_response) # <<<<<<<<<<<<<< * self._page_iter = None * self._list_mode = False */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_initial_response}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_set_current_rows, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5238 * self.column_types = response_future._col_types * self._set_current_rows(initial_response) * self._page_iter = None # <<<<<<<<<<<<<< * self._list_mode = False * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter, Py_None) < (0)) __PYX_ERR(0, 5238, __pyx_L1_error) /* "cassandra/cluster.py":5239 * self._set_current_rows(initial_response) * self._page_iter = None * self._list_mode = False # <<<<<<<<<<<<<< * * @property */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_list_mode, Py_False) < (0)) __PYX_ERR(0, 5239, __pyx_L1_error) /* "cassandra/cluster.py":5233 * """ * * def __init__(self, response_future, initial_response): # <<<<<<<<<<<<<< * self.response_future = response_future * self.column_names = response_future._col_names */ /* 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_AddTraceback("cassandra.cluster.ResultSet.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5241 * self._list_mode = False * * @property # <<<<<<<<<<<<<< * def has_more_pages(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_3has_more_pages(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_2has_more_pages, "\n True if the last response indicated more pages; False otherwise\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_3has_more_pages = {"has_more_pages", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_3has_more_pages, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_2has_more_pages}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_3has_more_pages(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("has_more_pages (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5241, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5241, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "has_more_pages", 0) < (0)) __PYX_ERR(0, 5241, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("has_more_pages", 1, 1, 1, i); __PYX_ERR(0, 5241, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5241, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("has_more_pages", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5241, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.has_more_pages", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_2has_more_pages(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_2has_more_pages(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_more_pages", 0); /* "cassandra/cluster.py":5246 * True if the last response indicated more pages; False otherwise * """ * return self.response_future.has_more_pages # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_has_more_pages); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5246, __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; /* "cassandra/cluster.py":5241 * self._list_mode = False * * @property # <<<<<<<<<<<<<< * def has_more_pages(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.ResultSet.has_more_pages", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5248 * return self.response_future.has_more_pages * * @property # <<<<<<<<<<<<<< * def current_rows(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_5current_rows(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_4current_rows, "\n The list of current page rows. May be empty if the result was empty,\n or this is the last page.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_5current_rows = {"current_rows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_5current_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_4current_rows}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_5current_rows(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("current_rows (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5248, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5248, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "current_rows", 0) < (0)) __PYX_ERR(0, 5248, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("current_rows", 1, 1, 1, i); __PYX_ERR(0, 5248, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5248, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("current_rows", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5248, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.current_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_4current_rows(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_4current_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("current_rows", 0); /* "cassandra/cluster.py":5254 * or this is the last page. * """ * return self._current_rows or [] # <<<<<<<<<<<<<< * * def all(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5254, __pyx_L1_error) if (!__pyx_t_3) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5248 * return self.response_future.has_more_pages * * @property # <<<<<<<<<<<<<< * def current_rows(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.ResultSet.current_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5256 * return self._current_rows or [] * * def all(self): # <<<<<<<<<<<<<< * """ * Returns all the remaining rows as a list. This is basically */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_7all(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_6all, "\n Returns all the remaining rows as a list. This is basically\n a convenient shortcut to `list(result_set)`.\n\n This function is not recommended for queries that return a large number of elements.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_7all = {"all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_7all, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_6all}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_7all(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("all (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5256, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5256, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "all", 0) < (0)) __PYX_ERR(0, 5256, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("all", 1, 1, 1, i); __PYX_ERR(0, 5256, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5256, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("all", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5256, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_6all(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_6all(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("all", 0); /* "cassandra/cluster.py":5263 * This function is not recommended for queries that return a large number of elements. * """ * return list(self) # <<<<<<<<<<<<<< * * def one(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5256 * return self._current_rows or [] * * def all(self): # <<<<<<<<<<<<<< * """ * Returns all the remaining rows as a list. This is basically */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.ResultSet.all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5265 * return list(self) * * def one(self): # <<<<<<<<<<<<<< * """ * Return a single row of the results or None if empty. This is basically */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_9one(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_8one, "\n Return a single row of the results or None if empty. This is basically\n a shortcut to `result_set.current_rows[0]` and should only be used when\n you know a query returns a single row. Consider using an iterator if the\n ResultSet contains more than one row.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_9one = {"one", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_9one, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_8one}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_9one(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("one (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5265, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5265, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "one", 0) < (0)) __PYX_ERR(0, 5265, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("one", 1, 1, 1, i); __PYX_ERR(0, 5265, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5265, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("one", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5265, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.one", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_8one(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_8one(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_row = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; 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; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("one", 0); /* "cassandra/cluster.py":5272 * ResultSet contains more than one row. * """ * row = None # <<<<<<<<<<<<<< * if self._current_rows: * try: */ __Pyx_INCREF(Py_None); __pyx_v_row = Py_None; /* "cassandra/cluster.py":5273 * """ * row = None * if self._current_rows: # <<<<<<<<<<<<<< * try: * row = self._current_rows[0] */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5273, __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(0, 5273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5274 * row = None * if self._current_rows: * try: # <<<<<<<<<<<<<< * row = self._current_rows[0] * except TypeError: # generator object is not subscriptable, PYTHON-1026 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "cassandra/cluster.py":5275 * if self._current_rows: * try: * row = self._current_rows[0] # <<<<<<<<<<<<<< * except TypeError: # generator object is not subscriptable, PYTHON-1026 * row = next(iter(self._current_rows)) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5275, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5275, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":5274 * row = None * if self._current_rows: * try: # <<<<<<<<<<<<<< * row = self._current_rows[0] * except TypeError: # generator object is not subscriptable, PYTHON-1026 */ } __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; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; /* "cassandra/cluster.py":5276 * try: * row = self._current_rows[0] * except TypeError: # generator object is not subscriptable, PYTHON-1026 # <<<<<<<<<<<<<< * row = next(iter(self._current_rows)) * */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError)))); if (__pyx_t_7) { __Pyx_AddTraceback("cassandra.cluster.ResultSet.one", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 5276, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_8); /* "cassandra/cluster.py":5277 * row = self._current_rows[0] * except TypeError: # generator object is not subscriptable, PYTHON-1026 * row = next(iter(self._current_rows)) # <<<<<<<<<<<<<< * * return row */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5277, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5277, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyIter_Next(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5277, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF_SET(__pyx_v_row, __pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; /* "cassandra/cluster.py":5274 * row = None * if self._current_rows: * try: # <<<<<<<<<<<<<< * row = self._current_rows[0] * except TypeError: # generator object is not subscriptable, PYTHON-1026 */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L9_try_end:; } /* "cassandra/cluster.py":5273 * """ * row = None * if self._current_rows: # <<<<<<<<<<<<<< * try: * row = self._current_rows[0] */ } /* "cassandra/cluster.py":5279 * row = next(iter(self._current_rows)) * * return row # <<<<<<<<<<<<<< * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_row); __pyx_r = __pyx_v_row; goto __pyx_L0; /* "cassandra/cluster.py":5265 * return list(self) * * def one(self): # <<<<<<<<<<<<<< * """ * Return a single row of the results or None if empty. This is basically */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("cassandra.cluster.ResultSet.one", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5281 * return row * * def __iter__(self): # <<<<<<<<<<<<<< * if self._list_mode: * return iter(self._current_rows) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_11__iter__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_11__iter__ = {"__iter__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_11__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_11__iter__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5281, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5281, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__iter__", 0) < (0)) __PYX_ERR(0, 5281, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, i); __PYX_ERR(0, 5281, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5281, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5281, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_10__iter__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_10__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); /* "cassandra/cluster.py":5282 * * def __iter__(self): * if self._list_mode: # <<<<<<<<<<<<<< * return iter(self._current_rows) * self._page_iter = iter(self._current_rows) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_list_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5282, __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(0, 5282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5283 * def __iter__(self): * if self._list_mode: * return iter(self._current_rows) # <<<<<<<<<<<<<< * self._page_iter = iter(self._current_rows) * return self */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5282 * * def __iter__(self): * if self._list_mode: # <<<<<<<<<<<<<< * return iter(self._current_rows) * self._page_iter = iter(self._current_rows) */ } /* "cassandra/cluster.py":5284 * if self._list_mode: * return iter(self._current_rows) * self._page_iter = iter(self._current_rows) # <<<<<<<<<<<<<< * return self * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter, __pyx_t_1) < (0)) __PYX_ERR(0, 5284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5285 * return iter(self._current_rows) * self._page_iter = iter(self._current_rows) * return self # <<<<<<<<<<<<<< * * def next(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; /* "cassandra/cluster.py":5281 * return row * * def __iter__(self): # <<<<<<<<<<<<<< * if self._list_mode: * return iter(self._current_rows) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResultSet.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5287 * return self * * def next(self): # <<<<<<<<<<<<<< * try: * return next(self._page_iter) */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_13next(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_13next = {"next", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_13next, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_13next(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("next (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5287, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5287, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "next", 0) < (0)) __PYX_ERR(0, 5287, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, i); __PYX_ERR(0, 5287, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5287, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5287, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.next", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_12next(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_12next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_t_10; int __pyx_t_11; size_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("next", 0); /* "cassandra/cluster.py":5288 * * def next(self): * try: # <<<<<<<<<<<<<< * return next(self._page_iter) * except StopIteration: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":5289 * def next(self): * try: * return next(self._page_iter) # <<<<<<<<<<<<<< * except StopIteration: * if not self.response_future.has_more_pages: */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5289, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyIter_Next(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 5289, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L7_try_return; /* "cassandra/cluster.py":5288 * * def next(self): * try: # <<<<<<<<<<<<<< * return next(self._page_iter) * except StopIteration: */ } __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; /* "cassandra/cluster.py":5290 * try: * return next(self._page_iter) * except StopIteration: # <<<<<<<<<<<<<< * if not self.response_future.has_more_pages: * if not self._list_mode: */ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_StopIteration)))); if (__pyx_t_6) { __Pyx_AddTraceback("cassandra.cluster.ResultSet.next", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 5290, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); /* "cassandra/cluster.py":5291 * return next(self._page_iter) * except StopIteration: * if not self.response_future.has_more_pages: # <<<<<<<<<<<<<< * if not self._list_mode: * self._current_rows = [] */ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 5291, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_has_more_pages); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5291, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 5291, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_11 = (!__pyx_t_10); if (__pyx_t_11) { /* "cassandra/cluster.py":5292 * except StopIteration: * if not self.response_future.has_more_pages: * if not self._list_mode: # <<<<<<<<<<<<<< * self._current_rows = [] * raise */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_list_mode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5292, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 5292, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = (!__pyx_t_11); if (__pyx_t_10) { /* "cassandra/cluster.py":5293 * if not self.response_future.has_more_pages: * if not self._list_mode: * self._current_rows = [] # <<<<<<<<<<<<<< * raise * */ __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5293, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_t_9) < (0)) __PYX_ERR(0, 5293, __pyx_L5_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":5292 * except StopIteration: * if not self.response_future.has_more_pages: * if not self._list_mode: # <<<<<<<<<<<<<< * self._current_rows = [] * raise */ } /* "cassandra/cluster.py":5294 * if not self._list_mode: * self._current_rows = [] * raise # <<<<<<<<<<<<<< * * if not self.response_future._continuous_paging_session: */ __Pyx_GIVEREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_4, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_7 = 0; __PYX_ERR(0, 5294, __pyx_L5_except_error) /* "cassandra/cluster.py":5291 * return next(self._page_iter) * except StopIteration: * if not self.response_future.has_more_pages: # <<<<<<<<<<<<<< * if not self._list_mode: * self._current_rows = [] */ } __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L4_exception_handled; } goto __pyx_L5_except_error; /* "cassandra/cluster.py":5288 * * def next(self): * try: # <<<<<<<<<<<<<< * return next(self._page_iter) * except StopIteration: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L7_try_return:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L0; __pyx_L4_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); } /* "cassandra/cluster.py":5296 * raise * * if not self.response_future._continuous_paging_session: # <<<<<<<<<<<<<< * self.fetch_next_page() * self._page_iter = iter(self._current_rows) */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_continuous_paging_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 5296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = (!__pyx_t_10); if (__pyx_t_11) { /* "cassandra/cluster.py":5297 * * if not self.response_future._continuous_paging_session: * self.fetch_next_page() # <<<<<<<<<<<<<< * self._page_iter = iter(self._current_rows) * */ __pyx_t_7 = __pyx_v_self; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fetch_next_page, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5298 * if not self.response_future._continuous_paging_session: * self.fetch_next_page() * self._page_iter = iter(self._current_rows) # <<<<<<<<<<<<<< * * # Some servers can return empty pages in this case; Scylla is known to do */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter, __pyx_t_7) < (0)) __PYX_ERR(0, 5298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "cassandra/cluster.py":5304 * # the next(iter) call. If we have an empty page in that case it will * # get handled by the StopIteration handler when we recurse. * return self.next() # <<<<<<<<<<<<<< * * return next(self._page_iter) */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_7 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_next, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); } __pyx_r = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5296 * raise * * if not self.response_future._continuous_paging_session: # <<<<<<<<<<<<<< * self.fetch_next_page() * self._page_iter = iter(self._current_rows) */ } /* "cassandra/cluster.py":5306 * return self.next() * * return next(self._page_iter) # <<<<<<<<<<<<<< * * __next__ = next */ __Pyx_XDECREF(__pyx_r); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = __Pyx_PyIter_Next(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5287 * return self * * def next(self): # <<<<<<<<<<<<<< * try: * return next(self._page_iter) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cassandra.cluster.ResultSet.next", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5310 * __next__ = next * * def fetch_next_page(self): # <<<<<<<<<<<<<< * """ * Manually, synchronously fetch the next page. Supplied for manually retrieving pages */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_15fetch_next_page(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_14fetch_next_page, "\n Manually, synchronously fetch the next page. Supplied for manually retrieving pages\n and inspecting :meth:`~.current_page`. It is not necessary to call this when iterating\n through results; paging happens implicitly in iteration.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_15fetch_next_page = {"fetch_next_page", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_15fetch_next_page, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_14fetch_next_page}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_15fetch_next_page(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fetch_next_page (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5310, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5310, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "fetch_next_page", 0) < (0)) __PYX_ERR(0, 5310, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("fetch_next_page", 1, 1, 1, i); __PYX_ERR(0, 5310, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5310, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("fetch_next_page", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5310, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.fetch_next_page", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_14fetch_next_page(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_14fetch_next_page(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_v_result = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fetch_next_page", 0); /* "cassandra/cluster.py":5316 * through results; paging happens implicitly in iteration. * """ * if self.response_future.has_more_pages: # <<<<<<<<<<<<<< * self.response_future.start_fetching_next_page() * result = self.response_future.result() */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_has_more_pages); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { /* "cassandra/cluster.py":5317 * """ * if self.response_future.has_more_pages: * self.response_future.start_fetching_next_page() # <<<<<<<<<<<<<< * result = self.response_future.result() * self._current_rows = result._current_rows # ResultSet has already _set_current_rows to the appropriate form */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_start_fetching_next_page, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":5318 * if self.response_future.has_more_pages: * self.response_future.start_fetching_next_page() * result = self.response_future.result() # <<<<<<<<<<<<<< * self._current_rows = result._current_rows # ResultSet has already _set_current_rows to the appropriate form * else: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_result, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; /* "cassandra/cluster.py":5319 * self.response_future.start_fetching_next_page() * result = self.response_future.result() * self._current_rows = result._current_rows # ResultSet has already _set_current_rows to the appropriate form # <<<<<<<<<<<<<< * else: * self._current_rows = [] */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 5319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":5316 * through results; paging happens implicitly in iteration. * """ * if self.response_future.has_more_pages: # <<<<<<<<<<<<<< * self.response_future.start_fetching_next_page() * result = self.response_future.result() */ goto __pyx_L3; } /* "cassandra/cluster.py":5321 * self._current_rows = result._current_rows # ResultSet has already _set_current_rows to the appropriate form * else: * self._current_rows = [] # <<<<<<<<<<<<<< * * def _set_current_rows(self, result): */ /*else*/ { __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_t_2) < (0)) __PYX_ERR(0, 5321, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; /* "cassandra/cluster.py":5310 * __next__ = next * * def fetch_next_page(self): # <<<<<<<<<<<<<< * """ * Manually, synchronously fetch the next page. Supplied for manually retrieving pages */ /* 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_4); __Pyx_AddTraceback("cassandra.cluster.ResultSet.fetch_next_page", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5323 * self._current_rows = [] * * def _set_current_rows(self, result): # <<<<<<<<<<<<<< * if isinstance(result, Mapping): * self._current_rows = [result] if result else [] */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_17_set_current_rows(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_17_set_current_rows = {"_set_current_rows", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_17_set_current_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_17_set_current_rows(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_result = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_set_current_rows (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_result,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5323, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5323, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5323, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_set_current_rows", 0) < (0)) __PYX_ERR(0, 5323, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_set_current_rows", 1, 2, 2, i); __PYX_ERR(0, 5323, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5323, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5323, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_result = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_set_current_rows", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5323, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet._set_current_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_16_set_current_rows(__pyx_self, __pyx_v_self, __pyx_v_result); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_16_set_current_rows(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; 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; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_set_current_rows", 0); /* "cassandra/cluster.py":5324 * * def _set_current_rows(self, result): * if isinstance(result, Mapping): # <<<<<<<<<<<<<< * self._current_rows = [result] if result else [] * return */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_Mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_IsInstance(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 5324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5325 * def _set_current_rows(self, result): * if isinstance(result, Mapping): * self._current_rows = [result] if result else [] # <<<<<<<<<<<<<< * return * try: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5325, __pyx_L1_error) if (__pyx_t_2) { __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 5325, __pyx_L1_error); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_t_1) < (0)) __PYX_ERR(0, 5325, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5326 * if isinstance(result, Mapping): * self._current_rows = [result] if result else [] * return # <<<<<<<<<<<<<< * try: * iter(result) # can't check directly for generator types because cython generators are different */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":5324 * * def _set_current_rows(self, result): * if isinstance(result, Mapping): # <<<<<<<<<<<<<< * self._current_rows = [result] if result else [] * return */ } /* "cassandra/cluster.py":5327 * self._current_rows = [result] if result else [] * return * try: # <<<<<<<<<<<<<< * iter(result) # can't check directly for generator types because cython generators are different * self._current_rows = result */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":5328 * return * try: * iter(result) # can't check directly for generator types because cython generators are different # <<<<<<<<<<<<<< * self._current_rows = result * except TypeError: */ __pyx_t_1 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5328, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5329 * try: * iter(result) # can't check directly for generator types because cython generators are different * self._current_rows = result # <<<<<<<<<<<<<< * except TypeError: * self._current_rows = [result] if result else [] */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_v_result) < (0)) __PYX_ERR(0, 5329, __pyx_L4_error) /* "cassandra/cluster.py":5327 * self._current_rows = [result] if result else [] * return * try: # <<<<<<<<<<<<<< * iter(result) # can't check directly for generator types because cython generators are different * self._current_rows = result */ } __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; goto __pyx_L9_try_end; __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cassandra/cluster.py":5330 * iter(result) # can't check directly for generator types because cython generators are different * self._current_rows = result * except TypeError: # <<<<<<<<<<<<<< * self._current_rows = [result] if result else [] * */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_TypeError)))); if (__pyx_t_7) { __Pyx_AddTraceback("cassandra.cluster.ResultSet._set_current_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_8) < 0) __PYX_ERR(0, 5330, __pyx_L6_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_8); /* "cassandra/cluster.py":5331 * self._current_rows = result * except TypeError: * self._current_rows = [result] if result else [] # <<<<<<<<<<<<<< * * def _fetch_all(self): */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5331, __pyx_L6_except_error) if (__pyx_t_2) { __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5331, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v_result) != (0)) __PYX_ERR(0, 5331, __pyx_L6_except_error); __pyx_t_9 = __pyx_t_10; __pyx_t_10 = 0; } else { __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5331, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __pyx_t_10; __pyx_t_10 = 0; } if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_t_9) < (0)) __PYX_ERR(0, 5331, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L5_exception_handled; } goto __pyx_L6_except_error; /* "cassandra/cluster.py":5327 * self._current_rows = [result] if result else [] * return * try: # <<<<<<<<<<<<<< * iter(result) # can't check directly for generator types because cython generators are different * self._current_rows = result */ __pyx_L6_except_error:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L5_exception_handled:; __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); __pyx_L9_try_end:; } /* "cassandra/cluster.py":5323 * self._current_rows = [] * * def _set_current_rows(self, result): # <<<<<<<<<<<<<< * if isinstance(result, Mapping): * self._current_rows = [result] if result else [] */ /* 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_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("cassandra.cluster.ResultSet._set_current_rows", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5333 * self._current_rows = [result] if result else [] * * def _fetch_all(self): # <<<<<<<<<<<<<< * self._current_rows = list(self) * self._page_iter = None */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_19_fetch_all(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_19_fetch_all = {"_fetch_all", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_19_fetch_all, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_19_fetch_all(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_fetch_all (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5333, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5333, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_fetch_all", 0) < (0)) __PYX_ERR(0, 5333, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_fetch_all", 1, 1, 1, i); __PYX_ERR(0, 5333, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5333, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_fetch_all", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5333, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet._fetch_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_18_fetch_all(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_18_fetch_all(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_fetch_all", 0); /* "cassandra/cluster.py":5334 * * def _fetch_all(self): * self._current_rows = list(self) # <<<<<<<<<<<<<< * self._page_iter = None * */ __pyx_t_1 = PySequence_List(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows, __pyx_t_1) < (0)) __PYX_ERR(0, 5334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5335 * def _fetch_all(self): * self._current_rows = list(self) * self._page_iter = None # <<<<<<<<<<<<<< * * def _enter_list_mode(self, operator): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter, Py_None) < (0)) __PYX_ERR(0, 5335, __pyx_L1_error) /* "cassandra/cluster.py":5333 * self._current_rows = [result] if result else [] * * def _fetch_all(self): # <<<<<<<<<<<<<< * self._current_rows = list(self) * self._page_iter = None */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.ResultSet._fetch_all", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5337 * self._page_iter = None * * def _enter_list_mode(self, operator): # <<<<<<<<<<<<<< * if self._list_mode: * return */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_21_enter_list_mode(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_21_enter_list_mode = {"_enter_list_mode", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_21_enter_list_mode, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_21_enter_list_mode(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_operator = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_enter_list_mode (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_operator,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5337, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5337, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5337, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_enter_list_mode", 0) < (0)) __PYX_ERR(0, 5337, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_enter_list_mode", 1, 2, 2, i); __PYX_ERR(0, 5337, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5337, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5337, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_operator = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_enter_list_mode", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5337, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet._enter_list_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_20_enter_list_mode(__pyx_self, __pyx_v_self, __pyx_v_operator); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_20_enter_list_mode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_operator) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_enter_list_mode", 0); /* "cassandra/cluster.py":5338 * * def _enter_list_mode(self, operator): * if self._list_mode: # <<<<<<<<<<<<<< * return * if self._page_iter: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_list_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5338, __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(0, 5338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5339 * def _enter_list_mode(self, operator): * if self._list_mode: * return # <<<<<<<<<<<<<< * if self._page_iter: * raise RuntimeError("Cannot use %s when results have been iterated." % operator) */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "cassandra/cluster.py":5338 * * def _enter_list_mode(self, operator): * if self._list_mode: # <<<<<<<<<<<<<< * return * if self._page_iter: */ } /* "cassandra/cluster.py":5340 * if self._list_mode: * return * if self._page_iter: # <<<<<<<<<<<<<< * raise RuntimeError("Cannot use %s when results have been iterated." % operator) * if self.response_future.has_more_pages: */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_page_iter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5340, __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(0, 5340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_2)) { /* "cassandra/cluster.py":5341 * return * if self._page_iter: * raise RuntimeError("Cannot use %s when results have been iterated." % operator) # <<<<<<<<<<<<<< * if self.response_future.has_more_pages: * log.warning("Using %s on paged results causes entire result set to be materialized.", operator) */ __pyx_t_3 = NULL; __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_mstate_global->__pyx_kp_u_Cannot_use_s_when_results_have_b, __pyx_v_operator); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __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(0, 5341, __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(0, 5341, __pyx_L1_error) /* "cassandra/cluster.py":5340 * if self._list_mode: * return * if self._page_iter: # <<<<<<<<<<<<<< * raise RuntimeError("Cannot use %s when results have been iterated." % operator) * if self.response_future.has_more_pages: */ } /* "cassandra/cluster.py":5342 * if self._page_iter: * raise RuntimeError("Cannot use %s when results have been iterated." % operator) * if self.response_future.has_more_pages: # <<<<<<<<<<<<<< * log.warning("Using %s on paged results causes entire result set to be materialized.", operator) * self._fetch_all() # done regardless of paging status in case the row factory produces a generator */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_has_more_pages); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 5342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_2) { /* "cassandra/cluster.py":5343 * raise RuntimeError("Cannot use %s when results have been iterated." % operator) * if self.response_future.has_more_pages: * log.warning("Using %s on paged results causes entire result set to be materialized.", operator) # <<<<<<<<<<<<<< * self._fetch_all() # done regardless of paging status in case the row factory produces a generator * self._list_mode = True */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_warning); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_Using_s_on_paged_results_causes, __pyx_v_operator}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5342 * if self._page_iter: * raise RuntimeError("Cannot use %s when results have been iterated." % operator) * if self.response_future.has_more_pages: # <<<<<<<<<<<<<< * log.warning("Using %s on paged results causes entire result set to be materialized.", operator) * self._fetch_all() # done regardless of paging status in case the row factory produces a generator */ } /* "cassandra/cluster.py":5344 * if self.response_future.has_more_pages: * log.warning("Using %s on paged results causes entire result set to be materialized.", operator) * self._fetch_all() # done regardless of paging status in case the row factory produces a generator # <<<<<<<<<<<<<< * self._list_mode = True * */ __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_fetch_all, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5345 * log.warning("Using %s on paged results causes entire result set to be materialized.", operator) * self._fetch_all() # done regardless of paging status in case the row factory produces a generator * self._list_mode = True # <<<<<<<<<<<<<< * * def __eq__(self, other): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_list_mode, Py_True) < (0)) __PYX_ERR(0, 5345, __pyx_L1_error) /* "cassandra/cluster.py":5337 * self._page_iter = None * * def _enter_list_mode(self, operator): # <<<<<<<<<<<<<< * if self._list_mode: * return */ /* 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_6); __Pyx_AddTraceback("cassandra.cluster.ResultSet._enter_list_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5347 * self._list_mode = True * * def __eq__(self, other): # <<<<<<<<<<<<<< * self._enter_list_mode("equality operator") * return self._current_rows == other */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_23__eq__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_23__eq__ = {"__eq__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_23__eq__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_23__eq__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_other = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_other,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5347, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5347, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5347, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__eq__", 0) < (0)) __PYX_ERR(0, 5347, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, i); __PYX_ERR(0, 5347, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5347, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5347, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_other = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5347, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_22__eq__(__pyx_self, __pyx_v_self, __pyx_v_other); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_22__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); /* "cassandra/cluster.py":5348 * * def __eq__(self, other): * self._enter_list_mode("equality operator") # <<<<<<<<<<<<<< * return self._current_rows == other * */ __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_equality_operator}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_enter_list_mode, __pyx_callargs+__pyx_t_3, (2-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cassandra/cluster.py":5349 * def __eq__(self, other): * self._enter_list_mode("equality operator") * return self._current_rows == other # <<<<<<<<<<<<<< * * def __getitem__(self, i): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5347 * self._list_mode = True * * def __eq__(self, other): # <<<<<<<<<<<<<< * self._enter_list_mode("equality operator") * return self._current_rows == other */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.ResultSet.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5351 * return self._current_rows == other * * def __getitem__(self, i): # <<<<<<<<<<<<<< * if i == 0: * warn("ResultSet indexing support will be removed in 4.0. Consider using " */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_25__getitem__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_25__getitem__ = {"__getitem__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_25__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_25__getitem__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_i = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_i,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5351, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5351, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5351, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__getitem__", 0) < (0)) __PYX_ERR(0, 5351, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, i); __PYX_ERR(0, 5351, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5351, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5351, __pyx_L3_error) } __pyx_v_self = values[0]; __pyx_v_i = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 5351, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_24__getitem__(__pyx_self, __pyx_v_self, __pyx_v_i); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_24__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i) { 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; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "cassandra/cluster.py":5352 * * def __getitem__(self, i): * if i == 0: # <<<<<<<<<<<<<< * warn("ResultSet indexing support will be removed in 4.0. Consider using " * "ResultSet.one() to get a single row.", DeprecationWarning) */ __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_i, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 5352, __pyx_L1_error) if (__pyx_t_1) { /* "cassandra/cluster.py":5353 * def __getitem__(self, i): * if i == 0: * warn("ResultSet indexing support will be removed in 4.0. Consider using " # <<<<<<<<<<<<<< * "ResultSet.one() to get a single row.", DeprecationWarning) * self._enter_list_mode("index operator") */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_warn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "cassandra/cluster.py":5354 * if i == 0: * warn("ResultSet indexing support will be removed in 4.0. Consider using " * "ResultSet.one() to get a single row.", DeprecationWarning) # <<<<<<<<<<<<<< * self._enter_list_mode("index operator") * return self._current_rows[i] */ __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_ResultSet_indexing_support_will, ((PyObject *)(((PyTypeObject*)PyExc_DeprecationWarning)))}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":5352 * * def __getitem__(self, i): * if i == 0: # <<<<<<<<<<<<<< * warn("ResultSet indexing support will be removed in 4.0. Consider using " * "ResultSet.one() to get a single row.", DeprecationWarning) */ } /* "cassandra/cluster.py":5355 * warn("ResultSet indexing support will be removed in 4.0. Consider using " * "ResultSet.one() to get a single row.", DeprecationWarning) * self._enter_list_mode("index operator") # <<<<<<<<<<<<<< * return self._current_rows[i] * */ __pyx_t_4 = __pyx_v_self; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_index_operator}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_enter_list_mode, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":5356 * "ResultSet.one() to get a single row.", DeprecationWarning) * self._enter_list_mode("index operator") * return self._current_rows[i] # <<<<<<<<<<<<<< * * def __nonzero__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5351 * return self._current_rows == other * * def __getitem__(self, i): # <<<<<<<<<<<<<< * if i == 0: * warn("ResultSet indexing support will be removed in 4.0. Consider using " */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cassandra.cluster.ResultSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5358 * return self._current_rows[i] * * def __nonzero__(self): # <<<<<<<<<<<<<< * return bool(self._current_rows) * */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_27__nonzero__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_27__nonzero__ = {"__nonzero__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_27__nonzero__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_27__nonzero__(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5358, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5358, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__nonzero__", 0) < (0)) __PYX_ERR(0, 5358, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__nonzero__", 1, 1, 1, i); __PYX_ERR(0, 5358, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5358, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__nonzero__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5358, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_26__nonzero__(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_26__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__nonzero__", 0); /* "cassandra/cluster.py":5359 * * def __nonzero__(self): * return bool(self._current_rows) # <<<<<<<<<<<<<< * * __bool__ = __nonzero__ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5359, __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(0, 5359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5358 * return self._current_rows[i] * * def __nonzero__(self): # <<<<<<<<<<<<<< * return bool(self._current_rows) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cassandra.cluster.ResultSet.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5363 * __bool__ = __nonzero__ * * def get_query_trace(self, max_wait_sec=None): # <<<<<<<<<<<<<< * """ * Gets the last query trace from the associated future. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_29get_query_trace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_28get_query_trace, "\n Gets the last query trace from the associated future.\n See :meth:`.ResponseFuture.get_query_trace` for details.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_29get_query_trace = {"get_query_trace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_29get_query_trace, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_28get_query_trace}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_29get_query_trace(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_max_wait_sec = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_query_trace (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_max_wait_sec,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5363, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5363, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5363, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_query_trace", 0) < (0)) __PYX_ERR(0, 5363, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_query_trace", 0, 1, 2, i); __PYX_ERR(0, 5363, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5363, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5363, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_max_wait_sec = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_query_trace", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 5363, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.get_query_trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_28get_query_trace(__pyx_self, __pyx_v_self, __pyx_v_max_wait_sec); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_28get_query_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait_sec) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_query_trace", 0); /* "cassandra/cluster.py":5368 * See :meth:`.ResponseFuture.get_query_trace` for details. * """ * return self.response_future.get_query_trace(max_wait_sec) # <<<<<<<<<<<<<< * * def get_all_query_traces(self, max_wait_sec_per=None): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_max_wait_sec}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_query_trace_2, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5363 * __bool__ = __nonzero__ * * def get_query_trace(self, max_wait_sec=None): # <<<<<<<<<<<<<< * """ * Gets the last query trace from the associated future. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResultSet.get_query_trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5370 * return self.response_future.get_query_trace(max_wait_sec) * * def get_all_query_traces(self, max_wait_sec_per=None): # <<<<<<<<<<<<<< * """ * Gets all query traces from the associated future. */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_31get_all_query_traces(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_30get_all_query_traces, "\n Gets all query traces from the associated future.\n See :meth:`.ResponseFuture.get_all_query_traces` for details.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_31get_all_query_traces = {"get_all_query_traces", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_31get_all_query_traces, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_30get_all_query_traces}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_31get_all_query_traces(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_max_wait_sec_per = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_all_query_traces (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,&__pyx_mstate_global->__pyx_n_u_max_wait_sec_per,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5370, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5370, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5370, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_all_query_traces", 0) < (0)) __PYX_ERR(0, 5370, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_all_query_traces", 0, 1, 2, i); __PYX_ERR(0, 5370, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 5370, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5370, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_self = values[0]; __pyx_v_max_wait_sec_per = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_all_query_traces", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 5370, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.get_all_query_traces", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_30get_all_query_traces(__pyx_self, __pyx_v_self, __pyx_v_max_wait_sec_per); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_30get_all_query_traces(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_max_wait_sec_per) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_all_query_traces", 0); /* "cassandra/cluster.py":5375 * See :meth:`.ResponseFuture.get_all_query_traces` for details. * """ * return self.response_future.get_all_query_traces(max_wait_sec_per) # <<<<<<<<<<<<<< * * def cancel_continuous_paging(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_max_wait_sec_per}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_all_query_traces, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5370 * return self.response_future.get_query_trace(max_wait_sec) * * def get_all_query_traces(self, max_wait_sec_per=None): # <<<<<<<<<<<<<< * """ * Gets all query traces from the associated future. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cassandra.cluster.ResultSet.get_all_query_traces", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5377 * return self.response_future.get_all_query_traces(max_wait_sec_per) * * def cancel_continuous_paging(self): # <<<<<<<<<<<<<< * try: * self.response_future._continuous_paging_session.cancel() */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_33cancel_continuous_paging(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_33cancel_continuous_paging = {"cancel_continuous_paging", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_33cancel_continuous_paging, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_33cancel_continuous_paging(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel_continuous_paging (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5377, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5377, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "cancel_continuous_paging", 0) < (0)) __PYX_ERR(0, 5377, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("cancel_continuous_paging", 1, 1, 1, i); __PYX_ERR(0, 5377, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5377, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("cancel_continuous_paging", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5377, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.cancel_continuous_paging", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_32cancel_continuous_paging(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_32cancel_continuous_paging(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__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; size_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancel_continuous_paging", 0); /* "cassandra/cluster.py":5378 * * def cancel_continuous_paging(self): * try: # <<<<<<<<<<<<<< * self.response_future._continuous_paging_session.cancel() * except AttributeError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "cassandra/cluster.py":5379 * def cancel_continuous_paging(self): * try: * self.response_future._continuous_paging_session.cancel() # <<<<<<<<<<<<<< * except AttributeError: * raise DriverException("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.") */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5379, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_continuous_paging_session); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 5379, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_7; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_cancel, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5379, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5378 * * def cancel_continuous_paging(self): * try: # <<<<<<<<<<<<<< * self.response_future._continuous_paging_session.cancel() * except AttributeError: */ } __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_L8_try_end; __pyx_L3_error:; __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; /* "cassandra/cluster.py":5380 * try: * self.response_future._continuous_paging_session.cancel() * except AttributeError: # <<<<<<<<<<<<<< * raise DriverException("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.") * */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_AttributeError)))); if (__pyx_t_9) { __Pyx_AddTraceback("cassandra.cluster.ResultSet.cancel_continuous_paging", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 5380, __pyx_L5_except_error) __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_5); /* "cassandra/cluster.py":5381 * self.response_future._continuous_paging_session.cancel() * except AttributeError: * raise DriverException("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.") # <<<<<<<<<<<<<< * * @property */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_DriverException); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5381, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_mstate_global->__pyx_kp_u_Attempted_to_cancel_paging_with}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5381, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 5381, __pyx_L5_except_error) } goto __pyx_L5_except_error; /* "cassandra/cluster.py":5378 * * def cancel_continuous_paging(self): * try: # <<<<<<<<<<<<<< * self.response_future._continuous_paging_session.cancel() * except AttributeError: */ __pyx_L5_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "cassandra/cluster.py":5377 * return self.response_future.get_all_query_traces(max_wait_sec_per) * * def cancel_continuous_paging(self): # <<<<<<<<<<<<<< * try: * self.response_future._continuous_paging_session.cancel() */ /* 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_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("cassandra.cluster.ResultSet.cancel_continuous_paging", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5383 * raise DriverException("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.") * * @property # <<<<<<<<<<<<<< * def was_applied(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_35was_applied(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_34was_applied, "\n For LWT results, returns whether the transaction was applied.\n\n Result is indeterminate if called on a result that was not an LWT request or on\n a :class:`.query.BatchStatement` containing LWT. In the latter case either all the batch\n succeeds or fails.\n\n Only valid when one of the internal row factories is in use.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_35was_applied = {"was_applied", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_35was_applied, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_34was_applied}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_35was_applied(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("was_applied (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5383, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5383, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "was_applied", 0) < (0)) __PYX_ERR(0, 5383, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("was_applied", 1, 1, 1, i); __PYX_ERR(0, 5383, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5383, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("was_applied", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5383, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.was_applied", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_34was_applied(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_34was_applied(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { int __pyx_v_is_batch_statement; PyObject *__pyx_v_row = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("was_applied", 0); /* "cassandra/cluster.py":5394 * Only valid when one of the internal row factories is in use. * """ * if self.response_future.row_factory not in (named_tuple_factory, dict_factory, tuple_factory): # <<<<<<<<<<<<<< * raise RuntimeError("Cannot determine LWT result with row factory %s" % (self.response_future.row_factory,)) * */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_named_tuple_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_dict_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_tuple_factory); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 5394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = __pyx_t_3; if (unlikely(__pyx_t_5)) { /* "cassandra/cluster.py":5395 * """ * if self.response_future.row_factory not in (named_tuple_factory, dict_factory, tuple_factory): * raise RuntimeError("Cannot determine LWT result with row factory %s" % (self.response_future.row_factory,)) # <<<<<<<<<<<<<< * * is_batch_statement = isinstance(self.response_future.query, BatchStatement) */ __pyx_t_4 = NULL; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_Cannot_determine_LWT_result_with, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_6}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 5395, __pyx_L1_error) /* "cassandra/cluster.py":5394 * Only valid when one of the internal row factories is in use. * """ * if self.response_future.row_factory not in (named_tuple_factory, dict_factory, tuple_factory): # <<<<<<<<<<<<<< * raise RuntimeError("Cannot determine LWT result with row factory %s" % (self.response_future.row_factory,)) * */ } /* "cassandra/cluster.py":5397 * raise RuntimeError("Cannot determine LWT result with row factory %s" % (self.response_future.row_factory,)) * * is_batch_statement = isinstance(self.response_future.query, BatchStatement) # <<<<<<<<<<<<<< * if is_batch_statement and (not self.column_names or self.column_names[0] != "[applied]"): * raise RuntimeError("No LWT were present in the BatchStatement") */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_query); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_BatchStatement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyObject_IsInstance(__pyx_t_6, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 5397, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_is_batch_statement = __pyx_t_5; /* "cassandra/cluster.py":5398 * * is_batch_statement = isinstance(self.response_future.query, BatchStatement) * if is_batch_statement and (not self.column_names or self.column_names[0] != "[applied]"): # <<<<<<<<<<<<<< * raise RuntimeError("No LWT were present in the BatchStatement") * */ if (__pyx_v_is_batch_statement) { } else { __pyx_t_5 = __pyx_v_is_batch_statement; goto __pyx_L8_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = (!__pyx_t_3); if (!__pyx_t_8) { } else { __pyx_t_5 = __pyx_t_8; goto __pyx_L8_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_column_names); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_applied, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 5398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_8; __pyx_L8_bool_binop_done:; if (unlikely(__pyx_t_5)) { /* "cassandra/cluster.py":5399 * is_batch_statement = isinstance(self.response_future.query, BatchStatement) * if is_batch_statement and (not self.column_names or self.column_names[0] != "[applied]"): * raise RuntimeError("No LWT were present in the BatchStatement") # <<<<<<<<<<<<<< * * if not is_batch_statement and len(self.current_rows) != 1: */ __pyx_t_2 = NULL; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_No_LWT_were_present_in_the_Batch}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 5399, __pyx_L1_error) /* "cassandra/cluster.py":5398 * * is_batch_statement = isinstance(self.response_future.query, BatchStatement) * if is_batch_statement and (not self.column_names or self.column_names[0] != "[applied]"): # <<<<<<<<<<<<<< * raise RuntimeError("No LWT were present in the BatchStatement") * */ } /* "cassandra/cluster.py":5401 * raise RuntimeError("No LWT were present in the BatchStatement") * * if not is_batch_statement and len(self.current_rows) != 1: # <<<<<<<<<<<<<< * raise RuntimeError("LWT result should have exactly one row. This has %d." % (len(self.current_rows))) * */ __pyx_t_8 = (!__pyx_v_is_batch_statement); if (__pyx_t_8) { } else { __pyx_t_5 = __pyx_t_8; goto __pyx_L12_bool_binop_done; } __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_9 != 1); __pyx_t_5 = __pyx_t_8; __pyx_L12_bool_binop_done:; if (unlikely(__pyx_t_5)) { /* "cassandra/cluster.py":5402 * * if not is_batch_statement and len(self.current_rows) != 1: * raise RuntimeError("LWT result should have exactly one row. This has %d." % (len(self.current_rows))) # <<<<<<<<<<<<<< * * row = self.current_rows[0] */ __pyx_t_2 = NULL; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 5402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyLong_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_LWT_result_should_have_exactly_o, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1}; __pyx_t_6 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_RuntimeError)), __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); } __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __PYX_ERR(0, 5402, __pyx_L1_error) /* "cassandra/cluster.py":5401 * raise RuntimeError("No LWT were present in the BatchStatement") * * if not is_batch_statement and len(self.current_rows) != 1: # <<<<<<<<<<<<<< * raise RuntimeError("LWT result should have exactly one row. This has %d." % (len(self.current_rows))) * */ } /* "cassandra/cluster.py":5404 * raise RuntimeError("LWT result should have exactly one row. This has %d." % (len(self.current_rows))) * * row = self.current_rows[0] # <<<<<<<<<<<<<< * if isinstance(row, tuple): * return row[0] */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_current_rows_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 5404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_row = __pyx_t_1; __pyx_t_1 = 0; /* "cassandra/cluster.py":5405 * * row = self.current_rows[0] * if isinstance(row, tuple): # <<<<<<<<<<<<<< * return row[0] * else: */ __pyx_t_5 = PyTuple_Check(__pyx_v_row); if (__pyx_t_5) { /* "cassandra/cluster.py":5406 * row = self.current_rows[0] * if isinstance(row, tuple): * return row[0] # <<<<<<<<<<<<<< * else: * return row['[applied]'] */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_row, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_OwnStrongReference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cassandra/cluster.py":5405 * * row = self.current_rows[0] * if isinstance(row, tuple): # <<<<<<<<<<<<<< * return row[0] * else: */ } /* "cassandra/cluster.py":5408 * return row[0] * else: * return row['[applied]'] # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_mstate_global->__pyx_kp_u_applied); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; } /* "cassandra/cluster.py":5383 * raise DriverException("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.") * * @property # <<<<<<<<<<<<<< * def was_applied(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cassandra.cluster.ResultSet.was_applied", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_row); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cassandra/cluster.py":5410 * return row['[applied]'] * * @property # <<<<<<<<<<<<<< * def paging_state(self): * """ */ /* Python wrapper */ static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_37paging_state(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ PyDoc_STRVAR(__pyx_doc_9cassandra_7cluster_9ResultSet_36paging_state, "\n Server paging state of the query. Can be `None` if the query was not paged.\n\n The driver treats paging state as opaque, but it may contain primary key data, so applications may want to\n avoid sending this to untrusted parties.\n "); static PyMethodDef __pyx_mdef_9cassandra_7cluster_9ResultSet_37paging_state = {"paging_state", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_9cassandra_7cluster_9ResultSet_37paging_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_9cassandra_7cluster_9ResultSet_36paging_state}; static PyObject *__pyx_pw_9cassandra_7cluster_9ResultSet_37paging_state(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_self = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("paging_state (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 5410, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5410, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "paging_state", 0) < (0)) __PYX_ERR(0, 5410, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("paging_state", 1, 1, 1, i); __PYX_ERR(0, 5410, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 5410, __pyx_L3_error) } __pyx_v_self = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("paging_state", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 5410, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("cassandra.cluster.ResultSet.paging_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_9cassandra_7cluster_9ResultSet_36paging_state(__pyx_self, __pyx_v_self); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_9cassandra_7cluster_9ResultSet_36paging_state(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("paging_state", 0); /* "cassandra/cluster.py":5418 * avoid sending this to untrusted parties. * """ * return self.response_future._paging_state # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_response_future); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_paging_state_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5418, __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; /* "cassandra/cluster.py":5410 * return row['[applied]'] * * @property # <<<<<<<<<<<<<< * def paging_state(self): * """ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cassandra.cluster.ResultSet.paging_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* #### Code section: module_exttypes ### */ static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_defaults(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults(PyObject *o) { struct __pyx_defaults *p = (struct __pyx_defaults *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->arg0); PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_defaults(PyObject *o, visitproc v, void *a) { int e; struct __pyx_defaults *p = (struct __pyx_defaults *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->arg0) { e = (*v)(p->arg0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_defaults(PyObject *o) { PyObject* tmp; struct __pyx_defaults *p = (struct __pyx_defaults *)o; tmp = ((PyObject*)p->arg0); p->arg0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_defaults_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_defaults}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_defaults}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_defaults}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_defaults_spec = { "cassandra.cluster.__pyx_defaults", sizeof(struct __pyx_defaults), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_defaults_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_defaults = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_defaults", /*tp_name*/ sizeof(struct __pyx_defaults), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_defaults, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_defaults, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_defaults, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_defaults1(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults1(PyObject *o) { struct __pyx_defaults1 *p = (struct __pyx_defaults1 *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults1) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->arg0); Py_CLEAR(p->arg1); Py_CLEAR(p->arg2); PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_defaults1(PyObject *o, visitproc v, void *a) { int e; struct __pyx_defaults1 *p = (struct __pyx_defaults1 *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->arg0) { e = (*v)(p->arg0, a); if (e) return e; } if (p->arg1) { e = (*v)(p->arg1, a); if (e) return e; } if (p->arg2) { e = (*v)(p->arg2, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_defaults1(PyObject *o) { PyObject* tmp; struct __pyx_defaults1 *p = (struct __pyx_defaults1 *)o; tmp = ((PyObject*)p->arg0); p->arg0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->arg1); p->arg1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->arg2); p->arg2 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_defaults1_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults1}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_defaults1}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_defaults1}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_defaults1}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_defaults1_spec = { "cassandra.cluster.__pyx_defaults1", sizeof(struct __pyx_defaults1), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_defaults1_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_defaults1 = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_defaults1", /*tp_name*/ sizeof(struct __pyx_defaults1), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults1, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_defaults1, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_defaults1, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_defaults1, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_defaults2(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults2(PyObject *o) { struct __pyx_defaults2 *p = (struct __pyx_defaults2 *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults2) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->arg0); Py_CLEAR(p->arg1); PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_defaults2(PyObject *o, visitproc v, void *a) { int e; struct __pyx_defaults2 *p = (struct __pyx_defaults2 *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->arg0) { e = (*v)(p->arg0, a); if (e) return e; } if (p->arg1) { e = (*v)(p->arg1, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_defaults2(PyObject *o) { PyObject* tmp; struct __pyx_defaults2 *p = (struct __pyx_defaults2 *)o; tmp = ((PyObject*)p->arg0); p->arg0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->arg1); p->arg1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_defaults2_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults2}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_defaults2}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_defaults2}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_defaults2}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_defaults2_spec = { "cassandra.cluster.__pyx_defaults2", sizeof(struct __pyx_defaults2), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_defaults2_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_defaults2 = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_defaults2", /*tp_name*/ sizeof(struct __pyx_defaults2), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_defaults2, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_defaults2, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_defaults2, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_defaults2, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct__run_in_executor(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct__run_in_executor > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct__run_in_executor[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct__run_in_executor]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct__run_in_executor(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct__run_in_executor) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_f); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct__run_in_executor < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct__run_in_executor[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct__run_in_executor++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct__run_in_executor(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_f) { e = (*v)(p->__pyx_v_f, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct__run_in_executor(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor *)o; tmp = ((PyObject*)p->__pyx_v_f); p->__pyx_v_f = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct__run_in_executor}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct__run_in_executor}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct__run_in_executor}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct__run_in_executor}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor_spec = { "cassandra.cluster.__pyx_scope_struct__run_in_executor", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct__run_in_executor", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct__run_in_executor), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct__run_in_executor, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct__run_in_executor, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct__run_in_executor, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct__run_in_executor, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_1_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_1_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_1_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_1_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_profile); Py_CLEAR(p->__pyx_v_profile_name); Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_1_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_1_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_profile) { e = (*v)(p->__pyx_v_profile, a); if (e) return e; } if (p->__pyx_v_profile_name) { e = (*v)(p->__pyx_v_profile_name, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_1_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_1_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_1_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_1_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_1_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_1_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_1_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_2_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_2_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_2_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_2_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_2_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_n); Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_2_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_2_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_n) { e = (*v)(p->__pyx_v_n, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_2_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_2_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_2_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_2_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_2_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_2_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_2_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_3_distance(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_3_distance > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_3_distance[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_3_distance]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_3_distance(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_3_distance) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_host); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_3_distance < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_3_distance[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_3_distance++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_3_distance(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_host) { e = (*v)(p->__pyx_v_host, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_3_distance(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance *)o; tmp = ((PyObject*)p->__pyx_v_host); p->__pyx_v_host = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_3_distance}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_3_distance}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_3_distance}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_3_distance}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance_spec = { "cassandra.cluster.__pyx_scope_struct_3_distance", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_3_distance", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_3_distance), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_3_distance, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_3_distance, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_3_distance, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_3_distance, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_4_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_4_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_4_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_4_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_4_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_p); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_4_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_4_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_p) { e = (*v)(p->__pyx_v_p, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_4_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_4_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_4_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_4_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_4_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_4_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_4_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_4_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_4_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_5_on_add(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_5_on_add > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_5_on_add[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_5_on_add]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_5_on_add(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_5_on_add) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_futures); Py_CLEAR(p->__pyx_v_futures_lock); Py_CLEAR(p->__pyx_v_futures_results); Py_CLEAR(p->__pyx_v_host); Py_CLEAR(p->__pyx_v_self); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_5_on_add < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_5_on_add[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_5_on_add++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_5_on_add(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_futures) { e = (*v)(p->__pyx_v_futures, a); if (e) return e; } if (p->__pyx_v_futures_lock) { e = (*v)(p->__pyx_v_futures_lock, a); if (e) return e; } if (p->__pyx_v_futures_results) { e = (*v)(p->__pyx_v_futures_results, a); if (e) return e; } if (p->__pyx_v_host) { e = (*v)(p->__pyx_v_host, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_5_on_add(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add *)o; tmp = ((PyObject*)p->__pyx_v_futures); p->__pyx_v_futures = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_futures_lock); p->__pyx_v_futures_lock = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_futures_results); p->__pyx_v_futures_results = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_host); p->__pyx_v_host = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_5_on_add}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_5_on_add}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_5_on_add}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_5_on_add}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add_spec = { "cassandra.cluster.__pyx_scope_struct_5_on_add", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_5_on_add", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_5_on_add), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_5_on_add, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_5_on_add, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_5_on_add, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_5_on_add, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_6_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_6_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_6_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_6_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_6_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_e); Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_6_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_6_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_e) { e = (*v)(p->__pyx_v_e, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_6_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_6_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_6_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_6_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_6_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_6_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_6_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_7_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_7_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_7_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_7_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_7_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_f); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_7_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_7_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_f) { e = (*v)(p->__pyx_v_f, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_7_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_7_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_7_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_7_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_7_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_7_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_7_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_7_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_7_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_8_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_8_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_8_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_8_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_8_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_f); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_8_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_8_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_f) { e = (*v)(p->__pyx_v_f, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_8_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_8_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_8_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_8_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_8_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_8_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_8_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_8_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_8_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_distance); Py_CLEAR(p->__pyx_v_host); Py_CLEAR(p->__pyx_v_is_host_addition); Py_CLEAR(p->__pyx_v_self); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_distance) { e = (*v)(p->__pyx_v_distance, a); if (e) return e; } if (p->__pyx_v_host) { e = (*v)(p->__pyx_v_host, a); if (e) return e; } if (p->__pyx_v_is_host_addition) { e = (*v)(p->__pyx_v_is_host_addition, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)o; tmp = ((PyObject*)p->__pyx_v_distance); p->__pyx_v_distance = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_host); p->__pyx_v_host = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_is_host_addition); p->__pyx_v_is_host_addition = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool_spec = { "cassandra.cluster.__pyx_scope_struct_9_add_or_renew_pool", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_9_add_or_renew_pool", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_errors_returned); Py_CLEAR(p->__pyx_v_set_keyspace_event); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_errors_returned) { e = (*v)(p->__pyx_v_errors_returned, a); if (e) return e; } if (p->__pyx_v_set_keyspace_event) { e = (*v)(p->__pyx_v_set_keyspace_event, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_errors_returned); p->__pyx_v_errors_returned = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_set_keyspace_event); p->__pyx_v_set_keyspace_event = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool_spec = { "cassandra.cluster.__pyx_scope_struct_10_run_add_or_renew_pool", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_10_run_add_or_renew_pool", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_11_on_down(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_11_on_down > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_11_on_down[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_11_on_down]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_11_on_down(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_11_on_down) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_11_on_down < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_11_on_down[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_11_on_down++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_11_on_down(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_11_on_down(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_11_on_down}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_11_on_down}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_11_on_down}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_11_on_down}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down_spec = { "cassandra.cluster.__pyx_scope_struct_11_on_down", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_11_on_down", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_11_on_down), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_11_on_down, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_11_on_down, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_11_on_down, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_11_on_down, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_callback); Py_CLEAR(p->__pyx_v_errors); Py_CLEAR(p->__pyx_v_remaining_callbacks); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_callback) { e = (*v)(p->__pyx_v_callback, a); if (e) return e; } if (p->__pyx_v_errors) { e = (*v)(p->__pyx_v_errors, a); if (e) return e; } if (p->__pyx_v_remaining_callbacks) { e = (*v)(p->__pyx_v_remaining_callbacks, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools *)o; tmp = ((PyObject*)p->__pyx_v_callback); p->__pyx_v_callback = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_errors); p->__pyx_v_errors = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_remaining_callbacks); p->__pyx_v_remaining_callbacks = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools_spec = { "cassandra.cluster.__pyx_scope_struct_12__set_keyspace_for_all_pools", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_12__set_keyspace_for_all_pools", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_field_names); Py_CLEAR(p->__pyx_v_self); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_field_names) { e = (*v)(p->__pyx_v_field_names, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)o; tmp = ((PyObject*)p->__pyx_v_field_names); p->__pyx_v_field_names = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered_spec = { "cassandra.cluster.__pyx_scope_struct_13_user_type_registered", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_13_user_type_registered", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_14_encode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_14_encode > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_14_encode[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_14_encode]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_14_encode(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_14_encode) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_val); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_14_encode < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_14_encode[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_14_encode++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_14_encode(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_val) { e = (*v)(p->__pyx_v_val, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_14_encode(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_val); p->__pyx_v_val = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_14_encode}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_14_encode}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_14_encode}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_14_encode}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode_spec = { "cassandra.cluster.__pyx_scope_struct_14_encode", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_14_encode", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_14_encode), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_14_encode, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_14_encode, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_14_encode, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_14_encode, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_15_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_15_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_15_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_15_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_15_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_15_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_field_name); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_15_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_15_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_15_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_15_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_field_name) { e = (*v)(p->__pyx_v_field_name, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_15_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_15_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_15_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_15_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_15_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_15_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_15_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_15_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_15_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_16_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_16_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_16_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_16_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_16_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_16_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_host); Py_CLEAR(p->__pyx_v_pool); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_16_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_16_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_16_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_16_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_host) { e = (*v)(p->__pyx_v_host, a); if (e) return e; } if (p->__pyx_v_pool) { e = (*v)(p->__pyx_v_pool, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_16_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_16_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_16_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_16_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_16_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_16_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_16_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_16_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_16_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_17_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_17_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_17_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_17_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_17_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_17_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_nodes); Py_CLEAR(p->__pyx_v_version); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_17_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_17_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_17_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_17_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_nodes) { e = (*v)(p->__pyx_v_nodes, a); if (e) return e; } if (p->__pyx_v_version) { e = (*v)(p->__pyx_v_version, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_17_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_17_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_17_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_17_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_17_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_17_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_17_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_17_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_17_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_18__set_final_result(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_18__set_final_result > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_18__set_final_result[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_18__set_final_result]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_18__set_final_result(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_18__set_final_result) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_response); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_18__set_final_result < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_18__set_final_result[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_18__set_final_result++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_18__set_final_result(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_response) { e = (*v)(p->__pyx_v_response, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_18__set_final_result(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result *)o; tmp = ((PyObject*)p->__pyx_v_response); p->__pyx_v_response = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_18__set_final_result}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_18__set_final_result}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_18__set_final_result}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_18__set_final_result}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result_spec = { "cassandra.cluster.__pyx_scope_struct_18__set_final_result", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_18__set_final_result", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_18__set_final_result), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_18__set_final_result, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_19_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_19_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_19_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_19_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_19_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_19_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_args); Py_CLEAR(p->__pyx_v_fn); Py_CLEAR(p->__pyx_v_kwargs); Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_19_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_19_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_19_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_19_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_args) { e = (*v)(p->__pyx_v_args, a); if (e) return e; } if (p->__pyx_v_fn) { e = (*v)(p->__pyx_v_fn, a); if (e) return e; } if (p->__pyx_v_kwargs) { e = (*v)(p->__pyx_v_kwargs, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_19_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_19_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_19_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_19_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_19_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_19_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_19_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_19_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_19_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_response); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_v_response) { e = (*v)(p->__pyx_v_response, a); if (e) return e; } return 0; } static int __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception(PyObject *o) { PyObject* tmp; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception *)o; tmp = ((PyObject*)p->__pyx_v_response); p->__pyx_v_response = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception}, {Py_tp_clear, (void *)__pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception_spec = { "cassandra.cluster.__pyx_scope_struct_20__set_final_exception", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_20__set_final_exception", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, /*tp_traverse*/ __pyx_tp_clear_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyObject *__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_21_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_21_genexpr > 0) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_21_genexpr[--__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_21_genexpr]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 1); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_21_genexpr(PyObject *o) { struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_21_genexpr) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_genexpr_arg_0); Py_CLEAR(p->__pyx_v_args); Py_CLEAR(p->__pyx_v_fn); Py_CLEAR(p->__pyx_v_kwargs); Py_CLEAR(p->__pyx_t_0); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_21_genexpr < 8) & __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr, sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr)))) { __pyx_mstate_global->__pyx_freelist_9cassandra_7cluster___pyx_scope_struct_21_genexpr[__pyx_mstate_global->__pyx_freecount_9cassandra_7cluster___pyx_scope_struct_21_genexpr++] = ((struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_21_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *p = (struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->__pyx_outer_scope) { e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_genexpr_arg_0) { e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e; } if (p->__pyx_v_args) { e = (*v)(p->__pyx_v_args, a); if (e) return e; } if (p->__pyx_v_fn) { e = (*v)(p->__pyx_v_fn, a); if (e) return e; } if (p->__pyx_v_kwargs) { e = (*v)(p->__pyx_v_kwargs, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_21_genexpr}, {Py_tp_traverse, (void *)__pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_21_genexpr}, {Py_tp_new, (void *)__pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_21_genexpr}, {0, 0}, }; static PyType_Spec __pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr_spec = { "cassandra.cluster.__pyx_scope_struct_21_genexpr", sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, __pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr_slots, }; #else static PyTypeObject __pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cassandra.cluster.""__pyx_scope_struct_21_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_9cassandra_7cluster___pyx_scope_struct_21_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_9cassandra_7cluster___pyx_scope_struct_21_genexpr, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 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_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_9cassandra_7cluster___pyx_scope_struct_21_genexpr, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_9cassandra_7cluster___pyx_scope_struct_21_genexpr, /*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 CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; /* #### Code section: initfunc_declarations ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ /* #### Code section: init_module ### */ static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 297, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults) < (0)) __PYX_ERR(0, 297, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults = &__pyx_type_9cassandra_7cluster___pyx_defaults; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults) < (0)) __PYX_ERR(0, 297, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_defaults1_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1)) __PYX_ERR(0, 409, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_defaults1_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1) < (0)) __PYX_ERR(0, 409, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1 = &__pyx_type_9cassandra_7cluster___pyx_defaults1; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1) < (0)) __PYX_ERR(0, 409, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults1->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_defaults2_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2)) __PYX_ERR(0, 480, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_defaults2_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2) < (0)) __PYX_ERR(0, 480, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2 = &__pyx_type_9cassandra_7cluster___pyx_defaults2; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2) < (0)) __PYX_ERR(0, 480, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_defaults2->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor)) __PYX_ERR(0, 223, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor = &__pyx_type_9cassandra_7cluster___pyx_scope_struct__run_in_executor; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct__run_in_executor->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr)) __PYX_ERR(0, 511, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr) < (0)) __PYX_ERR(0, 511, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_1_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr) < (0)) __PYX_ERR(0, 511, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_1_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr)) __PYX_ERR(0, 515, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 515, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_2_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr) < (0)) __PYX_ERR(0, 515, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_2_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance)) __PYX_ERR(0, 519, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance) < (0)) __PYX_ERR(0, 519, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_3_distance; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance) < (0)) __PYX_ERR(0, 519, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_3_distance->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr)) __PYX_ERR(0, 520, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 520, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_4_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr) < (0)) __PYX_ERR(0, 520, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_4_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add)) __PYX_ERR(0, 2013, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add) < (0)) __PYX_ERR(0, 2013, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_5_on_add; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add) < (0)) __PYX_ERR(0, 2013, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_5_on_add->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr)) __PYX_ERR(0, 2163, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 2163, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_6_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr) < (0)) __PYX_ERR(0, 2163, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_6_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr)) __PYX_ERR(0, 2597, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 2597, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_7_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr) < (0)) __PYX_ERR(0, 2597, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_7_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr)) __PYX_ERR(0, 2600, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 2600, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_8_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr) < (0)) __PYX_ERR(0, 2600, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_8_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool)) __PYX_ERR(0, 3316, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool) < (0)) __PYX_ERR(0, 3316, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool) < (0)) __PYX_ERR(0, 3316, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_9_add_or_renew_pool->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool)) __PYX_ERR(0, 3324, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool) < (0)) __PYX_ERR(0, 3324, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool) < (0)) __PYX_ERR(0, 3324, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_10_run_add_or_renew_pool->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down)) __PYX_ERR(0, 3415, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down) < (0)) __PYX_ERR(0, 3415, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_11_on_down; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down) < (0)) __PYX_ERR(0, 3415, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_11_on_down->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools)) __PYX_ERR(0, 3435, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools) < (0)) __PYX_ERR(0, 3435, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools) < (0)) __PYX_ERR(0, 3435, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_12__set_keyspace_for_all_pools->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered)) __PYX_ERR(0, 3462, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered) < (0)) __PYX_ERR(0, 3462, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered) < (0)) __PYX_ERR(0, 3462, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_13_user_type_registered->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode)) __PYX_ERR(0, 3482, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode) < (0)) __PYX_ERR(0, 3482, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_14_encode; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode) < (0)) __PYX_ERR(0, 3482, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_14_encode->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr)) __PYX_ERR(0, 3483, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr) < (0)) __PYX_ERR(0, 3483, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_15_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr) < (0)) __PYX_ERR(0, 3483, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_15_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr)) __PYX_ERR(0, 3496, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr) < (0)) __PYX_ERR(0, 3496, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_16_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr) < (0)) __PYX_ERR(0, 3496, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_16_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr)) __PYX_ERR(0, 4159, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr) < (0)) __PYX_ERR(0, 4159, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_17_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr) < (0)) __PYX_ERR(0, 4159, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_17_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result)) __PYX_ERR(0, 4929, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result) < (0)) __PYX_ERR(0, 4929, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_18__set_final_result; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result) < (0)) __PYX_ERR(0, 4929, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_18__set_final_result->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr)) __PYX_ERR(0, 4941, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr) < (0)) __PYX_ERR(0, 4941, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_19_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr) < (0)) __PYX_ERR(0, 4941, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_19_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception)) __PYX_ERR(0, 4951, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception) < (0)) __PYX_ERR(0, 4951, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception) < (0)) __PYX_ERR(0, 4951, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_20__set_final_exception->tp_getattro = PyObject_GenericGetAttr; } #endif #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr)) __PYX_ERR(0, 4963, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr_spec, __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr) < (0)) __PYX_ERR(0, 4963, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr = &__pyx_type_9cassandra_7cluster___pyx_scope_struct_21_genexpr; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr) < (0)) __PYX_ERR(0, 4963, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr->tp_dictoffset && __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_9cassandra_7cluster___pyx_scope_struct_21_genexpr->tp_getattro = PyObject_GenericGetAttr; } #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_cluster(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_cluster}, #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING {Py_mod_gil, __Pyx_FREETHREADING_COMPATIBLE}, #endif #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, #endif {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "cluster", __pyx_k_This_module_houses_the_main_cla, /* m_doc */ #if CYTHON_USE_MODULE_STATE sizeof(__pyx_mstatetype), /* m_size */ #else (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif /* PyModInitFuncType */ #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif __Pyx_PyMODINIT_FUNC PyInit_cluster(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_cluster(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } /* ModuleCreationPEP489 */ #if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { { PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think if (!module) { PyErr_Clear(); // just try the 3.8-3.12 version module = PyImport_ImportModule("_xxsubinterpreters"); if (!module) goto bad; } PyObject *current = PyObject_CallMethod(module, "get_current", NULL); Py_DECREF(module); if (!current) goto bad; if (PyTuple_Check(current)) { PyObject *new_current = PySequence_GetItem(current, 0); Py_DECREF(current); current = new_current; if (!new_current) goto bad; } long long as_c_int = PyLong_AsLongLong(current); Py_DECREF(current); return as_c_int; } bad: PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); return -1; } #endif #if !CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { static PY_INT64_T main_interpreter_id = -1; #if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); #elif CYTHON_COMPILING_IN_GRAAL PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); #elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); #elif CYTHON_COMPILING_IN_LIMITED_API PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); #else PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); #endif if (unlikely(current_id == -1)) { return -1; } if (main_interpreter_id == -1) { main_interpreter_id = current_id; return 0; } else if (unlikely(main_interpreter_id != current_id)) { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #endif 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, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); #if !CYTHON_USE_MODULE_STATE if (__Pyx_check_single_interpreter()) return NULL; #endif 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_cluster(PyObject *__pyx_pyinit_module) #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif __pyx_mstatetype *__pyx_mstate = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; 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; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; size_t __pyx_t_12; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; PyObject *(*__pyx_t_15)(PyObject *); int __pyx_t_16; int __pyx_t_17; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'cluster' has already been imported. Re-initialisation is not supported."); return -1; } #else if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_t_1 = __pyx_pyinit_module; Py_INCREF(__pyx_t_1); #else __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #if CYTHON_USE_MODULE_STATE { int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "cluster" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = __pyx_t_1; #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); #endif __pyx_mstate = __pyx_mstate_global; CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_mstate->__pyx_d); __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) /* ImportRefnannyAPI */ #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("PyInit_cluster", 0); __Pyx_init_runtime_version(); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Library function declarations ---*/ /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (__pyx_module_is_main_cassandra__cluster) { if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) } { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "cassandra.cluster")) { if (unlikely((PyDict_SetItemString(modules, "cassandra.cluster", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(__pyx_mstate); (void)__Pyx_modinit_variable_export_code(__pyx_mstate); (void)__Pyx_modinit_function_export_code(__pyx_mstate); if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_type_import_code(__pyx_mstate); (void)__Pyx_modinit_variable_import_code(__pyx_mstate); (void)__Pyx_modinit_function_import_code(__pyx_mstate); /*--- Execution code ---*/ /* "cassandra/cluster.py":22 * """ * * import atexit # <<<<<<<<<<<<<< * from binascii import hexlify * from collections import defaultdict */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_atexit, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_atexit, __pyx_t_2) < (0)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":23 * * import atexit * from binascii import hexlify # <<<<<<<<<<<<<< * from collections import defaultdict * from collections.abc import Mapping */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_hexlify}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_binascii, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_hexlify}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":24 * import atexit * from binascii import hexlify * from collections import defaultdict # <<<<<<<<<<<<<< * from collections.abc import Mapping * from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait as wait_futures */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_defaultdict}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_defaultdict}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":25 * from binascii import hexlify * from collections import defaultdict * from collections.abc import Mapping # <<<<<<<<<<<<<< * from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait as wait_futures * from copy import copy */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_collections_abc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Mapping}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":26 * from collections import defaultdict * from collections.abc import Mapping * from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait as wait_futures # <<<<<<<<<<<<<< * from copy import copy * from functools import partial, reduce, wraps */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ThreadPoolExecutor,__pyx_mstate_global->__pyx_n_u_FIRST_COMPLETED,__pyx_mstate_global->__pyx_n_u_wait}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_concurrent_futures, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ThreadPoolExecutor,__pyx_mstate_global->__pyx_n_u_FIRST_COMPLETED,__pyx_mstate_global->__pyx_n_u_wait}; for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); switch (__pyx_t_3) { case 2: if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_wait_futures, __pyx_t_4) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) break; default:; if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 26, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":27 * from collections.abc import Mapping * from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait as wait_futures * from copy import copy # <<<<<<<<<<<<<< * from functools import partial, reduce, wraps * from itertools import groupby, count, chain */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_copy}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_copy, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_copy}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":28 * from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait as wait_futures * from copy import copy * from functools import partial, reduce, wraps # <<<<<<<<<<<<<< * from itertools import groupby, count, chain * import json */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_partial,__pyx_mstate_global->__pyx_n_u_reduce,__pyx_mstate_global->__pyx_n_u_wraps}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_functools, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_partial,__pyx_mstate_global->__pyx_n_u_reduce,__pyx_mstate_global->__pyx_n_u_wraps}; for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":29 * from copy import copy * from functools import partial, reduce, wraps * from itertools import groupby, count, chain # <<<<<<<<<<<<<< * import json * import logging */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_groupby,__pyx_mstate_global->__pyx_n_u_count,__pyx_mstate_global->__pyx_n_u_chain}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_itertools, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_groupby,__pyx_mstate_global->__pyx_n_u_count,__pyx_mstate_global->__pyx_n_u_chain}; for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 29, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":30 * from functools import partial, reduce, wraps * from itertools import groupby, count, chain * import json # <<<<<<<<<<<<<< * import logging * from warnings import warn */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_json, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_json, __pyx_t_2) < (0)) __PYX_ERR(0, 30, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":31 * from itertools import groupby, count, chain * import json * import logging # <<<<<<<<<<<<<< * from warnings import warn * from random import random */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":32 * import json * import logging * from warnings import warn # <<<<<<<<<<<<<< * from random import random * import re */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_warn}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_warnings_2, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_warn}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":33 * import logging * from warnings import warn * from random import random # <<<<<<<<<<<<<< * import re * import queue */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_random}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_random, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_random}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":34 * from warnings import warn * from random import random * import re # <<<<<<<<<<<<<< * import queue * import socket */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_re, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_re, __pyx_t_2) < (0)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":35 * from random import random * import re * import queue # <<<<<<<<<<<<<< * import socket * import sys */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_queue, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_queue, __pyx_t_2) < (0)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":36 * import re * import queue * import socket # <<<<<<<<<<<<<< * import sys * import time */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_socket, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_socket, __pyx_t_2) < (0)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":37 * import queue * import socket * import sys # <<<<<<<<<<<<<< * import time * from threading import Lock, RLock, Thread, Event */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":38 * import socket * import sys * import time # <<<<<<<<<<<<<< * from threading import Lock, RLock, Thread, Event * import uuid */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_time, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_time, __pyx_t_2) < (0)) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":39 * import sys * import time * from threading import Lock, RLock, Thread, Event # <<<<<<<<<<<<<< * import uuid * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Lock,__pyx_mstate_global->__pyx_n_u_RLock,__pyx_mstate_global->__pyx_n_u_Thread,__pyx_mstate_global->__pyx_n_u_Event}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_threading, __pyx_imported_names, 4, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Lock,__pyx_mstate_global->__pyx_n_u_RLock,__pyx_mstate_global->__pyx_n_u_Thread,__pyx_mstate_global->__pyx_n_u_Event}; for (__pyx_t_3=0; __pyx_t_3 < 4; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":40 * import time * from threading import Lock, RLock, Thread, Event * import uuid # <<<<<<<<<<<<<< * * import weakref */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_uuid, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_uuid, __pyx_t_2) < (0)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":42 * import uuid * * import weakref # <<<<<<<<<<<<<< * from weakref import WeakValueDictionary * */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_weakref, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_weakref, __pyx_t_2) < (0)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":43 * * import weakref * from weakref import WeakValueDictionary # <<<<<<<<<<<<<< * * from cassandra import (ConsistencyLevel, AuthenticationFailed, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WeakValueDictionary}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_weakref, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WeakValueDictionary}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":45 * from weakref import WeakValueDictionary * * from cassandra import (ConsistencyLevel, AuthenticationFailed, # <<<<<<<<<<<<<< * OperationTimedOut, UnsupportedOperation, * SchemaTargetType, DriverException, ProtocolVersion, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ConsistencyLevel,__pyx_mstate_global->__pyx_n_u_AuthenticationFailed,__pyx_mstate_global->__pyx_n_u_OperationTimedOut,__pyx_mstate_global->__pyx_n_u_UnsupportedOperation,__pyx_mstate_global->__pyx_n_u_SchemaTargetType,__pyx_mstate_global->__pyx_n_u_DriverException,__pyx_mstate_global->__pyx_n_u_ProtocolVersion,__pyx_mstate_global->__pyx_n_u_UnresolvableContactPoints,__pyx_mstate_global->__pyx_n_u_DependencyException}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra, __pyx_imported_names, 9, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ConsistencyLevel,__pyx_mstate_global->__pyx_n_u_AuthenticationFailed,__pyx_mstate_global->__pyx_n_u_OperationTimedOut,__pyx_mstate_global->__pyx_n_u_UnsupportedOperation,__pyx_mstate_global->__pyx_n_u_SchemaTargetType,__pyx_mstate_global->__pyx_n_u_DriverException,__pyx_mstate_global->__pyx_n_u_ProtocolVersion,__pyx_mstate_global->__pyx_n_u_UnresolvableContactPoints,__pyx_mstate_global->__pyx_n_u_DependencyException}; for (__pyx_t_3=0; __pyx_t_3 < 9; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":49 * SchemaTargetType, DriverException, ProtocolVersion, * UnresolvableContactPoints, DependencyException) * from cassandra.auth import _proxy_execute_key, PlainTextAuthProvider # <<<<<<<<<<<<<< * from cassandra.connection import (ConnectionException, ConnectionShutdown, * ConnectionHeartbeat, ProtocolVersionUnsupported, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_proxy_execute_key,__pyx_mstate_global->__pyx_n_u_PlainTextAuthProvider}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_auth, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_proxy_execute_key,__pyx_mstate_global->__pyx_n_u_PlainTextAuthProvider}; for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":50 * UnresolvableContactPoints, DependencyException) * from cassandra.auth import _proxy_execute_key, PlainTextAuthProvider * from cassandra.connection import (ConnectionException, ConnectionShutdown, # <<<<<<<<<<<<<< * ConnectionHeartbeat, ProtocolVersionUnsupported, * EndPoint, DefaultEndPoint, DefaultEndPointFactory, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ConnectionException,__pyx_mstate_global->__pyx_n_u_ConnectionShutdown,__pyx_mstate_global->__pyx_n_u_ConnectionHeartbeat,__pyx_mstate_global->__pyx_n_u_ProtocolVersionUnsupported,__pyx_mstate_global->__pyx_n_u_EndPoint,__pyx_mstate_global->__pyx_n_u_DefaultEndPoint,__pyx_mstate_global->__pyx_n_u_DefaultEndPointFactory,__pyx_mstate_global->__pyx_n_u_ContinuousPagingState,__pyx_mstate_global->__pyx_n_u_SniEndPointFactory,__pyx_mstate_global->__pyx_n_u_ConnectionBusy}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_connection, __pyx_imported_names, 10, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ConnectionException,__pyx_mstate_global->__pyx_n_u_ConnectionShutdown,__pyx_mstate_global->__pyx_n_u_ConnectionHeartbeat,__pyx_mstate_global->__pyx_n_u_ProtocolVersionUnsupported,__pyx_mstate_global->__pyx_n_u_EndPoint,__pyx_mstate_global->__pyx_n_u_DefaultEndPoint,__pyx_mstate_global->__pyx_n_u_DefaultEndPointFactory,__pyx_mstate_global->__pyx_n_u_ContinuousPagingState,__pyx_mstate_global->__pyx_n_u_SniEndPointFactory,__pyx_mstate_global->__pyx_n_u_ConnectionBusy}; for (__pyx_t_3=0; __pyx_t_3 < 10; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":54 * EndPoint, DefaultEndPoint, DefaultEndPointFactory, * ContinuousPagingState, SniEndPointFactory, ConnectionBusy) * from cassandra.cqltypes import UserType # <<<<<<<<<<<<<< * from cassandra.encoder import Encoder * from cassandra.protocol import (QueryMessage, ResultMessage, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_UserType}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_cqltypes, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_UserType}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":55 * ContinuousPagingState, SniEndPointFactory, ConnectionBusy) * from cassandra.cqltypes import UserType * from cassandra.encoder import Encoder # <<<<<<<<<<<<<< * from cassandra.protocol import (QueryMessage, ResultMessage, * ErrorMessage, ReadTimeoutErrorMessage, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Encoder}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_encoder, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Encoder}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":56 * from cassandra.cqltypes import UserType * from cassandra.encoder import Encoder * from cassandra.protocol import (QueryMessage, ResultMessage, # <<<<<<<<<<<<<< * ErrorMessage, ReadTimeoutErrorMessage, * WriteTimeoutErrorMessage, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_QueryMessage,__pyx_mstate_global->__pyx_n_u_ResultMessage,__pyx_mstate_global->__pyx_n_u_ErrorMessage,__pyx_mstate_global->__pyx_n_u_ReadTimeoutErrorMessage,__pyx_mstate_global->__pyx_n_u_WriteTimeoutErrorMessage,__pyx_mstate_global->__pyx_n_u_UnavailableErrorMessage,__pyx_mstate_global->__pyx_n_u_OverloadedErrorMessage,__pyx_mstate_global->__pyx_n_u_PrepareMessage,__pyx_mstate_global->__pyx_n_u_ExecuteMessage,__pyx_mstate_global->__pyx_n_u_PreparedQueryNotFound,__pyx_mstate_global->__pyx_n_u_IsBootstrappingErrorMessage,__pyx_mstate_global->__pyx_n_u_TruncateError,__pyx_mstate_global->__pyx_n_u_ServerError,__pyx_mstate_global->__pyx_n_u_BatchMessage,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_PREPARED,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_SET_KEYSPACE,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_ROWS,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_SCHEMA_CHANGE,__pyx_mstate_global->__pyx_n_u_ProtocolHandler_2,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_VOID,__pyx_mstate_global->__pyx_n_u_ProtocolException}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_protocol, __pyx_imported_names, 21, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_QueryMessage,__pyx_mstate_global->__pyx_n_u_ResultMessage,__pyx_mstate_global->__pyx_n_u_ErrorMessage,__pyx_mstate_global->__pyx_n_u_ReadTimeoutErrorMessage,__pyx_mstate_global->__pyx_n_u_WriteTimeoutErrorMessage,__pyx_mstate_global->__pyx_n_u_UnavailableErrorMessage,__pyx_mstate_global->__pyx_n_u_OverloadedErrorMessage,__pyx_mstate_global->__pyx_n_u_PrepareMessage,__pyx_mstate_global->__pyx_n_u_ExecuteMessage,__pyx_mstate_global->__pyx_n_u_PreparedQueryNotFound,__pyx_mstate_global->__pyx_n_u_IsBootstrappingErrorMessage,__pyx_mstate_global->__pyx_n_u_TruncateError,__pyx_mstate_global->__pyx_n_u_ServerError,__pyx_mstate_global->__pyx_n_u_BatchMessage,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_PREPARED,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_SET_KEYSPACE,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_ROWS,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_SCHEMA_CHANGE,__pyx_mstate_global->__pyx_n_u_ProtocolHandler_2,__pyx_mstate_global->__pyx_n_u_RESULT_KIND_VOID,__pyx_mstate_global->__pyx_n_u_ProtocolException}; for (__pyx_t_3=0; __pyx_t_3 < 21; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":69 * RESULT_KIND_SCHEMA_CHANGE, ProtocolHandler, * RESULT_KIND_VOID, ProtocolException) * from cassandra.metadata import Metadata, protect_name, murmur3, _NodeInfo # <<<<<<<<<<<<<< * from cassandra.policies import (TokenAwarePolicy, DCAwareRoundRobinPolicy, SimpleConvictionPolicy, * ExponentialReconnectionPolicy, HostDistance, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Metadata,__pyx_mstate_global->__pyx_n_u_protect_name,__pyx_mstate_global->__pyx_n_u_murmur3,__pyx_mstate_global->__pyx_n_u_NodeInfo}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_metadata, __pyx_imported_names, 4, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Metadata,__pyx_mstate_global->__pyx_n_u_protect_name,__pyx_mstate_global->__pyx_n_u_murmur3,__pyx_mstate_global->__pyx_n_u_NodeInfo}; for (__pyx_t_3=0; __pyx_t_3 < 4; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":70 * RESULT_KIND_VOID, ProtocolException) * from cassandra.metadata import Metadata, protect_name, murmur3, _NodeInfo * from cassandra.policies import (TokenAwarePolicy, DCAwareRoundRobinPolicy, SimpleConvictionPolicy, # <<<<<<<<<<<<<< * ExponentialReconnectionPolicy, HostDistance, * RetryPolicy, IdentityTranslator, NoSpeculativeExecutionPlan, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TokenAwarePolicy,__pyx_mstate_global->__pyx_n_u_DCAwareRoundRobinPolicy,__pyx_mstate_global->__pyx_n_u_SimpleConvictionPolicy,__pyx_mstate_global->__pyx_n_u_ExponentialReconnectionPolicy,__pyx_mstate_global->__pyx_n_u_HostDistance,__pyx_mstate_global->__pyx_n_u_RetryPolicy,__pyx_mstate_global->__pyx_n_u_IdentityTranslator,__pyx_mstate_global->__pyx_n_u_NoSpeculativeExecutionPlan,__pyx_mstate_global->__pyx_n_u_NoSpeculativeExecutionPolicy,__pyx_mstate_global->__pyx_n_u_DefaultLoadBalancingPolicy,__pyx_mstate_global->__pyx_n_u_NeverRetryPolicy}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_policies, __pyx_imported_names, 11, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TokenAwarePolicy,__pyx_mstate_global->__pyx_n_u_DCAwareRoundRobinPolicy,__pyx_mstate_global->__pyx_n_u_SimpleConvictionPolicy,__pyx_mstate_global->__pyx_n_u_ExponentialReconnectionPolicy,__pyx_mstate_global->__pyx_n_u_HostDistance,__pyx_mstate_global->__pyx_n_u_RetryPolicy,__pyx_mstate_global->__pyx_n_u_IdentityTranslator,__pyx_mstate_global->__pyx_n_u_NoSpeculativeExecutionPlan,__pyx_mstate_global->__pyx_n_u_NoSpeculativeExecutionPolicy,__pyx_mstate_global->__pyx_n_u_DefaultLoadBalancingPolicy,__pyx_mstate_global->__pyx_n_u_NeverRetryPolicy}; for (__pyx_t_3=0; __pyx_t_3 < 11; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":75 * NoSpeculativeExecutionPolicy, DefaultLoadBalancingPolicy, * NeverRetryPolicy) * from cassandra.pool import (Host, _ReconnectionHandler, _HostReconnectionHandler, # <<<<<<<<<<<<<< * HostConnectionPool, HostConnection, * NoConnectionsAvailable) */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Host,__pyx_mstate_global->__pyx_n_u_ReconnectionHandler,__pyx_mstate_global->__pyx_n_u_HostReconnectionHandler,__pyx_mstate_global->__pyx_n_u_HostConnectionPool,__pyx_mstate_global->__pyx_n_u_HostConnection,__pyx_mstate_global->__pyx_n_u_NoConnectionsAvailable}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_pool, __pyx_imported_names, 6, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Host,__pyx_mstate_global->__pyx_n_u_ReconnectionHandler,__pyx_mstate_global->__pyx_n_u_HostReconnectionHandler,__pyx_mstate_global->__pyx_n_u_HostConnectionPool,__pyx_mstate_global->__pyx_n_u_HostConnection,__pyx_mstate_global->__pyx_n_u_NoConnectionsAvailable}; for (__pyx_t_3=0; __pyx_t_3 < 6; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":78 * HostConnectionPool, HostConnection, * NoConnectionsAvailable) * from cassandra.query import (SimpleStatement, PreparedStatement, BoundStatement, # <<<<<<<<<<<<<< * BatchStatement, bind_params, QueryTrace, TraceUnavailable, * named_tuple_factory, dict_factory, tuple_factory, FETCH_SIZE_UNSET, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SimpleStatement,__pyx_mstate_global->__pyx_n_u_PreparedStatement,__pyx_mstate_global->__pyx_n_u_BoundStatement,__pyx_mstate_global->__pyx_n_u_BatchStatement,__pyx_mstate_global->__pyx_n_u_bind_params,__pyx_mstate_global->__pyx_n_u_QueryTrace,__pyx_mstate_global->__pyx_n_u_TraceUnavailable,__pyx_mstate_global->__pyx_n_u_named_tuple_factory,__pyx_mstate_global->__pyx_n_u_dict_factory,__pyx_mstate_global->__pyx_n_u_tuple_factory,__pyx_mstate_global->__pyx_n_u_FETCH_SIZE_UNSET,__pyx_mstate_global->__pyx_n_u_HostTargetingStatement}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_query, __pyx_imported_names, 12, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_SimpleStatement,__pyx_mstate_global->__pyx_n_u_PreparedStatement,__pyx_mstate_global->__pyx_n_u_BoundStatement,__pyx_mstate_global->__pyx_n_u_BatchStatement,__pyx_mstate_global->__pyx_n_u_bind_params,__pyx_mstate_global->__pyx_n_u_QueryTrace,__pyx_mstate_global->__pyx_n_u_TraceUnavailable,__pyx_mstate_global->__pyx_n_u_named_tuple_factory,__pyx_mstate_global->__pyx_n_u_dict_factory,__pyx_mstate_global->__pyx_n_u_tuple_factory,__pyx_mstate_global->__pyx_n_u_FETCH_SIZE_UNSET,__pyx_mstate_global->__pyx_n_u_HostTargetingStatement}; for (__pyx_t_3=0; __pyx_t_3 < 12; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":82 * named_tuple_factory, dict_factory, tuple_factory, FETCH_SIZE_UNSET, * HostTargetingStatement) * from cassandra.marshal import int64_pack # <<<<<<<<<<<<<< * from cassandra.timestamps import MonotonicTimestampGenerator * from cassandra.util import _resolve_contact_points_to_string_map, Version */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_int64_pack}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_marshal, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_int64_pack}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":83 * HostTargetingStatement) * from cassandra.marshal import int64_pack * from cassandra.timestamps import MonotonicTimestampGenerator # <<<<<<<<<<<<<< * from cassandra.util import _resolve_contact_points_to_string_map, Version * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MonotonicTimestampGenerator}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_timestamps, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MonotonicTimestampGenerator}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":84 * from cassandra.marshal import int64_pack * from cassandra.timestamps import MonotonicTimestampGenerator * from cassandra.util import _resolve_contact_points_to_string_map, Version # <<<<<<<<<<<<<< * * from cassandra.datastax.insights.reporter import MonitorReporter */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_resolve_contact_points_to_strin,__pyx_mstate_global->__pyx_n_u_Version}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_util, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_resolve_contact_points_to_strin,__pyx_mstate_global->__pyx_n_u_Version}; for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":86 * from cassandra.util import _resolve_contact_points_to_string_map, Version * * from cassandra.datastax.insights.reporter import MonitorReporter # <<<<<<<<<<<<<< * from cassandra.datastax.insights.util import version_supports_insights * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MonitorReporter}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_datastax_insights_repo, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_MonitorReporter}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":87 * * from cassandra.datastax.insights.reporter import MonitorReporter * from cassandra.datastax.insights.util import version_supports_insights # <<<<<<<<<<<<<< * * from cassandra.datastax.graph import (graph_object_row_factory, GraphOptions, GraphSON1Serializer, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_version_supports_insights}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_datastax_insights_util, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_version_supports_insights}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":89 * from cassandra.datastax.insights.util import version_supports_insights * * from cassandra.datastax.graph import (graph_object_row_factory, GraphOptions, GraphSON1Serializer, # <<<<<<<<<<<<<< * GraphProtocol, GraphSON2Serializer, GraphStatement, SimpleGraphStatement, * graph_graphson2_row_factory, graph_graphson3_row_factory, */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_graph_object_row_factory,__pyx_mstate_global->__pyx_n_u_GraphOptions,__pyx_mstate_global->__pyx_n_u_GraphSON1Serializer,__pyx_mstate_global->__pyx_n_u_GraphProtocol,__pyx_mstate_global->__pyx_n_u_GraphSON2Serializer,__pyx_mstate_global->__pyx_n_u_GraphStatement,__pyx_mstate_global->__pyx_n_u_SimpleGraphStatement,__pyx_mstate_global->__pyx_n_u_graph_graphson2_row_factory,__pyx_mstate_global->__pyx_n_u_graph_graphson3_row_factory,__pyx_mstate_global->__pyx_n_u_GraphSON3Serializer}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_datastax_graph, __pyx_imported_names, 10, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_graph_object_row_factory,__pyx_mstate_global->__pyx_n_u_GraphOptions,__pyx_mstate_global->__pyx_n_u_GraphSON1Serializer,__pyx_mstate_global->__pyx_n_u_GraphProtocol,__pyx_mstate_global->__pyx_n_u_GraphSON2Serializer,__pyx_mstate_global->__pyx_n_u_GraphStatement,__pyx_mstate_global->__pyx_n_u_SimpleGraphStatement,__pyx_mstate_global->__pyx_n_u_graph_graphson2_row_factory,__pyx_mstate_global->__pyx_n_u_graph_graphson3_row_factory,__pyx_mstate_global->__pyx_n_u_GraphSON3Serializer}; for (__pyx_t_3=0; __pyx_t_3 < 10; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":93 * graph_graphson2_row_factory, graph_graphson3_row_factory, * GraphSON3Serializer) * from cassandra.datastax.graph.query import _request_timeout_key, _GraphSONContextRowFactory # <<<<<<<<<<<<<< * from cassandra.datastax import cloud as dscloud * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_request_timeout_key,__pyx_mstate_global->__pyx_n_u_GraphSONContextRowFactory}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_datastax_graph_query, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_request_timeout_key,__pyx_mstate_global->__pyx_n_u_GraphSONContextRowFactory}; for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":94 * GraphSON3Serializer) * from cassandra.datastax.graph.query import _request_timeout_key, _GraphSONContextRowFactory * from cassandra.datastax import cloud as dscloud # <<<<<<<<<<<<<< * * try: */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cloud}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_datastax, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_cloud}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); switch (__pyx_t_3) { case 0: if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_dscloud, __pyx_t_4) < (0)) __PYX_ERR(0, 94, __pyx_L1_error) break; default:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":96 * from cassandra.datastax import cloud as dscloud * * try: # <<<<<<<<<<<<<< * from cassandra.io.twistedreactor import TwistedConnection * except ImportError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":97 * * try: * from cassandra.io.twistedreactor import TwistedConnection # <<<<<<<<<<<<<< * except ImportError: * TwistedConnection = None */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TwistedConnection}; __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_twistedreactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 97, __pyx_L2_error) } __pyx_t_2 = __pyx_t_7; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_TwistedConnection}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L2_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 97, __pyx_L2_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":96 * from cassandra.datastax import cloud as dscloud * * try: # <<<<<<<<<<<<<< * from cassandra.io.twistedreactor import TwistedConnection * except ImportError: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_try_end; __pyx_L2_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":98 * try: * from cassandra.io.twistedreactor import TwistedConnection * except ImportError: # <<<<<<<<<<<<<< * TwistedConnection = None * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); if (__pyx_t_8) { __Pyx_AddTraceback("cassandra.cluster", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 98, __pyx_L4_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":99 * from cassandra.io.twistedreactor import TwistedConnection * except ImportError: * TwistedConnection = None # <<<<<<<<<<<<<< * * try: */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_TwistedConnection, Py_None) < (0)) __PYX_ERR(0, 99, __pyx_L4_except_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L3_exception_handled; } goto __pyx_L4_except_error; /* "cassandra/cluster.py":96 * from cassandra.datastax import cloud as dscloud * * try: # <<<<<<<<<<<<<< * from cassandra.io.twistedreactor import TwistedConnection * except ImportError: */ __pyx_L4_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L3_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_L7_try_end:; } /* "cassandra/cluster.py":101 * TwistedConnection = None * * try: # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * # PYTHON-1364 */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1); __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { /* "cassandra/cluster.py":102 * * try: * from cassandra.io.eventletreactor import EventletConnection # <<<<<<<<<<<<<< * # PYTHON-1364 * # */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_EventletConnection}; __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_io_eventletreactor, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 102, __pyx_L10_error) } __pyx_t_9 = __pyx_t_7; __Pyx_GOTREF(__pyx_t_9); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_EventletConnection}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_9, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 102, __pyx_L10_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":101 * TwistedConnection = None * * try: # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * # PYTHON-1364 */ } __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L15_try_end; __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":107 * # At the moment eventlet initialization is chucking AttributeErrors due to its dependence on pyOpenSSL * # and some changes in Python 3.12 which have some knock-on effects there. * except (ImportError, AttributeError): # <<<<<<<<<<<<<< * EventletConnection = None * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches2(((PyObject *)(((PyTypeObject*)PyExc_ImportError))), ((PyObject *)(((PyTypeObject*)PyExc_AttributeError)))); if (__pyx_t_8) { __Pyx_AddTraceback("cassandra.cluster", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L12_except_error) __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); /* "cassandra/cluster.py":108 * # and some changes in Python 3.12 which have some knock-on effects there. * except (ImportError, AttributeError): * EventletConnection = None # <<<<<<<<<<<<<< * * try: */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EventletConnection, Py_None) < (0)) __PYX_ERR(0, 108, __pyx_L12_except_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L11_exception_handled; } goto __pyx_L12_except_error; /* "cassandra/cluster.py":101 * TwistedConnection = None * * try: # <<<<<<<<<<<<<< * from cassandra.io.eventletreactor import EventletConnection * # PYTHON-1364 */ __pyx_L12_except_error:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_1); goto __pyx_L1_error; __pyx_L11_exception_handled:; __Pyx_XGIVEREF(__pyx_t_6); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_5, __pyx_t_1); __pyx_L15_try_end:; } /* "cassandra/cluster.py":110 * EventletConnection = None * * try: # <<<<<<<<<<<<<< * from weakref import WeakSet * except ImportError: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { /* "cassandra/cluster.py":111 * * try: * from weakref import WeakSet # <<<<<<<<<<<<<< * except ImportError: * from cassandra.util import WeakSet # NOQA */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WeakSet}; __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_weakref, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 111, __pyx_L18_error) } __pyx_t_2 = __pyx_t_7; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WeakSet}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(0, 111, __pyx_L18_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":110 * EventletConnection = None * * try: # <<<<<<<<<<<<<< * from weakref import WeakSet * except ImportError: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L23_try_end; __pyx_L18_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":112 * try: * from weakref import WeakSet * except ImportError: # <<<<<<<<<<<<<< * from cassandra.util import WeakSet # NOQA * */ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_ImportError)))); if (__pyx_t_8) { __Pyx_AddTraceback("cassandra.cluster", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_9) < 0) __PYX_ERR(0, 112, __pyx_L20_except_error) __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_9); /* "cassandra/cluster.py":113 * from weakref import WeakSet * except ImportError: * from cassandra.util import WeakSet # NOQA # <<<<<<<<<<<<<< * * def _is_gevent_monkey_patched(): */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WeakSet}; __pyx_t_7 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_cassandra_util, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 113, __pyx_L20_except_error) } __pyx_t_10 = __pyx_t_7; __Pyx_GOTREF(__pyx_t_10); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_WeakSet}; __pyx_t_3 = 0; { __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_10, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 113, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_11) < (0)) __PYX_ERR(0, 113, __pyx_L20_except_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L19_exception_handled; } goto __pyx_L20_except_error; /* "cassandra/cluster.py":110 * EventletConnection = None * * try: # <<<<<<<<<<<<<< * from weakref import WeakSet * except ImportError: */ __pyx_L20_except_error:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); goto __pyx_L1_error; __pyx_L19_exception_handled:; __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_6); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_5, __pyx_t_6); __pyx_L23_try_end:; } /* "cassandra/cluster.py":115 * from cassandra.util import WeakSet # NOQA * * def _is_gevent_monkey_patched(): # <<<<<<<<<<<<<< * if 'gevent.monkey' not in sys.modules: * return False */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_1_is_gevent_monkey_patched, 0, __pyx_mstate_global->__pyx_n_u_is_gevent_monkey_patched, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_gevent_monkey_patched, __pyx_t_9) < (0)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":121 * return socket.socket is gevent.socket.socket * * def _try_gevent_import(): # <<<<<<<<<<<<<< * if _is_gevent_monkey_patched(): * from cassandra.io.geventreactor import GeventConnection */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_3_try_gevent_import, 0, __pyx_mstate_global->__pyx_n_u_try_gevent_import, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_try_gevent_import, __pyx_t_9) < (0)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":128 * return (None,None) * * def _is_eventlet_monkey_patched(): # <<<<<<<<<<<<<< * if 'eventlet.patcher' not in sys.modules: * return False */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_5_is_eventlet_monkey_patched, 0, __pyx_mstate_global->__pyx_n_u_is_eventlet_monkey_patched, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_is_eventlet_monkey_patched, __pyx_t_9) < (0)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":138 * return False * * def _try_eventlet_import(): # <<<<<<<<<<<<<< * if _is_eventlet_monkey_patched(): * from cassandra.io.eventletreactor import EventletConnection */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7_try_eventlet_import, 0, __pyx_mstate_global->__pyx_n_u_try_eventlet_import, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_try_eventlet_import, __pyx_t_9) < (0)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":145 * return (None,None) * * def _try_libev_import(): # <<<<<<<<<<<<<< * try: * from cassandra.io.libevreactor import LibevConnection */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9_try_libev_import, 0, __pyx_mstate_global->__pyx_n_u_try_libev_import, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_try_libev_import, __pyx_t_9) < (0)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":152 * return (None, e) * * def _try_asyncore_import(): # <<<<<<<<<<<<<< * try: * from cassandra.io.asyncorereactor import AsyncoreConnection */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_11_try_asyncore_import, 0, __pyx_mstate_global->__pyx_n_u_try_asyncore_import, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_try_asyncore_import, __pyx_t_9) < (0)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":159 * return (None, e) * * def _connection_reduce_fn(val,import_fn): # <<<<<<<<<<<<<< * (rv, excs) = val * # If we've already found a workable Connection class return immediately */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_13_connection_reduce_fn, 0, __pyx_mstate_global->__pyx_n_u_connection_reduce_fn, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_connection_reduce_fn, __pyx_t_9) < (0)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":169 * return (rv or import_result, excs) * * log = logging.getLogger(__name__) # <<<<<<<<<<<<<< * * conn_fns = (_try_gevent_import, _try_eventlet_import, _try_libev_import, _try_asyncore_import) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_log, __pyx_t_9) < (0)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":171 * log = logging.getLogger(__name__) * * conn_fns = (_try_gevent_import, _try_eventlet_import, _try_libev_import, _try_asyncore_import) # <<<<<<<<<<<<<< * (conn_class, excs) = reduce(_connection_reduce_fn, conn_fns, (None,[])) * if not conn_class: */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_try_gevent_import); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_try_eventlet_import); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_try_libev_import); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_try_asyncore_import); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = PyTuple_Pack(4, __pyx_t_9, __pyx_t_10, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_conn_fns, __pyx_t_11) < (0)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":172 * * conn_fns = (_try_gevent_import, _try_eventlet_import, _try_libev_import, _try_asyncore_import) * (conn_class, excs) = reduce(_connection_reduce_fn, conn_fns, (None,[])) # <<<<<<<<<<<<<< * if not conn_class: * raise DependencyException("Unable to load a default connection class", excs) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_connection_reduce_fn); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_conn_fns); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = PyTuple_Pack(2, Py_None, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_12 = 1; { PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_t_10, __pyx_t_9, __pyx_t_14}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (4-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(0, 172, __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_INCREF(__pyx_t_2); __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_14); } else { __pyx_t_2 = __Pyx_PyList_GetItemRefFast(sequence, 0, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyList_GetItemRefFast(sequence, 1, __Pyx_ReferenceSharing_SharedReference); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_XGOTREF(__pyx_t_14); } #else __pyx_t_2 = __Pyx_PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_15 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); index = 0; __pyx_t_2 = __pyx_t_15(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_14 = __pyx_t_15(__pyx_t_9); if (unlikely(!__pyx_t_14)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_14); if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_9), 2) < (0)) __PYX_ERR(0, 172, __pyx_L1_error) __pyx_t_15 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L27_unpacking_done; __pyx_L26_unpacking_failed:; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_15 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); __PYX_ERR(0, 172, __pyx_L1_error) __pyx_L27_unpacking_done:; } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_conn_class, __pyx_t_2) < (0)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_excs, __pyx_t_14) < (0)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":173 * conn_fns = (_try_gevent_import, _try_eventlet_import, _try_libev_import, _try_asyncore_import) * (conn_class, excs) = reduce(_connection_reduce_fn, conn_fns, (None,[])) * if not conn_class: # <<<<<<<<<<<<<< * raise DependencyException("Unable to load a default connection class", excs) * DefaultConnection = conn_class */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_conn_class); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_16 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_17 = (!__pyx_t_16); if (unlikely(__pyx_t_17)) { /* "cassandra/cluster.py":174 * (conn_class, excs) = reduce(_connection_reduce_fn, conn_fns, (None,[])) * if not conn_class: * raise DependencyException("Unable to load a default connection class", excs) # <<<<<<<<<<<<<< * DefaultConnection = conn_class * */ __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_DependencyException); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_excs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = 1; { PyObject *__pyx_callargs[3] = {__pyx_t_14, __pyx_mstate_global->__pyx_kp_u_Unable_to_load_a_default_connect, __pyx_t_9}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (3-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __PYX_ERR(0, 174, __pyx_L1_error) /* "cassandra/cluster.py":173 * conn_fns = (_try_gevent_import, _try_eventlet_import, _try_libev_import, _try_asyncore_import) * (conn_class, excs) = reduce(_connection_reduce_fn, conn_fns, (None,[])) * if not conn_class: # <<<<<<<<<<<<<< * raise DependencyException("Unable to load a default connection class", excs) * DefaultConnection = conn_class */ } /* "cassandra/cluster.py":175 * if not conn_class: * raise DependencyException("Unable to load a default connection class", excs) * DefaultConnection = conn_class # <<<<<<<<<<<<<< * * # Forces load of utf8 encoding module to avoid deadlock that occurs */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_conn_class); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DefaultConnection, __pyx_t_11) < (0)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":184 * * * DEFAULT_MIN_REQUESTS = 5 # <<<<<<<<<<<<<< * DEFAULT_MAX_REQUESTS = 100 * */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_REQUESTS, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(0, 184, __pyx_L1_error) /* "cassandra/cluster.py":185 * * DEFAULT_MIN_REQUESTS = 5 * DEFAULT_MAX_REQUESTS = 100 # <<<<<<<<<<<<<< * * DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST = 2 */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_REQUESTS, __pyx_mstate_global->__pyx_int_100) < (0)) __PYX_ERR(0, 185, __pyx_L1_error) /* "cassandra/cluster.py":187 * DEFAULT_MAX_REQUESTS = 100 * * DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST = 2 # <<<<<<<<<<<<<< * DEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOST = 8 * */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_CONNECTIONS_PER_LOCA, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 187, __pyx_L1_error) /* "cassandra/cluster.py":188 * * DEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOST = 2 * DEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOST = 8 # <<<<<<<<<<<<<< * * DEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOST = 1 */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_CONNECTIONS_PER_LOCA, __pyx_mstate_global->__pyx_int_8) < (0)) __PYX_ERR(0, 188, __pyx_L1_error) /* "cassandra/cluster.py":190 * DEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOST = 8 * * DEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOST = 1 # <<<<<<<<<<<<<< * DEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOST = 2 * */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_MIN_CONNECTIONS_PER_REMO, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 190, __pyx_L1_error) /* "cassandra/cluster.py":191 * * DEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOST = 1 * DEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOST = 2 # <<<<<<<<<<<<<< * * _GRAPH_PAGING_MIN_DSE_VERSION = Version('6.8.0') */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_DEFAULT_MAX_CONNECTIONS_PER_REMO, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 191, __pyx_L1_error) /* "cassandra/cluster.py":193 * DEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOST = 2 * * _GRAPH_PAGING_MIN_DSE_VERSION = Version('6.8.0') # <<<<<<<<<<<<<< * * _NOT_SET = object() */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Version); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_6_8_0}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_9, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_GRAPH_PAGING_MIN_DSE_VERSION, __pyx_t_11) < (0)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":195 * _GRAPH_PAGING_MIN_DSE_VERSION = Version('6.8.0') * * _NOT_SET = object() # <<<<<<<<<<<<<< * * */ __pyx_t_9 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NOT_SET, __pyx_t_11) < (0)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":198 * * * class NoHostAvailable(Exception): # <<<<<<<<<<<<<< * """ * Raised when an operation is attempted but all connections are */ __pyx_t_11 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_NoHostAvailable, __pyx_mstate_global->__pyx_n_u_NoHostAvailable, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_Raised_when_an_operation_is_att); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_9 != __pyx_t_11) { if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(0, 198, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":204 * """ * * errors = None # <<<<<<<<<<<<<< * """ * A map of the form ``{ip: exception}`` which details the particular */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_errors, Py_None) < (0)) __PYX_ERR(0, 204, __pyx_L1_error) /* "cassandra/cluster.py":211 * """ * * def __init__(self, message, errors): # <<<<<<<<<<<<<< * Exception.__init__(self, message, errors) * self.errors = errors */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_15NoHostAvailable_1__init__, 0, __pyx_mstate_global->__pyx_n_u_NoHostAvailable___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":198 * * * class NoHostAvailable(Exception): # <<<<<<<<<<<<<< * """ * Raised when an operation is attempted but all connections are */ __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NoHostAvailable, __pyx_t_9, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_NoHostAvailable, __pyx_t_11) < (0)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":216 * * * def _future_completed(future): # <<<<<<<<<<<<<< * """ Helper for run_in_executor() """ * exc = future.exception() */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_15_future_completed, 0, __pyx_mstate_global->__pyx_n_u_future_completed, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_future_completed, __pyx_t_9) < (0)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":223 * * * def run_in_executor(f): # <<<<<<<<<<<<<< * """ * A decorator to run the given method in the ThreadPoolExecutor. */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17run_in_executor, 0, __pyx_mstate_global->__pyx_n_u_run_in_executor, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_run_in_executor, __pyx_t_9) < (0)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":242 * * * _clusters_for_shutdown = set() # <<<<<<<<<<<<<< * * */ __pyx_t_9 = PySet_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_clusters_for_shutdown, __pyx_t_9) < (0)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":245 * * * def _register_cluster_shutdown(cluster): # <<<<<<<<<<<<<< * _clusters_for_shutdown.add(cluster) * */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_19_register_cluster_shutdown, 0, __pyx_mstate_global->__pyx_n_u_register_cluster_shutdown, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_register_cluster_shutdown, __pyx_t_9) < (0)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":249 * * * def _discard_cluster_shutdown(cluster): # <<<<<<<<<<<<<< * _clusters_for_shutdown.discard(cluster) * */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_21_discard_cluster_shutdown, 0, __pyx_mstate_global->__pyx_n_u_discard_cluster_shutdown, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_discard_cluster_shutdown, __pyx_t_9) < (0)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":253 * * * def _shutdown_clusters(): # <<<<<<<<<<<<<< * clusters = _clusters_for_shutdown.copy() # copy because shutdown modifies the global set "discard" * for cluster in clusters: */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_23_shutdown_clusters, 0, __pyx_mstate_global->__pyx_n_u_shutdown_clusters, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_shutdown_clusters, __pyx_t_9) < (0)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":259 * * * atexit.register(_shutdown_clusters) # <<<<<<<<<<<<<< * * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_atexit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_register); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_shutdown_clusters); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_14}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":262 * * * def default_lbp_factory(): # <<<<<<<<<<<<<< * if murmur3 is not None: * return TokenAwarePolicy(DCAwareRoundRobinPolicy()) */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_25default_lbp_factory, 0, __pyx_mstate_global->__pyx_n_u_default_lbp_factory, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_default_lbp_factory, __pyx_t_9) < (0)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":268 * * * class ContinuousPagingOptions(object): # <<<<<<<<<<<<<< * * class PagingUnit(object): */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[5]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[5]) { if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[5]) < 0))) __PYX_ERR(0, 268, __pyx_L1_error) } /* "cassandra/cluster.py":270 * class ContinuousPagingOptions(object): * * class PagingUnit(object): # <<<<<<<<<<<<<< * BYTES = 1 * ROWS = 2 */ __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[7]); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_10, __pyx_t_2, __pyx_mstate_global->__pyx_n_u_PagingUnit, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions_PagingUn, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_2 != __pyx_mstate_global->__pyx_tuple[7]) { if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[7]) < 0))) __PYX_ERR(0, 270, __pyx_L1_error) } /* "cassandra/cluster.py":271 * * class PagingUnit(object): * BYTES = 1 # <<<<<<<<<<<<<< * ROWS = 2 * */ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_BYTES, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 271, __pyx_L1_error) /* "cassandra/cluster.py":272 * class PagingUnit(object): * BYTES = 1 * ROWS = 2 # <<<<<<<<<<<<<< * * page_unit = None */ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ROWS, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 272, __pyx_L1_error) /* "cassandra/cluster.py":270 * class ContinuousPagingOptions(object): * * class PagingUnit(object): # <<<<<<<<<<<<<< * BYTES = 1 * ROWS = 2 */ __pyx_t_13 = __Pyx_Py3ClassCreate(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PagingUnit, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PagingUnit, __pyx_t_13) < (0)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":274 * ROWS = 2 * * page_unit = None # <<<<<<<<<<<<<< * """ * Value of PagingUnit. Default is PagingUnit.ROWS. */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_page_unit, Py_None) < (0)) __PYX_ERR(0, 274, __pyx_L1_error) /* "cassandra/cluster.py":281 * """ * * max_pages = None # <<<<<<<<<<<<<< * """ * Max number of pages to send */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_max_pages, Py_None) < (0)) __PYX_ERR(0, 281, __pyx_L1_error) /* "cassandra/cluster.py":286 * """ * * max_pages_per_second = None # <<<<<<<<<<<<<< * """ * Max rate at which to send pages */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_max_pages_per_second, Py_None) < (0)) __PYX_ERR(0, 286, __pyx_L1_error) /* "cassandra/cluster.py":291 * """ * * max_queue_size = None # <<<<<<<<<<<<<< * """ * The maximum queue size for caching pages, only honored for protocol version DSE_V2 and higher, */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_max_queue_size, Py_None) < (0)) __PYX_ERR(0, 291, __pyx_L1_error) /* "cassandra/cluster.py":297 * """ * * def __init__(self, page_unit=PagingUnit.ROWS, max_pages=0, max_pages_per_second=0, max_queue_size=4): # <<<<<<<<<<<<<< * self.page_unit = page_unit * self.max_pages = max_pages */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_23ContinuousPagingOptions_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_2, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 297, __pyx_L1_error) __pyx_t_10 = PyObject_GetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_PagingUnit); if (unlikely(!__pyx_t_10)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_PagingUnit); } if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ROWS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_2)->arg0 = __pyx_t_4; __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_2, __pyx_pf_9cassandra_7cluster_38__defaults__); if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_2) < (0)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":305 * self.max_queue_size = max_queue_size * * def page_unit_bytes(self): # <<<<<<<<<<<<<< * return self.page_unit == ContinuousPagingOptions.PagingUnit.BYTES * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_23ContinuousPagingOptions_3page_unit_bytes, 0, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions_page_uni, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_page_unit_bytes, __pyx_t_2) < (0)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":268 * * * class ContinuousPagingOptions(object): # <<<<<<<<<<<<<< * * class PagingUnit(object): */ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions, __pyx_t_9, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ContinuousPagingOptions, __pyx_t_2) < (0)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":309 * * * def _addrinfo_or_none(contact_point, port): # <<<<<<<<<<<<<< * """ * A helper function that wraps socket.getaddrinfo and returns None */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_27_addrinfo_or_none, 0, __pyx_mstate_global->__pyx_n_u_addrinfo_or_none, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_addrinfo_or_none, __pyx_t_9) < (0)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":324 * * * def _execution_profile_to_string(name): # <<<<<<<<<<<<<< * default_profiles = { * EXEC_PROFILE_DEFAULT: 'EXEC_PROFILE_DEFAULT', */ __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_29_execution_profile_to_string, 0, __pyx_mstate_global->__pyx_n_u_execution_profile_to_string, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_execution_profile_to_string, __pyx_t_9) < (0)) __PYX_ERR(0, 324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":338 * * * class ExecutionProfile(object): # <<<<<<<<<<<<<< * load_balancing_policy = None * """ */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[9]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_ExecutionProfile, __pyx_mstate_global->__pyx_n_u_ExecutionProfile, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[9]) { if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[9]) < 0))) __PYX_ERR(0, 338, __pyx_L1_error) } /* "cassandra/cluster.py":339 * * class ExecutionProfile(object): * load_balancing_policy = None # <<<<<<<<<<<<<< * """ * An instance of :class:`.policies.LoadBalancingPolicy` or one of its subclasses. */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_load_balancing_policy, Py_None) < (0)) __PYX_ERR(0, 339, __pyx_L1_error) /* "cassandra/cluster.py":348 * """ * * retry_policy = None # <<<<<<<<<<<<<< * """ * An instance of :class:`.policies.RetryPolicy` instance used when :class:`.Statement` objects do not have a */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_retry_policy, Py_None) < (0)) __PYX_ERR(0, 348, __pyx_L1_error) /* "cassandra/cluster.py":356 * """ * * consistency_level = ConsistencyLevel.LOCAL_ONE # <<<<<<<<<<<<<< * """ * :class:`.ConsistencyLevel` used when not specified on a :class:`.Statement`. */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOCAL_ONE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_consistency_level, __pyx_t_4) < (0)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":361 * """ * * serial_consistency_level = None # <<<<<<<<<<<<<< * """ * Serial :class:`.ConsistencyLevel` used when not specified on a :class:`.Statement` (for LWT conditional statements). */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_serial_consistency_level, Py_None) < (0)) __PYX_ERR(0, 361, __pyx_L1_error) /* "cassandra/cluster.py":366 * """ * * request_timeout = 10.0 # <<<<<<<<<<<<<< * """ * Request timeout used when not overridden in :meth:`.Session.execute` */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_request_timeout, __pyx_mstate_global->__pyx_float_10_0) < (0)) __PYX_ERR(0, 366, __pyx_L1_error) /* "cassandra/cluster.py":371 * """ * * row_factory = staticmethod(named_tuple_factory) # <<<<<<<<<<<<<< * """ * A callable to format results, accepting ``(colnames, rows)`` where ``colnames`` is a list of column names, and */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_named_tuple_factory); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_4) < (0)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":384 * """ * * speculative_execution_policy = None # <<<<<<<<<<<<<< * """ * An instance of :class:`.policies.SpeculativeExecutionPolicy` */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_speculative_execution_policy, Py_None) < (0)) __PYX_ERR(0, 384, __pyx_L1_error) /* "cassandra/cluster.py":391 * """ * * continuous_paging_options = None # <<<<<<<<<<<<<< * """ * *Note:* This feature is implemented to facilitate server integration testing. It is not intended for general use in the Python driver. */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_continuous_paging_options, Py_None) < (0)) __PYX_ERR(0, 391, __pyx_L1_error) /* "cassandra/cluster.py":406 * * # indicates if lbp was set explicitly or uses default values * _load_balancing_policy_explicit = False # <<<<<<<<<<<<<< * _consistency_level_explicit = False * */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_explicit, Py_False) < (0)) __PYX_ERR(0, 406, __pyx_L1_error) /* "cassandra/cluster.py":407 * # indicates if lbp was set explicitly or uses default values * _load_balancing_policy_explicit = False * _consistency_level_explicit = False # <<<<<<<<<<<<<< * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, */ if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_consistency_level_explicit, Py_False) < (0)) __PYX_ERR(0, 407, __pyx_L1_error) /* "cassandra/cluster.py":409 * _consistency_level_explicit = False * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_16ExecutionProfile_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ExecutionProfile___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults1)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_t_4)->arg0 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":410 * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, * continuous_paging_options=None): */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_t_4)->arg1 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":411 * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=10.0, row_factory=named_tuple_factory, speculative_execution_policy=None, # <<<<<<<<<<<<<< * continuous_paging_options=None): * */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_named_tuple_factory); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_t_4)->arg2 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_9cassandra_7cluster_40__defaults__); if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":338 * * * class ExecutionProfile(object): # <<<<<<<<<<<<<< * load_balancing_policy = None * """ */ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ExecutionProfile, __pyx_t_9, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ExecutionProfile, __pyx_t_4) < (0)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":443 * * * class GraphExecutionProfile(ExecutionProfile): # <<<<<<<<<<<<<< * graph_options = None * """ */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ExecutionProfile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_Pack(1, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_9 != __pyx_t_11) { if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(0, 443, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":444 * * class GraphExecutionProfile(ExecutionProfile): * graph_options = None # <<<<<<<<<<<<<< * """ * :class:`.GraphOptions` to use with this execution */ if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_graph_options, Py_None) < (0)) __PYX_ERR(0, 444, __pyx_L1_error) /* "cassandra/cluster.py":455 * """ * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_21GraphExecutionProfile_1__init__, 0, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_11, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_t_11)->arg0 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":456 * * def __init__(self, load_balancing_policy=_NOT_SET, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_t_11)->arg1 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":458 * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=30.0, row_factory=None, * graph_options=None, continuous_paging_options=_NOT_SET): # <<<<<<<<<<<<<< * """ * Default execution profile for graph execution. */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults1, __pyx_t_11)->arg2 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_11, __pyx_pf_9cassandra_7cluster_42__defaults__); if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":443 * * * class GraphExecutionProfile(ExecutionProfile): # <<<<<<<<<<<<<< * graph_options = None * """ */ __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile, __pyx_t_9, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile, __pyx_t_11) < (0)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":478 * * * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): # <<<<<<<<<<<<<< * * def __init__(self, load_balancing_policy=None, retry_policy=None, */ __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_GraphExecutionProfile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_14 = PyTuple_Pack(1, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9 != __pyx_t_14) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 478, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":480 * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): * * def __init__(self, load_balancing_policy=None, retry_policy=None, # <<<<<<<<<<<<<< * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_30GraphAnalyticsExecutionProfile_1__init__, 0, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults2)) __PYX_ERR(0, 480, __pyx_L1_error) /* "cassandra/cluster.py":481 * * def __init__(self, load_balancing_policy=None, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, # <<<<<<<<<<<<<< * request_timeout=3600. * 24. * 7., row_factory=None, * graph_options=None): */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg0 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":482 * def __init__(self, load_balancing_policy=None, retry_policy=None, * consistency_level=_NOT_SET, serial_consistency_level=None, * request_timeout=3600. * 24. * 7., row_factory=None, # <<<<<<<<<<<<<< * graph_options=None): * """ */ __pyx_t_10 = PyFloat_FromDouble(((3600. * 24.) * 7.)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg1 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_44__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":478 * * * class GraphAnalyticsExecutionProfile(GraphExecutionProfile): # <<<<<<<<<<<<<< * * def __init__(self, load_balancing_policy=None, retry_policy=None, */ __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile, __pyx_t_9, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_GraphAnalyticsExecutionProfile, __pyx_t_14) < (0)) __PYX_ERR(0, 478, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":505 * * * class ProfileManager(object): # <<<<<<<<<<<<<< * * def __init__(self): */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[11]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_ProfileManager, __pyx_mstate_global->__pyx_n_u_ProfileManager, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[11]) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[11]) < 0))) __PYX_ERR(0, 505, __pyx_L1_error) } /* "cassandra/cluster.py":507 * class ProfileManager(object): * * def __init__(self): # <<<<<<<<<<<<<< * self.profiles = dict() * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":510 * self.profiles = dict() * * def _profiles_without_explicit_lbps(self): # <<<<<<<<<<<<<< * names = (profile_name for * profile_name, profile in self.profiles.items() */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_3_profiles_without_explicit_lbps, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager__profiles_without_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_profiles_without_explicit_lbps, __pyx_t_14) < (0)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":519 * ) * * def distance(self, host): # <<<<<<<<<<<<<< * distances = set(p.load_balancing_policy.distance(host) for p in self.profiles.values()) * return HostDistance.LOCAL if HostDistance.LOCAL in distances else \ */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_5distance, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_distance, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_distance, __pyx_t_14) < (0)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":525 * HostDistance.IGNORED * * def populate(self, cluster, hosts): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.populate(cluster, hosts) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_7populate, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_populate, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_populate, __pyx_t_14) < (0)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":529 * p.load_balancing_policy.populate(cluster, hosts) * * def check_supported(self): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.check_supported() */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_9check_supported, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_check_supported, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_check_supported, __pyx_t_14) < (0)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":533 * p.load_balancing_policy.check_supported() * * def on_up(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_up(host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_11on_up, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_on_up, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_up, __pyx_t_14) < (0)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":537 * p.load_balancing_policy.on_up(host) * * def on_down(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_down(host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_13on_down, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_on_down, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_down, __pyx_t_14) < (0)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":541 * p.load_balancing_policy.on_down(host) * * def on_add(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_add(host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_15on_add, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_on_add, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_add, __pyx_t_14) < (0)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":545 * p.load_balancing_policy.on_add(host) * * def on_remove(self, host): # <<<<<<<<<<<<<< * for p in self.profiles.values(): * p.load_balancing_policy.on_remove(host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_17on_remove, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_on_remove, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_remove, __pyx_t_14) < (0)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":549 * p.load_balancing_policy.on_remove(host) * * @property # <<<<<<<<<<<<<< * def default(self): * """ */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ProfileManager_19default, 0, __pyx_mstate_global->__pyx_n_u_ProfileManager_default, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default, __pyx_t_14) < (0)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":505 * * * class ProfileManager(object): # <<<<<<<<<<<<<< * * def __init__(self): */ __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ProfileManager, __pyx_t_9, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ProfileManager, __pyx_t_14) < (0)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":557 * * * EXEC_PROFILE_DEFAULT = object() # <<<<<<<<<<<<<< * """ * Key for the ``Cluster`` default execution profile, used when no other profile is selected in */ __pyx_t_4 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT, __pyx_t_9) < (0)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":565 * """ * * EXEC_PROFILE_GRAPH_DEFAULT = object() # <<<<<<<<<<<<<< * """ * Key for the default graph execution profile, used when no other profile is selected in */ __pyx_t_4 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT, __pyx_t_9) < (0)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":574 * """ * * EXEC_PROFILE_GRAPH_SYSTEM_DEFAULT = object() # <<<<<<<<<<<<<< * """ * Key for the default graph system execution profile. This can be used for graph statements using the DSE graph */ __pyx_t_4 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_SYSTEM_DEFAUL, __pyx_t_9) < (0)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":582 * """ * * EXEC_PROFILE_GRAPH_ANALYTICS_DEFAULT = object() # <<<<<<<<<<<<<< * """ * Key for the default graph analytics execution profile. This can be used for graph statements intended to */ __pyx_t_4 = NULL; __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_object, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_ANALYTICS_DEF, __pyx_t_9) < (0)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":591 * * * class _ConfigMode(object): # <<<<<<<<<<<<<< * UNCOMMITTED = 0 * LEGACY = 1 */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[13]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_ConfigMode, __pyx_mstate_global->__pyx_n_u_ConfigMode, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[13]) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[13]) < 0))) __PYX_ERR(0, 591, __pyx_L1_error) } /* "cassandra/cluster.py":592 * * class _ConfigMode(object): * UNCOMMITTED = 0 # <<<<<<<<<<<<<< * LEGACY = 1 * PROFILES = 2 */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_UNCOMMITTED, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 592, __pyx_L1_error) /* "cassandra/cluster.py":593 * class _ConfigMode(object): * UNCOMMITTED = 0 * LEGACY = 1 # <<<<<<<<<<<<<< * PROFILES = 2 * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_LEGACY, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 593, __pyx_L1_error) /* "cassandra/cluster.py":594 * UNCOMMITTED = 0 * LEGACY = 1 * PROFILES = 2 # <<<<<<<<<<<<<< * * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_PROFILES, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 594, __pyx_L1_error) /* "cassandra/cluster.py":591 * * * class _ConfigMode(object): # <<<<<<<<<<<<<< * UNCOMMITTED = 0 * LEGACY = 1 */ __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConfigMode, __pyx_t_9, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ConfigMode, __pyx_t_14) < (0)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":597 * * * class Cluster(object): # <<<<<<<<<<<<<< * """ * The main class to use when interacting with a Cassandra cluster. */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[15]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_Cluster, __pyx_mstate_global->__pyx_n_u_Cluster, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_The_main_class_to_use_when_inte); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[15]) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[15]) < 0))) __PYX_ERR(0, 597, __pyx_L1_error) } /* "cassandra/cluster.py":616 * """ * * contact_points = ['127.0.0.1'] # <<<<<<<<<<<<<< * """ * The list of contact points to try connecting for cluster discovery. A */ __pyx_t_14 = __Pyx_PyList_Pack(1, __pyx_mstate_global->__pyx_kp_u_127_0_0_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_contact_points, __pyx_t_14) < (0)) __PYX_ERR(0, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":635 * """ * # tracks if contact_points was set explicitly or with default values * _contact_points_explicit = None # <<<<<<<<<<<<<< * * port = 9042 */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_contact_points_explicit, Py_None) < (0)) __PYX_ERR(0, 635, __pyx_L1_error) /* "cassandra/cluster.py":637 * _contact_points_explicit = None * * port = 9042 # <<<<<<<<<<<<<< * """ * The server-side port to open connections to. Defaults to 9042. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_port, __pyx_mstate_global->__pyx_int_9042) < (0)) __PYX_ERR(0, 637, __pyx_L1_error) /* "cassandra/cluster.py":642 * """ * * cql_version = None # <<<<<<<<<<<<<< * """ * If a specific version of CQL should be used, this may be set to that */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_cql_version, Py_None) < (0)) __PYX_ERR(0, 642, __pyx_L1_error) /* "cassandra/cluster.py":649 * """ * * protocol_version = ProtocolVersion.DSE_V2 # <<<<<<<<<<<<<< * """ * The maximum version of the native protocol to use. */ __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ProtocolVersion); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_DSE_V2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_protocol_version, __pyx_t_2) < (0)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":663 * """ * * allow_beta_protocol_version = False # <<<<<<<<<<<<<< * * no_compact = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_allow_beta_protocol_version, Py_False) < (0)) __PYX_ERR(0, 663, __pyx_L1_error) /* "cassandra/cluster.py":665 * allow_beta_protocol_version = False * * no_compact = False # <<<<<<<<<<<<<< * * """ */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_no_compact, Py_False) < (0)) __PYX_ERR(0, 665, __pyx_L1_error) /* "cassandra/cluster.py":672 * """ * * compression = True # <<<<<<<<<<<<<< * """ * Controls compression for communications between the driver and Cassandra. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_compression, Py_True) < (0)) __PYX_ERR(0, 672, __pyx_L1_error) /* "cassandra/cluster.py":685 * """ * * _auth_provider = None # <<<<<<<<<<<<<< * _auth_provider_callable = None * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_auth_provider, Py_None) < (0)) __PYX_ERR(0, 685, __pyx_L1_error) /* "cassandra/cluster.py":686 * * _auth_provider = None * _auth_provider_callable = None # <<<<<<<<<<<<<< * * @property */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_auth_provider_callable, Py_None) < (0)) __PYX_ERR(0, 686, __pyx_L1_error) /* "cassandra/cluster.py":688 * _auth_provider_callable = None * * @property # <<<<<<<<<<<<<< * def auth_provider(self): * """ */ __pyx_t_14 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_1auth_provider, 0, __pyx_mstate_global->__pyx_n_u_Cluster_auth_provider, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_10}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_auth_provider_2, __pyx_t_2) < (0)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":703 * return self._auth_provider * * @auth_provider.setter # noqa # <<<<<<<<<<<<<< * def auth_provider(self, value): * if not value: */ __pyx_t_10 = NULL; __pyx_t_14 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_auth_provider_2); if (unlikely(!__pyx_t_14)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_auth_provider_2); } if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_3auth_provider, 0, __pyx_mstate_global->__pyx_n_u_Cluster_auth_provider, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_auth_provider_2, __pyx_t_2) < (0)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":721 * self._auth_provider = value * * _load_balancing_policy = None # <<<<<<<<<<<<<< * @property * def load_balancing_policy(self): */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_load_balancing_policy_2, Py_None) < (0)) __PYX_ERR(0, 721, __pyx_L1_error) /* "cassandra/cluster.py":722 * * _load_balancing_policy = None * @property # <<<<<<<<<<<<<< * def load_balancing_policy(self): * """ */ __pyx_t_13 = NULL; __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_5load_balancing_policy, 0, __pyx_mstate_global->__pyx_n_u_Cluster_load_balancing_policy, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_14}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_t_2) < (0)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":739 * return self._load_balancing_policy * * @load_balancing_policy.setter # <<<<<<<<<<<<<< * def load_balancing_policy(self, lbp): * if self._config_mode == _ConfigMode.PROFILES: */ __pyx_t_14 = NULL; __pyx_t_13 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); if (unlikely(!__pyx_t_13)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_load_balancing_policy); } if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_7load_balancing_policy, 0, __pyx_mstate_global->__pyx_n_u_Cluster_load_balancing_policy, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_13}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_load_balancing_policy, __pyx_t_2) < (0)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":746 * self._config_mode = _ConfigMode.LEGACY * * @property # <<<<<<<<<<<<<< * def _default_load_balancing_policy(self): * return self.profile_manager.default.load_balancing_policy */ __pyx_t_10 = NULL; __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_9_default_load_balancing_policy, 0, __pyx_mstate_global->__pyx_n_u_Cluster__default_load_balancing, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_13}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_load_balancing_policy, __pyx_t_2) < (0)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cassandra/cluster.py":750 * return self.profile_manager.default.load_balancing_policy * * reconnection_policy = ExponentialReconnectionPolicy(1.0, 600.0) # <<<<<<<<<<<<<< * """ * An instance of :class:`.policies.ReconnectionPolicy`. Defaults to an instance */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExponentialReconnectionPolicy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[16], NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_reconnection_policy, __pyx_t_13) < (0)) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":757 * """ * * _default_retry_policy = RetryPolicy() # <<<<<<<<<<<<<< * @property * def default_retry_policy(self): */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_retry_policy, __pyx_t_13) < (0)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":758 * * _default_retry_policy = RetryPolicy() * @property # <<<<<<<<<<<<<< * def default_retry_policy(self): * """ */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_11default_retry_policy, 0, __pyx_mstate_global->__pyx_n_u_Cluster_default_retry_policy, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 758, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":767 * return self._default_retry_policy * * @default_retry_policy.setter # <<<<<<<<<<<<<< * def default_retry_policy(self, policy): * if self._config_mode == _ConfigMode.PROFILES: */ __pyx_t_2 = NULL; __pyx_t_10 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2); if (unlikely(!__pyx_t_10)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2); } if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_13default_retry_policy, 0, __pyx_mstate_global->__pyx_n_u_Cluster_default_retry_policy, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_retry_policy_2, __pyx_t_13) < (0)) __PYX_ERR(0, 767, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":774 * self._config_mode = _ConfigMode.LEGACY * * conviction_policy_factory = SimpleConvictionPolicy # <<<<<<<<<<<<<< * """ * A factory function which creates instances of */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_SimpleConvictionPolicy); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_conviction_policy_factory, __pyx_t_13) < (0)) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":781 * """ * * address_translator = IdentityTranslator() # <<<<<<<<<<<<<< * """ * :class:`.policies.AddressTranslator` instance to be used in translating server node addresses */ __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_IdentityTranslator); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_address_translator, __pyx_t_13) < (0)) __PYX_ERR(0, 781, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":787 * """ * * connect_to_remote_hosts = True # <<<<<<<<<<<<<< * """ * If left as :const:`True`, hosts that are considered :attr:`~.HostDistance.REMOTE` */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_connect_to_remote_hosts, Py_True) < (0)) __PYX_ERR(0, 787, __pyx_L1_error) /* "cassandra/cluster.py":798 * """ * * metrics_enabled = False # <<<<<<<<<<<<<< * """ * Whether or not metric collection is enabled. If enabled, :attr:`.metrics` */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metrics_enabled, Py_False) < (0)) __PYX_ERR(0, 798, __pyx_L1_error) /* "cassandra/cluster.py":804 * """ * * metrics = None # <<<<<<<<<<<<<< * """ * An instance of :class:`cassandra.metrics.Metrics` if :attr:`.metrics_enabled` is */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metrics, Py_None) < (0)) __PYX_ERR(0, 804, __pyx_L1_error) /* "cassandra/cluster.py":810 * """ * * ssl_options = None # <<<<<<<<<<<<<< * """ * Using ssl_options without ssl_context is deprecated and will be removed in the */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ssl_options, Py_None) < (0)) __PYX_ERR(0, 810, __pyx_L1_error) /* "cassandra/cluster.py":841 * """ * * ssl_context = None # <<<<<<<<<<<<<< * """ * An optional ``ssl.SSLContext`` instance which will be used when new sockets are created. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ssl_context, Py_None) < (0)) __PYX_ERR(0, 841, __pyx_L1_error) /* "cassandra/cluster.py":852 * """ * * sockopts = None # <<<<<<<<<<<<<< * """ * An optional list of tuples which will be used as arguments to */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_sockopts, Py_None) < (0)) __PYX_ERR(0, 852, __pyx_L1_error) /* "cassandra/cluster.py":862 * """ * * max_schema_agreement_wait = 10 # <<<<<<<<<<<<<< * """ * The maximum duration (in seconds) that the driver will wait for schema */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_max_schema_agreement_wait, __pyx_mstate_global->__pyx_int_10) < (0)) __PYX_ERR(0, 862, __pyx_L1_error) /* "cassandra/cluster.py":869 * """ * * metadata = None # <<<<<<<<<<<<<< * """ * An instance of :class:`cassandra.metadata.Metadata`. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metadata, Py_None) < (0)) __PYX_ERR(0, 869, __pyx_L1_error) /* "cassandra/cluster.py":874 * """ * * connection_class = DefaultConnection # <<<<<<<<<<<<<< * """ * This determines what event loop system will be used for managing */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_DefaultConnection); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_connection_class, __pyx_t_13) < (0)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":900 * """ * * control_connection_timeout = 2.0 # <<<<<<<<<<<<<< * """ * A timeout, in seconds, for queries made by the control connection, such */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_control_connection_timeout, __pyx_mstate_global->__pyx_float_2_0) < (0)) __PYX_ERR(0, 900, __pyx_L1_error) /* "cassandra/cluster.py":907 * """ * * idle_heartbeat_interval = 30 # <<<<<<<<<<<<<< * """ * Interval, in seconds, on which to heartbeat idle connections. This helps */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_interval, __pyx_mstate_global->__pyx_int_30) < (0)) __PYX_ERR(0, 907, __pyx_L1_error) /* "cassandra/cluster.py":915 * """ * * idle_heartbeat_timeout = 30 # <<<<<<<<<<<<<< * """ * Timeout, in seconds, on which the heartbeat wait for idle connection responses. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_idle_heartbeat_timeout, __pyx_mstate_global->__pyx_int_30) < (0)) __PYX_ERR(0, 915, __pyx_L1_error) /* "cassandra/cluster.py":921 * """ * * schema_event_refresh_window = 2 # <<<<<<<<<<<<<< * """ * Window, in seconds, within which a schema component will be refreshed after */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 921, __pyx_L1_error) /* "cassandra/cluster.py":942 * """ * * topology_event_refresh_window = 10 # <<<<<<<<<<<<<< * """ * Window, in seconds, within which the node and token list will be refreshed after */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window, __pyx_mstate_global->__pyx_int_10) < (0)) __PYX_ERR(0, 942, __pyx_L1_error) /* "cassandra/cluster.py":954 * """ * * status_event_refresh_window = 2 # <<<<<<<<<<<<<< * """ * Window, in seconds, within which the driver will start the reconnect after */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_status_event_refresh_window, __pyx_mstate_global->__pyx_int_2) < (0)) __PYX_ERR(0, 954, __pyx_L1_error) /* "cassandra/cluster.py":966 * """ * * prepare_on_all_hosts = True # <<<<<<<<<<<<<< * """ * Specifies whether statements should be prepared on all hosts, or just one. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_prepare_on_all_hosts, Py_True) < (0)) __PYX_ERR(0, 966, __pyx_L1_error) /* "cassandra/cluster.py":975 * """ * * reprepare_on_up = True # <<<<<<<<<<<<<< * """ * Specifies whether all known prepared statements should be prepared on a node when it comes up. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_reprepare_on_up, Py_True) < (0)) __PYX_ERR(0, 975, __pyx_L1_error) /* "cassandra/cluster.py":984 * """ * * connect_timeout = 5 # <<<<<<<<<<<<<< * """ * Timeout, in seconds, for creating new connections. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_connect_timeout, __pyx_mstate_global->__pyx_int_5) < (0)) __PYX_ERR(0, 984, __pyx_L1_error) /* "cassandra/cluster.py":992 * """ * * timestamp_generator = None # <<<<<<<<<<<<<< * """ * An object, shared between all sessions created by this cluster instance, */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_timestamp_generator, Py_None) < (0)) __PYX_ERR(0, 992, __pyx_L1_error) /* "cassandra/cluster.py":1003 * """ * * monitor_reporting_enabled = True # <<<<<<<<<<<<<< * """ * A boolean indicating if monitor reporting, which sends gathered data to */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_monitor_reporting_enabled, Py_True) < (0)) __PYX_ERR(0, 1003, __pyx_L1_error) /* "cassandra/cluster.py":1009 * """ * * monitor_reporting_interval = 30 # <<<<<<<<<<<<<< * """ * A boolean indicating if monitor reporting, which sends gathered data to */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_monitor_reporting_interval, __pyx_mstate_global->__pyx_int_30) < (0)) __PYX_ERR(0, 1009, __pyx_L1_error) /* "cassandra/cluster.py":1015 * """ * * client_id = None # <<<<<<<<<<<<<< * """ * A UUID that uniquely identifies this Cluster object to Insights. This will */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_client_id, Py_None) < (0)) __PYX_ERR(0, 1015, __pyx_L1_error) /* "cassandra/cluster.py":1021 * """ * * application_name = '' # <<<<<<<<<<<<<< * """ * A string identifying this application to Insights. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_application_name, __pyx_mstate_global->__pyx_kp_u__11) < (0)) __PYX_ERR(0, 1021, __pyx_L1_error) /* "cassandra/cluster.py":1026 * """ * * application_version = '' # <<<<<<<<<<<<<< * """ * A string identifying this application's version to Insights */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_application_version, __pyx_mstate_global->__pyx_kp_u__11) < (0)) __PYX_ERR(0, 1026, __pyx_L1_error) /* "cassandra/cluster.py":1031 * """ * * cloud = None # <<<<<<<<<<<<<< * """ * A dict of the cloud configuration. Example:: */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_cloud, Py_None) < (0)) __PYX_ERR(0, 1031, __pyx_L1_error) /* "cassandra/cluster.py":1047 * """ * * column_encryption_policy = None # <<<<<<<<<<<<<< * """ * An instance of :class:`cassandra.policies.ColumnEncryptionPolicy` specifying encryption materials to be */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_column_encryption_policy, Py_None) < (0)) __PYX_ERR(0, 1047, __pyx_L1_error) /* "cassandra/cluster.py":1053 * """ * * @property # <<<<<<<<<<<<<< * def schema_metadata_enabled(self): * """ */ __pyx_t_10 = NULL; __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_15schema_metadata_enabled, 0, __pyx_mstate_global->__pyx_n_u_Cluster_schema_metadata_enabled, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_14}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schema_metadata_enabled, __pyx_t_13) < (0)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":1064 * return self.control_connection._schema_meta_enabled * * @schema_metadata_enabled.setter # <<<<<<<<<<<<<< * def schema_metadata_enabled(self, enabled): * self.control_connection._schema_meta_enabled = bool(enabled) */ __pyx_t_14 = NULL; __pyx_t_10 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schema_metadata_enabled); if (unlikely(!__pyx_t_10)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_schema_metadata_enabled); } if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_17schema_metadata_enabled, 0, __pyx_mstate_global->__pyx_n_u_Cluster_schema_metadata_enabled, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_10}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schema_metadata_enabled, __pyx_t_13) < (0)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":1068 * self.control_connection._schema_meta_enabled = bool(enabled) * * @property # <<<<<<<<<<<<<< * def token_metadata_enabled(self): * """ */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_19token_metadata_enabled, 0, __pyx_mstate_global->__pyx_n_u_Cluster_token_metadata_enabled, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_token_metadata_enabled, __pyx_t_13) < (0)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":1080 * return self.control_connection._token_meta_enabled * * @token_metadata_enabled.setter # <<<<<<<<<<<<<< * def token_metadata_enabled(self, enabled): * self.control_connection._token_meta_enabled = bool(enabled) */ __pyx_t_10 = NULL; __pyx_t_2 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_token_metadata_enabled); if (unlikely(!__pyx_t_2)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_token_metadata_enabled); } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_21token_metadata_enabled, 0, __pyx_mstate_global->__pyx_n_u_Cluster_token_metadata_enabled, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_13 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_token_metadata_enabled, __pyx_t_13) < (0)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":1084 * self.control_connection._token_meta_enabled = bool(enabled) * * endpoint_factory = None # <<<<<<<<<<<<<< * """ * An :class:`~.connection.EndPointFactory` instance to use internally when creating */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_endpoint_factory, Py_None) < (0)) __PYX_ERR(0, 1084, __pyx_L1_error) /* "cassandra/cluster.py":1091 * """ * * profile_manager = None # <<<<<<<<<<<<<< * _config_mode = _ConfigMode.UNCOMMITTED * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_profile_manager, Py_None) < (0)) __PYX_ERR(0, 1091, __pyx_L1_error) /* "cassandra/cluster.py":1092 * * profile_manager = None * _config_mode = _ConfigMode.UNCOMMITTED # <<<<<<<<<<<<<< * * sessions = None */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_ConfigMode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_UNCOMMITTED); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1092, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_config_mode, __pyx_t_14) < (0)) __PYX_ERR(0, 1092, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1094 * _config_mode = _ConfigMode.UNCOMMITTED * * sessions = None # <<<<<<<<<<<<<< * control_connection = None * scheduler = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_sessions, Py_None) < (0)) __PYX_ERR(0, 1094, __pyx_L1_error) /* "cassandra/cluster.py":1095 * * sessions = None * control_connection = None # <<<<<<<<<<<<<< * scheduler = None * executor = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_control_connection, Py_None) < (0)) __PYX_ERR(0, 1095, __pyx_L1_error) /* "cassandra/cluster.py":1096 * sessions = None * control_connection = None * scheduler = None # <<<<<<<<<<<<<< * executor = None * is_shutdown = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_scheduler, Py_None) < (0)) __PYX_ERR(0, 1096, __pyx_L1_error) /* "cassandra/cluster.py":1097 * control_connection = None * scheduler = None * executor = None # <<<<<<<<<<<<<< * is_shutdown = False * _is_setup = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_executor, Py_None) < (0)) __PYX_ERR(0, 1097, __pyx_L1_error) /* "cassandra/cluster.py":1098 * scheduler = None * executor = None * is_shutdown = False # <<<<<<<<<<<<<< * _is_setup = False * _prepared_statements = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_shutdown, Py_False) < (0)) __PYX_ERR(0, 1098, __pyx_L1_error) /* "cassandra/cluster.py":1099 * executor = None * is_shutdown = False * _is_setup = False # <<<<<<<<<<<<<< * _prepared_statements = None * _prepared_statement_lock = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_setup, Py_False) < (0)) __PYX_ERR(0, 1099, __pyx_L1_error) /* "cassandra/cluster.py":1100 * is_shutdown = False * _is_setup = False * _prepared_statements = None # <<<<<<<<<<<<<< * _prepared_statement_lock = None * _idle_heartbeat = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_prepared_statements, Py_None) < (0)) __PYX_ERR(0, 1100, __pyx_L1_error) /* "cassandra/cluster.py":1101 * _is_setup = False * _prepared_statements = None * _prepared_statement_lock = None # <<<<<<<<<<<<<< * _idle_heartbeat = None * _protocol_version_explicit = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_prepared_statement_lock, Py_None) < (0)) __PYX_ERR(0, 1101, __pyx_L1_error) /* "cassandra/cluster.py":1102 * _prepared_statements = None * _prepared_statement_lock = None * _idle_heartbeat = None # <<<<<<<<<<<<<< * _protocol_version_explicit = False * _discount_down_events = True */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_idle_heartbeat, Py_None) < (0)) __PYX_ERR(0, 1102, __pyx_L1_error) /* "cassandra/cluster.py":1103 * _prepared_statement_lock = None * _idle_heartbeat = None * _protocol_version_explicit = False # <<<<<<<<<<<<<< * _discount_down_events = True * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_protocol_version_explicit, Py_False) < (0)) __PYX_ERR(0, 1103, __pyx_L1_error) /* "cassandra/cluster.py":1104 * _idle_heartbeat = None * _protocol_version_explicit = False * _discount_down_events = True # <<<<<<<<<<<<<< * * _user_types = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_discount_down_events, Py_True) < (0)) __PYX_ERR(0, 1104, __pyx_L1_error) /* "cassandra/cluster.py":1106 * _discount_down_events = True * * _user_types = None # <<<<<<<<<<<<<< * """ * A map of {keyspace: {type_name: UserType}} */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_user_types, Py_None) < (0)) __PYX_ERR(0, 1106, __pyx_L1_error) /* "cassandra/cluster.py":1111 * """ * * _listeners = None # <<<<<<<<<<<<<< * _listener_lock = None * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_listeners, Py_None) < (0)) __PYX_ERR(0, 1111, __pyx_L1_error) /* "cassandra/cluster.py":1112 * * _listeners = None * _listener_lock = None # <<<<<<<<<<<<<< * * def __init__(self, */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_listener_lock, Py_None) < (0)) __PYX_ERR(0, 1112, __pyx_L1_error) /* "cassandra/cluster.py":1114 * _listener_lock = None * * def __init__(self, # <<<<<<<<<<<<<< * contact_points=_NOT_SET, * port=9042, */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_23__init__, 0, __pyx_mstate_global->__pyx_n_u_Cluster___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults2)) __PYX_ERR(0, 1114, __pyx_L1_error) /* "cassandra/cluster.py":1115 * * def __init__(self, * contact_points=_NOT_SET, # <<<<<<<<<<<<<< * port=9042, * compression=True, */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":1128 * sockopts=None, * cql_version=None, * protocol_version=_NOT_SET, # <<<<<<<<<<<<<< * executor_threads=2, * max_schema_agreement_wait=10, */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg1 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_46__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 1114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1414 * self.application_version = application_version * * def _create_thread_pool_executor(self, **kwargs): # <<<<<<<<<<<<<< * """ * Create a ThreadPoolExecutor for the cluster. In most cases, the built-in */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_25_create_thread_pool_executor, 0, __pyx_mstate_global->__pyx_n_u_Cluster__create_thread_pool_exec, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_create_thread_pool_executor, __pyx_t_14) < (0)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1450 * return tpe_class(**kwargs) * * def register_user_type(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Registers a class to use to represent a particular user-defined type. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_27register_user_type, 0, __pyx_mstate_global->__pyx_n_u_Cluster_register_user_type, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_register_user_type, __pyx_t_14) < (0)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1508 * UserType.evict_udt_class(keyspace, user_type) * * def add_execution_profile(self, name, profile, pool_wait_timeout=5): # <<<<<<<<<<<<<< * """ * Adds an :class:`.ExecutionProfile` to the cluster. This makes it available for use by ``name`` in :meth:`.Session.execute` */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_29add_execution_profile, 0, __pyx_mstate_global->__pyx_n_u_Cluster_add_execution_profile, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[17]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_execution_profile, __pyx_t_14) < (0)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1556 * raise OperationTimedOut("Failed to create all new connection pools in the %ss timeout.") * * def get_min_requests_per_connection(self, host_distance): # <<<<<<<<<<<<<< * return self._min_requests_per_connection[host_distance] * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_31get_min_requests_per_connection, 0, __pyx_mstate_global->__pyx_n_u_Cluster_get_min_requests_per_con, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_min_requests_per_connection, __pyx_t_14) < (0)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1559 * return self._min_requests_per_connection[host_distance] * * def set_min_requests_per_connection(self, host_distance, min_requests): # <<<<<<<<<<<<<< * """ * Sets a threshold for concurrent requests per connection, below which */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_33set_min_requests_per_connection, 0, __pyx_mstate_global->__pyx_n_u_Cluster_set_min_requests_per_con_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_min_requests_per_connection, __pyx_t_14) < (0)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1577 * self._min_requests_per_connection[host_distance] = min_requests * * def get_max_requests_per_connection(self, host_distance): # <<<<<<<<<<<<<< * return self._max_requests_per_connection[host_distance] * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_35get_max_requests_per_connection, 0, __pyx_mstate_global->__pyx_n_u_Cluster_get_max_requests_per_con, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_max_requests_per_connection, __pyx_t_14) < (0)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1580 * return self._max_requests_per_connection[host_distance] * * def set_max_requests_per_connection(self, host_distance, max_requests): # <<<<<<<<<<<<<< * """ * Sets a threshold for concurrent requests per connection, above which new */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_37set_max_requests_per_connection, 0, __pyx_mstate_global->__pyx_n_u_Cluster_set_max_requests_per_con_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_max_requests_per_connection, __pyx_t_14) < (0)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1598 * self._max_requests_per_connection[host_distance] = max_requests * * def get_core_connections_per_host(self, host_distance): # <<<<<<<<<<<<<< * """ * Gets the minimum number of connections per Session that will be opened */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_39get_core_connections_per_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_get_core_connections_per, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_core_connections_per_host, __pyx_t_14) < (0)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1610 * return self._core_connections_per_host[host_distance] * * def set_core_connections_per_host(self, host_distance, core_connections): # <<<<<<<<<<<<<< * """ * Sets the minimum number of connections per Session that will be opened */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_41set_core_connections_per_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_set_core_connections_per_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_core_connections_per_host, __pyx_t_14) < (0)) __PYX_ERR(0, 1610, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1635 * self._ensure_core_connections() * * def get_max_connections_per_host(self, host_distance): # <<<<<<<<<<<<<< * """ * Gets the maximum number of connections per Session that will be opened */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_43get_max_connections_per_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_get_max_connections_per, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_max_connections_per_host, __pyx_t_14) < (0)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1647 * return self._max_connections_per_host[host_distance] * * def set_max_connections_per_host(self, host_distance, max_connections): # <<<<<<<<<<<<<< * """ * Sets the maximum number of connections per Session that will be opened */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_45set_max_connections_per_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_set_max_connections_per_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_max_connections_per_host, __pyx_t_14) < (0)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1665 * self._max_connections_per_host[host_distance] = max_connections * * def connection_factory(self, endpoint, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Called to create a new connection with proper configuration. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_47connection_factory, 0, __pyx_mstate_global->__pyx_n_u_Cluster_connection_factory, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_connection_factory, __pyx_t_14) < (0)) __PYX_ERR(0, 1665, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1673 * return self.connection_class.factory(endpoint, self.connect_timeout, *args, **kwargs) * * def _make_connection_factory(self, host, *args, **kwargs): # <<<<<<<<<<<<<< * kwargs = self._make_connection_kwargs(host.endpoint, kwargs) * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_49_make_connection_factory, 0, __pyx_mstate_global->__pyx_n_u_Cluster__make_connection_factory, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_make_connection_factory, __pyx_t_14) < (0)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1677 * return partial(self.connection_class.factory, host.endpoint, self.connect_timeout, *args, **kwargs) * * def _make_connection_kwargs(self, endpoint, kwargs_dict): # <<<<<<<<<<<<<< * if self._auth_provider_callable: * kwargs_dict.setdefault('authenticator', self._auth_provider_callable(endpoint.address)) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_51_make_connection_kwargs, 0, __pyx_mstate_global->__pyx_n_u_Cluster__make_connection_kwargs, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_make_connection_kwargs, __pyx_t_14) < (0)) __PYX_ERR(0, 1677, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1694 * return kwargs_dict * * def protocol_downgrade(self, host_endpoint, previous_version): # <<<<<<<<<<<<<< * if self._protocol_version_explicit: * raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_53protocol_downgrade, 0, __pyx_mstate_global->__pyx_n_u_Cluster_protocol_downgrade, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_protocol_downgrade, __pyx_t_14) < (0)) __PYX_ERR(0, 1694, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1707 * self.protocol_version = new_version * * def connect(self, keyspace=None, wait_for_all_pools=False): # <<<<<<<<<<<<<< * """ * Creates and returns a new :class:`~.Session` object. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_55connect, 0, __pyx_mstate_global->__pyx_n_u_Cluster_connect, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[18]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_connect, __pyx_t_14) < (0)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1774 * return session * * def _set_default_dbaas_consistency(self, session): # <<<<<<<<<<<<<< * if session.cluster.metadata.dbaas: * for profile in self.profile_manager.profiles.values(): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_57_set_default_dbaas_consistency, 0, __pyx_mstate_global->__pyx_n_u_Cluster__set_default_dbaas_consi, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_default_dbaas_consistency, __pyx_t_14) < (0)) __PYX_ERR(0, 1774, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1781 * session._default_consistency_level = ConsistencyLevel.LOCAL_QUORUM * * def get_connection_holders(self): # <<<<<<<<<<<<<< * holders = [] * for s in tuple(self.sessions): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_59get_connection_holders, 0, __pyx_mstate_global->__pyx_n_u_Cluster_get_connection_holders, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1781, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_connection_holders, __pyx_t_14) < (0)) __PYX_ERR(0, 1781, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1788 * return holders * * def shutdown(self): # <<<<<<<<<<<<<< * """ * Closes all sessions and connection associated with this Cluster. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_61shutdown, 0, __pyx_mstate_global->__pyx_n_u_Cluster_shutdown, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_shutdown, __pyx_t_14) < (0)) __PYX_ERR(0, 1788, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1816 * _discard_cluster_shutdown(self) * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_63__enter__, 0, __pyx_mstate_global->__pyx_n_u_Cluster___enter, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_14) < (0)) __PYX_ERR(0, 1816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1819 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.shutdown() * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_65__exit__, 0, __pyx_mstate_global->__pyx_n_u_Cluster___exit, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_14) < (0)) __PYX_ERR(0, 1819, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1822 * self.shutdown() * * def _new_session(self, keyspace): # <<<<<<<<<<<<<< * session = Session(self, self.metadata.all_hosts(), keyspace) * self._session_register_user_types(session) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_67_new_session, 0, __pyx_mstate_global->__pyx_n_u_Cluster__new_session, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_new_session, __pyx_t_14) < (0)) __PYX_ERR(0, 1822, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1828 * return session * * def _session_register_user_types(self, session): # <<<<<<<<<<<<<< * for keyspace, type_map in self._user_types.items(): * for udt_name, klass in type_map.items(): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_69_session_register_user_types, 0, __pyx_mstate_global->__pyx_n_u_Cluster__session_register_user_t, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_session_register_user_types, __pyx_t_14) < (0)) __PYX_ERR(0, 1828, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1833 * session.user_type_registered(keyspace, udt_name, klass) * * def _cleanup_failed_on_up_handling(self, host): # <<<<<<<<<<<<<< * self.profile_manager.on_down(host) * self.control_connection.on_down(host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_71_cleanup_failed_on_up_handling, 0, __pyx_mstate_global->__pyx_n_u_Cluster__cleanup_failed_on_up_ha, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_cleanup_failed_on_up_handling, __pyx_t_14) < (0)) __PYX_ERR(0, 1833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1841 * self._start_reconnector(host, is_host_addition=False) * * def _on_up_future_completed(self, host, futures, results, lock, finished_future): # <<<<<<<<<<<<<< * with lock: * futures.discard(finished_future) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_73_on_up_future_completed, 0, __pyx_mstate_global->__pyx_n_u_Cluster__on_up_future_completed, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_up_future_completed, __pyx_t_14) < (0)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1878 * session.update_created_pools() * * def on_up(self, host): # <<<<<<<<<<<<<< * """ * Intended for internal use only. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_75on_up, 0, __pyx_mstate_global->__pyx_n_u_Cluster_on_up, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_up, __pyx_t_14) < (0)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1950 * return futures * * def _start_reconnector(self, host, is_host_addition): # <<<<<<<<<<<<<< * if self.profile_manager.distance(host) == HostDistance.IGNORED: * return */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_77_start_reconnector, 0, __pyx_mstate_global->__pyx_n_u_Cluster__start_reconnector, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1950, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_start_reconnector, __pyx_t_14) < (0)) __PYX_ERR(0, 1950, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":1974 * reconnector.start() * * @run_in_executor # <<<<<<<<<<<<<< * def on_down(self, host, is_host_addition, expect_host_to_be_down=False): * """ */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_run_in_executor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_79on_down, 0, __pyx_mstate_global->__pyx_n_u_Cluster_on_down, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_10, __pyx_mstate_global->__pyx_tuple[19]); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_down, __pyx_t_14) < (0)) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2013 * self._start_reconnector(host, is_host_addition) * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_81on_add, 0, __pyx_mstate_global->__pyx_n_u_Cluster_on_add, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[20]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_add, __pyx_t_14) < (0)) __PYX_ERR(0, 2013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2072 * self._finalize_add(host) * * def _finalize_add(self, host, set_up=True): # <<<<<<<<<<<<<< * if set_up: * host.set_up() */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_83_finalize_add, 0, __pyx_mstate_global->__pyx_n_u_Cluster__finalize_add, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[20]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_finalize_add, __pyx_t_14) < (0)) __PYX_ERR(0, 2072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2083 * session.update_created_pools() * * def on_remove(self, host): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_85on_remove, 0, __pyx_mstate_global->__pyx_n_u_Cluster_on_remove, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[94])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_remove, __pyx_t_14) < (0)) __PYX_ERR(0, 2083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2100 * reconnection_handler.cancel() * * def signal_connection_failure(self, host, connection_exc, is_host_addition, expect_host_to_be_down=False): # <<<<<<<<<<<<<< * is_down = host.signal_connection_failure(connection_exc) * if is_down: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_87signal_connection_failure, 0, __pyx_mstate_global->__pyx_n_u_Cluster_signal_connection_failur, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[95])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[19]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_signal_connection_failure, __pyx_t_14) < (0)) __PYX_ERR(0, 2100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2106 * return is_down * * def add_host(self, endpoint, datacenter=None, rack=None, signal=True, refresh_nodes=True): # <<<<<<<<<<<<<< * """ * Called when adding initial contact points and when the control */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_89add_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_add_host, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[96])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[21]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_host, __pyx_t_14) < (0)) __PYX_ERR(0, 2106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2121 * return host, new * * def remove_host(self, host): # <<<<<<<<<<<<<< * """ * Called when the control connection observes that a node has left the */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_91remove_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_remove_host, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[97])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_remove_host, __pyx_t_14) < (0)) __PYX_ERR(0, 2121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2130 * self.on_remove(host) * * def register_listener(self, listener): # <<<<<<<<<<<<<< * """ * Adds a :class:`cassandra.policies.HostStateListener` subclass instance to */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_93register_listener, 0, __pyx_mstate_global->__pyx_n_u_Cluster_register_listener, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[98])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_register_listener, __pyx_t_14) < (0)) __PYX_ERR(0, 2130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2139 * self._listeners.add(listener) * * def unregister_listener(self, listener): # <<<<<<<<<<<<<< * """ Removes a registered listener. """ * with self._listener_lock: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_95unregister_listener, 0, __pyx_mstate_global->__pyx_n_u_Cluster_unregister_listener, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[99])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_unregister_listener, __pyx_t_14) < (0)) __PYX_ERR(0, 2139, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2144 * self._listeners.remove(listener) * * @property # <<<<<<<<<<<<<< * def listeners(self): * with self._listener_lock: */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_97listeners, 0, __pyx_mstate_global->__pyx_n_u_Cluster_listeners, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[100])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_listeners_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2144, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2149 * return self._listeners.copy() * * def _ensure_core_connections(self): # <<<<<<<<<<<<<< * """ * If any host has fewer than the configured number of core connections */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_99_ensure_core_connections, 0, __pyx_mstate_global->__pyx_n_u_Cluster__ensure_core_connections, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[101])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ensure_core_connections, __pyx_t_14) < (0)) __PYX_ERR(0, 2149, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2158 * pool.ensure_core_connections() * * @staticmethod # <<<<<<<<<<<<<< * def _validate_refresh_schema(keyspace, table, usertype, function, aggregate): * if any((table, usertype, function, aggregate)): */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_101_validate_refresh_schema, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Cluster__validate_refresh_schema_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[102])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_validate_refresh_schema, __pyx_t_14) < (0)) __PYX_ERR(0, 2158, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2166 * raise ValueError("{table, usertype, function, aggregate} are mutually exclusive") * * @staticmethod # <<<<<<<<<<<<<< * def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregate): * if aggregate: */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_103_target_type_from_refresh_args, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_Cluster__target_type_from_refres, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[103])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_target_type_from_refresh_args, __pyx_t_14) < (0)) __PYX_ERR(0, 2166, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2180 * return None * * def get_control_connection_host(self): # <<<<<<<<<<<<<< * """ * Returns the control connection host metadata. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_105get_control_connection_host, 0, __pyx_mstate_global->__pyx_n_u_Cluster_get_control_connection_h, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[104])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_control_connection_host, __pyx_t_14) < (0)) __PYX_ERR(0, 2180, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2188 * return self.metadata.get_host(endpoint) if endpoint else None * * def refresh_schema_metadata(self, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh all schema metadata. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_107refresh_schema_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_schema_metadata, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[105])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_schema_metadata, __pyx_t_14) < (0)) __PYX_ERR(0, 2188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2204 * raise DriverException("Schema metadata was not refreshed. See log for details.") * * def refresh_keyspace_metadata(self, keyspace, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh keyspace metadata. This applies to keyspace-level information such as replication */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_109refresh_keyspace_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_keyspace_metadat, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[106])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_keyspace_metadata, __pyx_t_14) < (0)) __PYX_ERR(0, 2204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2215 * raise DriverException("Keyspace metadata was not refreshed. See log for details.") * * def refresh_table_metadata(self, keyspace, table, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh table metadata. This applies to a table, and any triggers or indexes attached */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_111refresh_table_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_table_metadata, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[107])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_table_metadata, __pyx_t_14) < (0)) __PYX_ERR(0, 2215, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2226 * raise DriverException("Table metadata was not refreshed. See log for details.") * * def refresh_materialized_view_metadata(self, keyspace, view, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh materialized view metadata. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_113refresh_materialized_view_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_materialized_vie, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[108])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_materialized_view_metada, __pyx_t_14) < (0)) __PYX_ERR(0, 2226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2236 * raise DriverException("View metadata was not refreshed. See log for details.") * * def refresh_user_type_metadata(self, keyspace, user_type, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined type metadata. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_115refresh_user_type_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_user_type_metada, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[109])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_user_type_metadata, __pyx_t_14) < (0)) __PYX_ERR(0, 2236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2246 * raise DriverException("User Type metadata was not refreshed. See log for details.") * * def refresh_user_function_metadata(self, keyspace, function, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined function metadata. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_117refresh_user_function_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_user_function_me, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[110])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_user_function_metadata, __pyx_t_14) < (0)) __PYX_ERR(0, 2246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2258 * raise DriverException("User Function metadata was not refreshed. See log for details.") * * def refresh_user_aggregate_metadata(self, keyspace, aggregate, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh user defined aggregate metadata. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_119refresh_user_aggregate_metadata, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_user_aggregate_m, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[111])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_user_aggregate_metadata, __pyx_t_14) < (0)) __PYX_ERR(0, 2258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2270 * raise DriverException("User Aggregate metadata was not refreshed. See log for details.") * * def refresh_nodes(self, force_token_rebuild=False): # <<<<<<<<<<<<<< * """ * Synchronously refresh the node list and token metadata */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_121refresh_nodes, 0, __pyx_mstate_global->__pyx_n_u_Cluster_refresh_nodes, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[112])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[19]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_refresh_nodes, __pyx_t_14) < (0)) __PYX_ERR(0, 2270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2281 * raise DriverException("Node list was not refreshed. See log for details.") * * def set_meta_refresh_enabled(self, enabled): # <<<<<<<<<<<<<< * """ * *Deprecated:* set :attr:`~.Cluster.schema_metadata_enabled` :attr:`~.Cluster.token_metadata_enabled` instead */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_123set_meta_refresh_enabled, 0, __pyx_mstate_global->__pyx_n_u_Cluster_set_meta_refresh_enabled_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[113])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_meta_refresh_enabled, __pyx_t_14) < (0)) __PYX_ERR(0, 2281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2298 * self.token_metadata_enabled = enabled * * @classmethod # <<<<<<<<<<<<<< * def _send_chunks(cls, connection, host, chunks, set_keyspace=False): * for ks_chunk in chunks: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_125_send_chunks, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Cluster__send_chunks, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[114])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[19]); __pyx_t_10 = __Pyx_Method_ClassMethod(__pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_send_chunks, __pyx_t_10) < (0)) __PYX_ERR(0, 2298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2311 * "statement on host %s: %r", host, response) * * def _prepare_all_queries(self, host): # <<<<<<<<<<<<<< * if not self._prepared_statements or not self.reprepare_on_up: * return */ __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_127_prepare_all_queries, 0, __pyx_mstate_global->__pyx_n_u_Cluster__prepare_all_queries, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[115])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_prepare_all_queries, __pyx_t_10) < (0)) __PYX_ERR(0, 2311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2349 * connection.close() * * def add_prepared(self, query_id, prepared_statement): # <<<<<<<<<<<<<< * with self._prepared_statement_lock: * self._prepared_statements[query_id] = prepared_statement */ __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Cluster_129add_prepared, 0, __pyx_mstate_global->__pyx_n_u_Cluster_add_prepared, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[116])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_prepared, __pyx_t_10) < (0)) __PYX_ERR(0, 2349, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":597 * * * class Cluster(object): # <<<<<<<<<<<<<< * """ * The main class to use when interacting with a Cassandra cluster. */ __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Cluster, __pyx_t_9, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Cluster, __pyx_t_10) < (0)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":2354 * * * class Session(object): # <<<<<<<<<<<<<< * """ * A collection of connection pools for each host in the cluster. */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[24]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_Session, __pyx_mstate_global->__pyx_n_u_Session, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_A_collection_of_connection_pool); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[24]) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[24]) < 0))) __PYX_ERR(0, 2354, __pyx_L1_error) } /* "cassandra/cluster.py":2372 * """ * * cluster = None # <<<<<<<<<<<<<< * hosts = None * keyspace = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_cluster, Py_None) < (0)) __PYX_ERR(0, 2372, __pyx_L1_error) /* "cassandra/cluster.py":2373 * * cluster = None * hosts = None # <<<<<<<<<<<<<< * keyspace = None * is_shutdown = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_hosts, Py_None) < (0)) __PYX_ERR(0, 2373, __pyx_L1_error) /* "cassandra/cluster.py":2374 * cluster = None * hosts = None * keyspace = None # <<<<<<<<<<<<<< * is_shutdown = False * session_id = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_keyspace, Py_None) < (0)) __PYX_ERR(0, 2374, __pyx_L1_error) /* "cassandra/cluster.py":2375 * hosts = None * keyspace = None * is_shutdown = False # <<<<<<<<<<<<<< * session_id = None * _monitor_reporter = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_shutdown, Py_False) < (0)) __PYX_ERR(0, 2375, __pyx_L1_error) /* "cassandra/cluster.py":2376 * keyspace = None * is_shutdown = False * session_id = None # <<<<<<<<<<<<<< * _monitor_reporter = None * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_session_id, Py_None) < (0)) __PYX_ERR(0, 2376, __pyx_L1_error) /* "cassandra/cluster.py":2377 * is_shutdown = False * session_id = None * _monitor_reporter = None # <<<<<<<<<<<<<< * * _row_factory = staticmethod(named_tuple_factory) */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_monitor_reporter, Py_None) < (0)) __PYX_ERR(0, 2377, __pyx_L1_error) /* "cassandra/cluster.py":2379 * _monitor_reporter = None * * _row_factory = staticmethod(named_tuple_factory) # <<<<<<<<<<<<<< * @property * def row_factory(self): */ __pyx_t_14 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_named_tuple_factory); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_2}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_row_factory_2, __pyx_t_10) < (0)) __PYX_ERR(0, 2379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2380 * * _row_factory = staticmethod(named_tuple_factory) * @property # <<<<<<<<<<<<<< * def row_factory(self): * """ */ __pyx_t_2 = NULL; __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_1row_factory, 0, __pyx_mstate_global->__pyx_n_u_Session_row_factory, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[117])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_14}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_10) < (0)) __PYX_ERR(0, 2380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2395 * return self._row_factory * * @row_factory.setter # <<<<<<<<<<<<<< * def row_factory(self, rf): * self._validate_set_legacy_config('row_factory', rf) */ __pyx_t_14 = NULL; __pyx_t_2 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_row_factory); if (unlikely(!__pyx_t_2)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_row_factory); } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_3row_factory, 0, __pyx_mstate_global->__pyx_n_u_Session_row_factory, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[118])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_2}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_row_factory, __pyx_t_10) < (0)) __PYX_ERR(0, 2395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2399 * self._validate_set_legacy_config('row_factory', rf) * * _default_timeout = 10.0 # <<<<<<<<<<<<<< * * @property */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_timeout, __pyx_mstate_global->__pyx_float_10_0) < (0)) __PYX_ERR(0, 2399, __pyx_L1_error) /* "cassandra/cluster.py":2401 * _default_timeout = 10.0 * * @property # <<<<<<<<<<<<<< * def default_timeout(self): * """ */ __pyx_t_13 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_5default_timeout, 0, __pyx_mstate_global->__pyx_n_u_Session_default_timeout, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[119])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_2}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_timeout_2, __pyx_t_10) < (0)) __PYX_ERR(0, 2401, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2417 * return self._default_timeout * * @default_timeout.setter # <<<<<<<<<<<<<< * def default_timeout(self, timeout): * self._validate_set_legacy_config('default_timeout', timeout) */ __pyx_t_2 = NULL; __pyx_t_13 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_timeout_2); if (unlikely(!__pyx_t_13)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_default_timeout_2); } if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_7default_timeout, 0, __pyx_mstate_global->__pyx_n_u_Session_default_timeout, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[120])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_13}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_14, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_timeout_2, __pyx_t_10) < (0)) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* "cassandra/cluster.py":2421 * self._validate_set_legacy_config('default_timeout', timeout) * * _default_consistency_level = ConsistencyLevel.LOCAL_ONE # <<<<<<<<<<<<<< * * @property */ __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_LOCAL_ONE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_consistency_level, __pyx_t_14) < (0)) __PYX_ERR(0, 2421, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2423 * _default_consistency_level = ConsistencyLevel.LOCAL_ONE * * @property # <<<<<<<<<<<<<< * def default_consistency_level(self): * """ */ __pyx_t_10 = NULL; __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_9default_consistency_level, 0, __pyx_mstate_global->__pyx_n_u_Session_default_consistency_leve, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[121])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_13}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_consistency_level_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2439 * return self._default_consistency_level * * @default_consistency_level.setter # <<<<<<<<<<<<<< * def default_consistency_level(self, cl): * """ */ __pyx_t_13 = NULL; __pyx_t_10 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_consistency_level_2); if (unlikely(!__pyx_t_10)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_default_consistency_level_2); } if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_11default_consistency_level, 0, __pyx_mstate_global->__pyx_n_u_Session_default_consistency_leve, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[122])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_consistency_level_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2439, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2449 * self._validate_set_legacy_config('default_consistency_level', cl) * * _default_serial_consistency_level = None # <<<<<<<<<<<<<< * * @property */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_leve, Py_None) < (0)) __PYX_ERR(0, 2449, __pyx_L1_error) /* "cassandra/cluster.py":2451 * _default_serial_consistency_level = None * * @property # <<<<<<<<<<<<<< * def default_serial_consistency_level(self): * """ */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_13default_serial_consistency_level, 0, __pyx_mstate_global->__pyx_n_u_Session_default_serial_consisten, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[123])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_level_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2462 * return self._default_serial_consistency_level * * @default_serial_consistency_level.setter # <<<<<<<<<<<<<< * def default_serial_consistency_level(self, cl): * if (cl is not None and */ __pyx_t_10 = NULL; __pyx_t_2 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_level_2); if (unlikely(!__pyx_t_2)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_level_2); } if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_setter); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_15default_serial_consistency_level, 0, __pyx_mstate_global->__pyx_n_u_Session_default_serial_consisten, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[124])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_serial_consistency_level_2, __pyx_t_14) < (0)) __PYX_ERR(0, 2462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2472 * self._validate_set_legacy_config('default_serial_consistency_level', cl) * * max_trace_wait = 2.0 # <<<<<<<<<<<<<< * """ * The maximum amount of time (in seconds) the driver will wait for trace */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_max_trace_wait, __pyx_mstate_global->__pyx_float_2_0) < (0)) __PYX_ERR(0, 2472, __pyx_L1_error) /* "cassandra/cluster.py":2482 * :attr:`.Statement.trace` will be left as :const:`None`. """ * * default_fetch_size = 5000 # <<<<<<<<<<<<<< * """ * By default, this many rows will be fetched at a time. Setting */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_fetch_size, __pyx_mstate_global->__pyx_int_5000) < (0)) __PYX_ERR(0, 2482, __pyx_L1_error) /* "cassandra/cluster.py":2495 * """ * * use_client_timestamp = True # <<<<<<<<<<<<<< * """ * When using protocol version 3 or higher, write timestamps may be supplied */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_use_client_timestamp, Py_True) < (0)) __PYX_ERR(0, 2495, __pyx_L1_error) /* "cassandra/cluster.py":2505 * """ * * timestamp_generator = None # <<<<<<<<<<<<<< * """ * When :attr:`use_client_timestamp` is set, sessions call this object and use */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_timestamp_generator, Py_None) < (0)) __PYX_ERR(0, 2505, __pyx_L1_error) /* "cassandra/cluster.py":2525 * """ * * encoder = None # <<<<<<<<<<<<<< * """ * A :class:`~cassandra.encoder.Encoder` instance that will be used when */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_encoder, Py_None) < (0)) __PYX_ERR(0, 2525, __pyx_L1_error) /* "cassandra/cluster.py":2551 * """ * * client_protocol_handler = ProtocolHandler # <<<<<<<<<<<<<< * """ * Specifies a protocol handler that will be used for client-initiated requests (i.e. no */ __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ProtocolHandler_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_client_protocol_handler, __pyx_t_14) < (0)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2562 * """ * * session_id = None # <<<<<<<<<<<<<< * """ * A UUID that uniquely identifies this Session to Insights. This will be */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_session_id, Py_None) < (0)) __PYX_ERR(0, 2562, __pyx_L1_error) /* "cassandra/cluster.py":2568 * """ * * _lock = None # <<<<<<<<<<<<<< * _pools = None * _profile_manager = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_lock, Py_None) < (0)) __PYX_ERR(0, 2568, __pyx_L1_error) /* "cassandra/cluster.py":2569 * * _lock = None * _pools = None # <<<<<<<<<<<<<< * _profile_manager = None * _metrics = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_pools, Py_None) < (0)) __PYX_ERR(0, 2569, __pyx_L1_error) /* "cassandra/cluster.py":2570 * _lock = None * _pools = None * _profile_manager = None # <<<<<<<<<<<<<< * _metrics = None * _request_init_callbacks = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_profile_manager_2, Py_None) < (0)) __PYX_ERR(0, 2570, __pyx_L1_error) /* "cassandra/cluster.py":2571 * _pools = None * _profile_manager = None * _metrics = None # <<<<<<<<<<<<<< * _request_init_callbacks = None * _graph_paging_available = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metrics_2, Py_None) < (0)) __PYX_ERR(0, 2571, __pyx_L1_error) /* "cassandra/cluster.py":2572 * _profile_manager = None * _metrics = None * _request_init_callbacks = None # <<<<<<<<<<<<<< * _graph_paging_available = False * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_request_init_callbacks, Py_None) < (0)) __PYX_ERR(0, 2572, __pyx_L1_error) /* "cassandra/cluster.py":2573 * _metrics = None * _request_init_callbacks = None * _graph_paging_available = False # <<<<<<<<<<<<<< * * def __init__(self, cluster, hosts, keyspace=None): */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_graph_paging_available, Py_False) < (0)) __PYX_ERR(0, 2573, __pyx_L1_error) /* "cassandra/cluster.py":2575 * _graph_paging_available = False * * def __init__(self, cluster, hosts, keyspace=None): # <<<<<<<<<<<<<< * self.cluster = cluster * self.hosts = hosts */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_17__init__, 0, __pyx_mstate_global->__pyx_n_u_Session___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[125])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 2575, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2635 * self.session_id)) * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, # <<<<<<<<<<<<<< * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_19execute, 0, __pyx_mstate_global->__pyx_n_u_Session_execute, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[126])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults2)) __PYX_ERR(0, 2635, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; /* "cassandra/cluster.py":2636 * * def execute(self, query, parameters=None, timeout=_NOT_SET, trace=False, * custom_payload=None, execution_profile=EXEC_PROFILE_DEFAULT, # <<<<<<<<<<<<<< * paging_state=None, host=None, execute_as=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg1 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_48__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute, __pyx_t_14) < (0)) __PYX_ERR(0, 2635, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2680 * return self.execute_async(query, parameters, trace, custom_payload, timeout, execution_profile, paging_state, host, execute_as).result() * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, # <<<<<<<<<<<<<< * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None, execute_as=None): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_21execute_async, 0, __pyx_mstate_global->__pyx_n_u_Session_execute_async, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[127])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults2)) __PYX_ERR(0, 2680, __pyx_L1_error) /* "cassandra/cluster.py":2681 * * def execute_async(self, query, parameters=None, trace=False, custom_payload=None, * timeout=_NOT_SET, execution_profile=EXEC_PROFILE_DEFAULT, # <<<<<<<<<<<<<< * paging_state=None, host=None, execute_as=None): * """ */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults2, __pyx_t_14)->arg1 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_50__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_async, __pyx_t_14) < (0)) __PYX_ERR(0, 2680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2729 * return future * * def execute_concurrent(self, statements_and_parameters, concurrency=100, raise_on_first_error=True, results_generator=False, execution_profile=EXEC_PROFILE_DEFAULT): # <<<<<<<<<<<<<< * """ * Executes a sequence of (statement, parameters) tuples concurrently. Each */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_23execute_concurrent, 0, __pyx_mstate_global->__pyx_n_u_Session_execute_concurrent, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[128])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 2729, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_52__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_concurrent, __pyx_t_14) < (0)) __PYX_ERR(0, 2729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2789 * return execute_concurrent(self, statements_and_parameters, concurrency, raise_on_first_error, results_generator, execution_profile) * * def execute_concurrent_with_args(self, statement, parameters, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Like :meth:`~cassandra.concurrent.execute_concurrent()`, but takes a single */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_25execute_concurrent_with_args, 0, __pyx_mstate_global->__pyx_n_u_Session_execute_concurrent_with, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[129])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_concurrent_with_args, __pyx_t_14) < (0)) __PYX_ERR(0, 2789, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2804 * return execute_concurrent_with_args(self, statement, parameters, *args, **kwargs) * * def execute_concurrent_async(self, statements_and_parameters, concurrency=100, raise_on_first_error=False, execution_profile=EXEC_PROFILE_DEFAULT): # <<<<<<<<<<<<<< * """ * Asynchronously executes a sequence of (statement, parameters) tuples concurrently. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_27execute_concurrent_async, 0, __pyx_mstate_global->__pyx_n_u_Session_execute_concurrent_async, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[130])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_54__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_concurrent_async, __pyx_t_14) < (0)) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2821 * return execute_concurrent_async(self, statements_and_parameters, concurrency, raise_on_first_error, execution_profile) * * def execute_graph(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): # <<<<<<<<<<<<<< * """ * Executes a Gremlin query string or GraphStatement synchronously, */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_29execute_graph, 0, __pyx_mstate_global->__pyx_n_u_Session_execute_graph, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[131])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 2821, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_56__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_graph, __pyx_t_14) < (0)) __PYX_ERR(0, 2821, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2835 * return self.execute_graph_async(query, parameters, trace, execution_profile, execute_as).result() * * def execute_graph_async(self, query, parameters=None, trace=False, execution_profile=EXEC_PROFILE_GRAPH_DEFAULT, execute_as=None): # <<<<<<<<<<<<<< * """ * Execute the graph query and return a :class:`ResponseFuture` */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_31execute_graph_async, 0, __pyx_mstate_global->__pyx_n_u_Session_execute_graph_async, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[132])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 2835, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_GRAPH_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_58__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_graph_async, __pyx_t_14) < (0)) __PYX_ERR(0, 2835, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2891 * return future * * def _maybe_set_graph_paging(self, execution_profile): # <<<<<<<<<<<<<< * graph_paging = execution_profile.continuous_paging_options * if execution_profile.continuous_paging_options is _NOT_SET: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_33_maybe_set_graph_paging, 0, __pyx_mstate_global->__pyx_n_u_Session__maybe_set_graph_paging, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[133])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_maybe_set_graph_paging, __pyx_t_14) < (0)) __PYX_ERR(0, 2891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2898 * execution_profile.continuous_paging_options = graph_paging * * def _check_graph_paging_available(self): # <<<<<<<<<<<<<< * """Verify if we can enable graph paging. This executed only once when the session is created.""" * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_35_check_graph_paging_available, 0, __pyx_mstate_global->__pyx_n_u_Session__check_graph_paging_avai, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[134])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_check_graph_paging_available, __pyx_t_14) < (0)) __PYX_ERR(0, 2898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2914 * return True * * def _resolve_execution_profile_options(self, execution_profile): # <<<<<<<<<<<<<< * """ * Determine the GraphSON protocol and row factory for a graph query. This is useful */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_37_resolve_execution_profile_options, 0, __pyx_mstate_global->__pyx_n_u_Session__resolve_execution_profi, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[135])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_resolve_execution_profile_optio, __pyx_t_14) < (0)) __PYX_ERR(0, 2914, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2960 * execution_profile.row_factory = row_factory * * def _transform_params(self, parameters, graph_options): # <<<<<<<<<<<<<< * if not isinstance(parameters, dict): * raise ValueError('The parameters must be a dictionary. Unnamed parameters are not allowed.') */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_39_transform_params, 0, __pyx_mstate_global->__pyx_n_u_Session__transform_params, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[136])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_transform_params, __pyx_t_14) < (0)) __PYX_ERR(0, 2960, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2979 * return [json.dumps(serialized_parameters).encode('utf-8')] * * def _target_analytics_master(self, future): # <<<<<<<<<<<<<< * future._start_timer() * master_query_future = self._create_response_future("CALL DseClientTool.getAnalyticsGraphServer()", */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_41_target_analytics_master, 0, __pyx_mstate_global->__pyx_n_u_Session__target_analytics_master, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[137])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_target_analytics_master, __pyx_t_14) < (0)) __PYX_ERR(0, 2979, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2991 * master_query_future.add_callbacks(callback=cb, callback_args=args, errback=cb, errback_args=args) * * def _on_analytics_master_result(self, response, master_future, query_future): # <<<<<<<<<<<<<< * try: * row = master_future.result()[0] */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_43_on_analytics_master_result, 0, __pyx_mstate_global->__pyx_n_u_Session__on_analytics_master_res, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[138])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_analytics_master_result, __pyx_t_14) < (0)) __PYX_ERR(0, 2991, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3006 * self.submit(query_future.send_request) * * def _create_response_future(self, query, parameters, trace, custom_payload, # <<<<<<<<<<<<<< * timeout, execution_profile=EXEC_PROFILE_DEFAULT, * paging_state=None, host=None): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_45_create_response_future, 0, __pyx_mstate_global->__pyx_n_u_Session__create_response_future, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[139])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 3006, __pyx_L1_error) /* "cassandra/cluster.py":3007 * * def _create_response_future(self, query, parameters, trace, custom_payload, * timeout, execution_profile=EXEC_PROFILE_DEFAULT, # <<<<<<<<<<<<<< * paging_state=None, host=None): * """ Returns the ResponseFuture before calling send_request() on it """ */ __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_EXEC_PROFILE_DEFAULT); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_13; __Pyx_GIVEREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_60__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_create_response_future, __pyx_t_14) < (0)) __PYX_ERR(0, 3006, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3113 * continuous_paging_state=continuous_paging_state, host=host) * * def get_execution_profile(self, name): # <<<<<<<<<<<<<< * """ * Returns the execution profile associated with the provided ``name``. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_47get_execution_profile, 0, __pyx_mstate_global->__pyx_n_u_Session_get_execution_profile, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[140])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_execution_profile, __pyx_t_14) < (0)) __PYX_ERR(0, 3113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3127 * _execution_profile_to_string(name), ', '.join(eps))) * * def _maybe_get_execution_profile(self, ep): # <<<<<<<<<<<<<< * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_49_maybe_get_execution_profile, 0, __pyx_mstate_global->__pyx_n_u_Session__maybe_get_execution_pro, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[141])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_maybe_get_execution_profile, __pyx_t_14) < (0)) __PYX_ERR(0, 3127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3130 * return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) * * def execution_profile_clone_update(self, ep, **kwargs): # <<<<<<<<<<<<<< * """ * Returns a clone of the ``ep`` profile. ``kwargs`` can be specified to update attributes */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_51execution_profile_clone_update, 0, __pyx_mstate_global->__pyx_n_u_Session_execution_profile_clone, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[142])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execution_profile_clone_update, __pyx_t_14) < (0)) __PYX_ERR(0, 3130, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3145 * return clone * * def add_request_init_listener(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Adds a callback with arguments to be called when any request is created. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_53add_request_init_listener, 0, __pyx_mstate_global->__pyx_n_u_Session_add_request_init_listene, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[143])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_request_init_listener, __pyx_t_14) < (0)) __PYX_ERR(0, 3145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3165 * self._request_init_callbacks.append((fn, args, kwargs)) * * def remove_request_init_listener(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Removes a callback and arguments from the list. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_55remove_request_init_listener, 0, __pyx_mstate_global->__pyx_n_u_Session_remove_request_init_list, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[144])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_remove_request_init_listener, __pyx_t_14) < (0)) __PYX_ERR(0, 3165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3173 * self._request_init_callbacks.remove((fn, args, kwargs)) * * def _on_request(self, response_future): # <<<<<<<<<<<<<< * for fn, args, kwargs in self._request_init_callbacks: * fn(response_future, *args, **kwargs) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_57_on_request, 0, __pyx_mstate_global->__pyx_n_u_Session__on_request, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[145])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_request, __pyx_t_14) < (0)) __PYX_ERR(0, 3173, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3177 * fn(response_future, *args, **kwargs) * * def prepare(self, query, custom_payload=None, keyspace=None): # <<<<<<<<<<<<<< * """ * Prepares a query string, returning a :class:`~cassandra.query.PreparedStatement` */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_59prepare, 0, __pyx_mstate_global->__pyx_n_u_Session_prepare, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[146])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[0]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_prepare_2, __pyx_t_14) < (0)) __PYX_ERR(0, 3177, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3243 * return prepared_statement * * def prepare_on_all_hosts(self, query, excluded_host, keyspace=None): # <<<<<<<<<<<<<< * """ * Prepare the given query on all hosts, excluding ``excluded_host``. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_61prepare_on_all_hosts, 0, __pyx_mstate_global->__pyx_n_u_Session_prepare_on_all_hosts, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[147])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_prepare_on_all_hosts, __pyx_t_14) < (0)) __PYX_ERR(0, 3243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3277 * log.exception("Error preparing query for host %s:", host) * * def shutdown(self): # <<<<<<<<<<<<<< * """ * Close all connections. ``Session`` instances should not be used */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_63shutdown, 0, __pyx_mstate_global->__pyx_n_u_Session_shutdown, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[148])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_shutdown, __pyx_t_14) < (0)) __PYX_ERR(0, 3277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3301 * pool.shutdown() * * def __enter__(self): # <<<<<<<<<<<<<< * return self * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_65__enter__, 0, __pyx_mstate_global->__pyx_n_u_Session___enter, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[149])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_enter, __pyx_t_14) < (0)) __PYX_ERR(0, 3301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3304 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.shutdown() * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_67__exit__, 0, __pyx_mstate_global->__pyx_n_u_Session___exit, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[150])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_exit, __pyx_t_14) < (0)) __PYX_ERR(0, 3304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3307 * self.shutdown() * * def __del__(self): # <<<<<<<<<<<<<< * try: * # Ensure all connections are closed, in case the Session object is deleted by the GC */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_69__del__, 0, __pyx_mstate_global->__pyx_n_u_Session___del, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[151])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_del, __pyx_t_14) < (0)) __PYX_ERR(0, 3307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3316 * pass * * def add_or_renew_pool(self, host, is_host_addition): # <<<<<<<<<<<<<< * """ * For internal use only. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_71add_or_renew_pool, 0, __pyx_mstate_global->__pyx_n_u_Session_add_or_renew_pool, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[152])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_or_renew_pool, __pyx_t_14) < (0)) __PYX_ERR(0, 3316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3374 * return self.submit(run_add_or_renew_pool) * * def remove_pool(self, host): # <<<<<<<<<<<<<< * pool = self._pools.pop(host, None) * if pool: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_73remove_pool, 0, __pyx_mstate_global->__pyx_n_u_Session_remove_pool, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[153])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_remove_pool, __pyx_t_14) < (0)) __PYX_ERR(0, 3374, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3382 * return None * * def update_created_pools(self): # <<<<<<<<<<<<<< * """ * When the set of live nodes change, the loadbalancer will change its */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_75update_created_pools, 0, __pyx_mstate_global->__pyx_n_u_Session_update_created_pools, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[154])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_update_created_pools, __pyx_t_14) < (0)) __PYX_ERR(0, 3382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3415 * return futures * * def on_down(self, host): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when a node is marked down. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_77on_down, 0, __pyx_mstate_global->__pyx_n_u_Session_on_down, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[155])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_down, __pyx_t_14) < (0)) __PYX_ERR(0, 3415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3424 * future.add_done_callback(lambda f: self.update_created_pools()) * * def on_remove(self, host): # <<<<<<<<<<<<<< * """ Internal """ * self.on_down(host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_79on_remove, 0, __pyx_mstate_global->__pyx_n_u_Session_on_remove, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[156])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_remove, __pyx_t_14) < (0)) __PYX_ERR(0, 3424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3428 * self.on_down(host) * * def set_keyspace(self, keyspace): # <<<<<<<<<<<<<< * """ * Set the default keyspace for all queries made through this Session. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_81set_keyspace, 0, __pyx_mstate_global->__pyx_n_u_Session_set_keyspace, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[157])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_keyspace, __pyx_t_14) < (0)) __PYX_ERR(0, 3428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3435 * self.execute('USE %s' % (protect_name(keyspace),)) * * def _set_keyspace_for_all_pools(self, keyspace, callback): # <<<<<<<<<<<<<< * """ * Asynchronously sets the keyspace on all pools. When all */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_83_set_keyspace_for_all_pools, 0, __pyx_mstate_global->__pyx_n_u_Session__set_keyspace_for_all_po_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[158])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_keyspace_for_all_pools, __pyx_t_14) < (0)) __PYX_ERR(0, 3435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3462 * pool._set_keyspace_for_all_conns(keyspace, pool_finished_setting_keyspace) * * def user_type_registered(self, keyspace, user_type, klass): # <<<<<<<<<<<<<< * """ * Called by the parent Cluster instance when the user registers a new */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_85user_type_registered, 0, __pyx_mstate_global->__pyx_n_u_Session_user_type_registered, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[159])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_user_type_registered, __pyx_t_14) < (0)) __PYX_ERR(0, 3462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3490 * self.encoder.mapping[klass] = encode * * def submit(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ Internal """ * if not self.is_shutdown: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_87submit, 0, __pyx_mstate_global->__pyx_n_u_Session_submit, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[160])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_submit, __pyx_t_14) < (0)) __PYX_ERR(0, 3490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3495 * return self.cluster.executor.submit(fn, *args, **kwargs) * * def get_pool_state(self): # <<<<<<<<<<<<<< * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_89get_pool_state, 0, __pyx_mstate_global->__pyx_n_u_Session_get_pool_state, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[161])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_pool_state, __pyx_t_14) < (0)) __PYX_ERR(0, 3495, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3498 * return dict((host, pool.get_state()) for host, pool in tuple(self._pools.items())) * * def get_pools(self): # <<<<<<<<<<<<<< * return self._pools.values() * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_91get_pools, 0, __pyx_mstate_global->__pyx_n_u_Session_get_pools, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[162])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_pools, __pyx_t_14) < (0)) __PYX_ERR(0, 3498, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":3501 * return self._pools.values() * * def _validate_set_legacy_config(self, attr_name, value): # <<<<<<<<<<<<<< * if self.cluster._config_mode == _ConfigMode.PROFILES: * raise ValueError("Cannot set Session.%s while using Configuration Profiles. Set this in a profile instead." % (attr_name,)) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_7Session_93_validate_set_legacy_config, 0, __pyx_mstate_global->__pyx_n_u_Session__validate_set_legacy_con, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[163])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_validate_set_legacy_config, __pyx_t_14) < (0)) __PYX_ERR(0, 3501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":2354 * * * class Session(object): # <<<<<<<<<<<<<< * """ * A collection of connection pools for each host in the cluster. */ __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Session, __pyx_t_9, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Session, __pyx_t_14) < (0)) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":3508 * * * class UserTypeDoesNotExist(Exception): # <<<<<<<<<<<<<< * """ * An attempt was made to use a user-defined type that does not exist. */ __pyx_t_9 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_UserTypeDoesNotExist, __pyx_mstate_global->__pyx_n_u_UserTypeDoesNotExist, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_An_attempt_was_made_to_use_a_us); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_4 != __pyx_t_9) { if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_9) < 0))) __PYX_ERR(0, 3508, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_UserTypeDoesNotExist, __pyx_t_4, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_9); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_UserTypeDoesNotExist, __pyx_t_9) < (0)) __PYX_ERR(0, 3508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3517 * * * class _ControlReconnectionHandler(_ReconnectionHandler): # <<<<<<<<<<<<<< * """ * Internal */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ReconnectionHandler); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_11 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_Internal); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4 != __pyx_t_11) { if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(0, 3517, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3522 * """ * * def __init__(self, control_connection, *args, **kwargs): # <<<<<<<<<<<<<< * _ReconnectionHandler.__init__(self, *args, **kwargs) * self.control_connection = weakref.proxy(control_connection) */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler___in, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[164])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 3522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3526 * self.control_connection = weakref.proxy(control_connection) * * def try_reconnect(self): # <<<<<<<<<<<<<< * return self.control_connection._reconnect_internal() * */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_3try_reconnect, 0, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler_try, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[165])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_try_reconnect, __pyx_t_11) < (0)) __PYX_ERR(0, 3526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3529 * return self.control_connection._reconnect_internal() * * def on_reconnection(self, connection): # <<<<<<<<<<<<<< * self.control_connection._set_new_connection(connection) * */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_5on_reconnection, 0, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler_on_r, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[166])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_on_reconnection, __pyx_t_11) < (0)) __PYX_ERR(0, 3529, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3532 * self.control_connection._set_new_connection(connection) * * def on_exception(self, exc, next_delay): # <<<<<<<<<<<<<< * # TODO only overridden to add logging, so add logging * if isinstance(exc, AuthenticationFailed): */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_27_ControlReconnectionHandler_7on_exception, 0, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler_on_e, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[167])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_on_exception, __pyx_t_11) < (0)) __PYX_ERR(0, 3532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3517 * * * class _ControlReconnectionHandler(_ReconnectionHandler): # <<<<<<<<<<<<<< * """ * Internal */ __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ControlReconnectionHandler, __pyx_t_11) < (0)) __PYX_ERR(0, 3517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3541 * * * def _watch_callback(obj_weakref, method_name, *args, **kwargs): # <<<<<<<<<<<<<< * """ * A callback handler for the ControlConnection that tolerates */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_31_watch_callback, 0, __pyx_mstate_global->__pyx_n_u_watch_callback, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[168])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_watch_callback, __pyx_t_4) < (0)) __PYX_ERR(0, 3541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3552 * * * def _clear_watcher(conn, expiring_weakref): # <<<<<<<<<<<<<< * """ * Called when the ControlConnection object is about to be finalized. */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_33_clear_watcher, 0, __pyx_mstate_global->__pyx_n_u_clear_watcher, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[169])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_clear_watcher, __pyx_t_4) < (0)) __PYX_ERR(0, 3552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":3563 * * * class ControlConnection(object): # <<<<<<<<<<<<<< * """ * Internal */ __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[26]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_9 = __Pyx_Py3MetaclassPrepare(__pyx_t_14, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ControlConnection, __pyx_mstate_global->__pyx_n_u_ControlConnection, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_Internal); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_4 != __pyx_mstate_global->__pyx_tuple[26]) { if (unlikely((PyDict_SetItemString(__pyx_t_9, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[26]) < 0))) __PYX_ERR(0, 3563, __pyx_L1_error) } /* "cassandra/cluster.py":3568 * """ * * _SELECT_PEERS = "SELECT * FROM system.peers" # <<<<<<<<<<<<<< * _SELECT_PEERS_NO_TOKENS_TEMPLATE = "SELECT host_id, peer, data_center, rack, rpc_address, {nt_col_name}, release_version, schema_version FROM system.peers" * _SELECT_LOCAL = "SELECT * FROM system.local WHERE key='local'" */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS, __pyx_mstate_global->__pyx_kp_u_SELECT_FROM_system_peers) < (0)) __PYX_ERR(0, 3568, __pyx_L1_error) /* "cassandra/cluster.py":3569 * * _SELECT_PEERS = "SELECT * FROM system.peers" * _SELECT_PEERS_NO_TOKENS_TEMPLATE = "SELECT host_id, peer, data_center, rack, rpc_address, {nt_col_name}, release_version, schema_version FROM system.peers" # <<<<<<<<<<<<<< * _SELECT_LOCAL = "SELECT * FROM system.local WHERE key='local'" * _SELECT_LOCAL_NO_TOKENS = "SELECT host_id, cluster_name, data_center, rack, partitioner, release_version, schema_version FROM system.local WHERE key='local'" */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS_NO_TOKENS_TEMPLATE, __pyx_mstate_global->__pyx_kp_u_SELECT_host_id_peer_data_center) < (0)) __PYX_ERR(0, 3569, __pyx_L1_error) /* "cassandra/cluster.py":3570 * _SELECT_PEERS = "SELECT * FROM system.peers" * _SELECT_PEERS_NO_TOKENS_TEMPLATE = "SELECT host_id, peer, data_center, rack, rpc_address, {nt_col_name}, release_version, schema_version FROM system.peers" * _SELECT_LOCAL = "SELECT * FROM system.local WHERE key='local'" # <<<<<<<<<<<<<< * _SELECT_LOCAL_NO_TOKENS = "SELECT host_id, cluster_name, data_center, rack, partitioner, release_version, schema_version FROM system.local WHERE key='local'" * # Used only when token_metadata_enabled is set to False */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL, __pyx_mstate_global->__pyx_kp_u_SELECT_FROM_system_local_WHERE_k) < (0)) __PYX_ERR(0, 3570, __pyx_L1_error) /* "cassandra/cluster.py":3571 * _SELECT_PEERS_NO_TOKENS_TEMPLATE = "SELECT host_id, peer, data_center, rack, rpc_address, {nt_col_name}, release_version, schema_version FROM system.peers" * _SELECT_LOCAL = "SELECT * FROM system.local WHERE key='local'" * _SELECT_LOCAL_NO_TOKENS = "SELECT host_id, cluster_name, data_center, rack, partitioner, release_version, schema_version FROM system.local WHERE key='local'" # <<<<<<<<<<<<<< * # Used only when token_metadata_enabled is set to False * _SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS = "SELECT rpc_address FROM system.local WHERE key='local'" */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL_NO_TOKENS, __pyx_mstate_global->__pyx_kp_u_SELECT_host_id_cluster_name_data) < (0)) __PYX_ERR(0, 3571, __pyx_L1_error) /* "cassandra/cluster.py":3573 * _SELECT_LOCAL_NO_TOKENS = "SELECT host_id, cluster_name, data_center, rack, partitioner, release_version, schema_version FROM system.local WHERE key='local'" * # Used only when token_metadata_enabled is set to False * _SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS = "SELECT rpc_address FROM system.local WHERE key='local'" # <<<<<<<<<<<<<< * * _SELECT_SCHEMA_PEERS_TEMPLATE = "SELECT peer, host_id, {nt_col_name}, schema_version FROM system.peers" */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_LOCAL_NO_TOKENS_RPC_ADDR, __pyx_mstate_global->__pyx_kp_u_SELECT_rpc_address_FROM_system_l) < (0)) __PYX_ERR(0, 3573, __pyx_L1_error) /* "cassandra/cluster.py":3575 * _SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS = "SELECT rpc_address FROM system.local WHERE key='local'" * * _SELECT_SCHEMA_PEERS_TEMPLATE = "SELECT peer, host_id, {nt_col_name}, schema_version FROM system.peers" # <<<<<<<<<<<<<< * _SELECT_SCHEMA_LOCAL = "SELECT schema_version FROM system.local WHERE key='local'" * */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_SCHEMA_PEERS_TEMPLATE, __pyx_mstate_global->__pyx_kp_u_SELECT_peer_host_id_nt_col_name) < (0)) __PYX_ERR(0, 3575, __pyx_L1_error) /* "cassandra/cluster.py":3576 * * _SELECT_SCHEMA_PEERS_TEMPLATE = "SELECT peer, host_id, {nt_col_name}, schema_version FROM system.peers" * _SELECT_SCHEMA_LOCAL = "SELECT schema_version FROM system.local WHERE key='local'" # <<<<<<<<<<<<<< * * _SELECT_PEERS_V2 = "SELECT * FROM system.peers_v2" */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_SCHEMA_LOCAL, __pyx_mstate_global->__pyx_kp_u_SELECT_schema_version_FROM_syste) < (0)) __PYX_ERR(0, 3576, __pyx_L1_error) /* "cassandra/cluster.py":3578 * _SELECT_SCHEMA_LOCAL = "SELECT schema_version FROM system.local WHERE key='local'" * * _SELECT_PEERS_V2 = "SELECT * FROM system.peers_v2" # <<<<<<<<<<<<<< * _SELECT_PEERS_NO_TOKENS_V2 = "SELECT host_id, peer, peer_port, data_center, rack, native_address, native_port, release_version, schema_version FROM system.peers_v2" * _SELECT_SCHEMA_PEERS_V2 = "SELECT host_id, peer, peer_port, native_address, native_port, schema_version FROM system.peers_v2" */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS_V2, __pyx_mstate_global->__pyx_kp_u_SELECT_FROM_system_peers_v2) < (0)) __PYX_ERR(0, 3578, __pyx_L1_error) /* "cassandra/cluster.py":3579 * * _SELECT_PEERS_V2 = "SELECT * FROM system.peers_v2" * _SELECT_PEERS_NO_TOKENS_V2 = "SELECT host_id, peer, peer_port, data_center, rack, native_address, native_port, release_version, schema_version FROM system.peers_v2" # <<<<<<<<<<<<<< * _SELECT_SCHEMA_PEERS_V2 = "SELECT host_id, peer, peer_port, native_address, native_port, schema_version FROM system.peers_v2" * */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_PEERS_NO_TOKENS_V2, __pyx_mstate_global->__pyx_kp_u_SELECT_host_id_peer_peer_port_da) < (0)) __PYX_ERR(0, 3579, __pyx_L1_error) /* "cassandra/cluster.py":3580 * _SELECT_PEERS_V2 = "SELECT * FROM system.peers_v2" * _SELECT_PEERS_NO_TOKENS_V2 = "SELECT host_id, peer, peer_port, data_center, rack, native_address, native_port, release_version, schema_version FROM system.peers_v2" * _SELECT_SCHEMA_PEERS_V2 = "SELECT host_id, peer, peer_port, native_address, native_port, schema_version FROM system.peers_v2" # <<<<<<<<<<<<<< * * _MINIMUM_NATIVE_ADDRESS_DSE_VERSION = Version("6.0.0") */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_SELECT_SCHEMA_PEERS_V2, __pyx_mstate_global->__pyx_kp_u_SELECT_host_id_peer_peer_port_na) < (0)) __PYX_ERR(0, 3580, __pyx_L1_error) /* "cassandra/cluster.py":3582 * _SELECT_SCHEMA_PEERS_V2 = "SELECT host_id, peer, peer_port, native_address, native_port, schema_version FROM system.peers_v2" * * _MINIMUM_NATIVE_ADDRESS_DSE_VERSION = Version("6.0.0") # <<<<<<<<<<<<<< * * class PeersQueryType(object): */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_Version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_mstate_global->__pyx_kp_u_6_0_0}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_MINIMUM_NATIVE_ADDRESS_DSE_VERS, __pyx_t_11) < (0)) __PYX_ERR(0, 3582, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3584 * _MINIMUM_NATIVE_ADDRESS_DSE_VERSION = Version("6.0.0") * * class PeersQueryType(object): # <<<<<<<<<<<<<< * """internal Enum for _peers_query""" * PEERS = 0 */ __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[28]); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_11, __pyx_mstate_global->__pyx_n_u_PeersQueryType, __pyx_mstate_global->__pyx_n_u_ControlConnection_PeersQueryType, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_internal_Enum_for__peers_query); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_11 != __pyx_mstate_global->__pyx_tuple[28]) { if (unlikely((PyDict_SetItemString(__pyx_t_13, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[28]) < 0))) __PYX_ERR(0, 3584, __pyx_L1_error) } /* "cassandra/cluster.py":3586 * class PeersQueryType(object): * """internal Enum for _peers_query""" * PEERS = 0 # <<<<<<<<<<<<<< * PEERS_SCHEMA = 1 * */ if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_PEERS, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 3586, __pyx_L1_error) /* "cassandra/cluster.py":3587 * """internal Enum for _peers_query""" * PEERS = 0 * PEERS_SCHEMA = 1 # <<<<<<<<<<<<<< * * _is_shutdown = False */ if (__Pyx_SetNameInClass(__pyx_t_13, __pyx_mstate_global->__pyx_n_u_PEERS_SCHEMA, __pyx_mstate_global->__pyx_int_1) < (0)) __PYX_ERR(0, 3587, __pyx_L1_error) /* "cassandra/cluster.py":3584 * _MINIMUM_NATIVE_ADDRESS_DSE_VERSION = Version("6.0.0") * * class PeersQueryType(object): # <<<<<<<<<<<<<< * """internal Enum for _peers_query""" * PEERS = 0 */ __pyx_t_10 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PeersQueryType, __pyx_t_11, __pyx_t_13, NULL, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_PeersQueryType, __pyx_t_10) < (0)) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3589 * PEERS_SCHEMA = 1 * * _is_shutdown = False # <<<<<<<<<<<<<< * _timeout = None * _protocol_version = None */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_is_shutdown_2, Py_False) < (0)) __PYX_ERR(0, 3589, __pyx_L1_error) /* "cassandra/cluster.py":3590 * * _is_shutdown = False * _timeout = None # <<<<<<<<<<<<<< * _protocol_version = None * */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_timeout_2, Py_None) < (0)) __PYX_ERR(0, 3590, __pyx_L1_error) /* "cassandra/cluster.py":3591 * _is_shutdown = False * _timeout = None * _protocol_version = None # <<<<<<<<<<<<<< * * _schema_event_refresh_window = None */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_protocol_version_2, Py_None) < (0)) __PYX_ERR(0, 3591, __pyx_L1_error) /* "cassandra/cluster.py":3593 * _protocol_version = None * * _schema_event_refresh_window = None # <<<<<<<<<<<<<< * _topology_event_refresh_window = None * _status_event_refresh_window = None */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_schema_event_refresh_window_2, Py_None) < (0)) __PYX_ERR(0, 3593, __pyx_L1_error) /* "cassandra/cluster.py":3594 * * _schema_event_refresh_window = None * _topology_event_refresh_window = None # <<<<<<<<<<<<<< * _status_event_refresh_window = None * */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_topology_event_refresh_window_2, Py_None) < (0)) __PYX_ERR(0, 3594, __pyx_L1_error) /* "cassandra/cluster.py":3595 * _schema_event_refresh_window = None * _topology_event_refresh_window = None * _status_event_refresh_window = None # <<<<<<<<<<<<<< * * _schema_meta_enabled = True */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_status_event_refresh_window_2, Py_None) < (0)) __PYX_ERR(0, 3595, __pyx_L1_error) /* "cassandra/cluster.py":3597 * _status_event_refresh_window = None * * _schema_meta_enabled = True # <<<<<<<<<<<<<< * _token_meta_enabled = True * */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_schema_meta_enabled, Py_True) < (0)) __PYX_ERR(0, 3597, __pyx_L1_error) /* "cassandra/cluster.py":3598 * * _schema_meta_enabled = True * _token_meta_enabled = True # <<<<<<<<<<<<<< * * _uses_peers_v2 = True */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_token_meta_enabled, Py_True) < (0)) __PYX_ERR(0, 3598, __pyx_L1_error) /* "cassandra/cluster.py":3600 * _token_meta_enabled = True * * _uses_peers_v2 = True # <<<<<<<<<<<<<< * * # for testing purposes */ if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_uses_peers_v2, Py_True) < (0)) __PYX_ERR(0, 3600, __pyx_L1_error) /* "cassandra/cluster.py":3603 * * # for testing purposes * _time = time # <<<<<<<<<<<<<< * * def __init__(self, cluster, timeout, */ __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_time); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_time_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3605 * _time = time * * def __init__(self, cluster, timeout, # <<<<<<<<<<<<<< * schema_event_refresh_window, * topology_event_refresh_window, */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[170])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[29]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_11) < (0)) __PYX_ERR(0, 3605, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3631 * self._event_schedule_times = {} * * def connect(self): # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_3connect, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_connect, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[171])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_connect, __pyx_t_11) < (0)) __PYX_ERR(0, 3631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3640 * self._cluster.metadata.dbaas = self._connection._product_type == dscloud.DATASTAX_CLOUD_PRODUCT_TYPE * * def _set_new_connection(self, conn): # <<<<<<<<<<<<<< * """ * Replace existing connection (if there is one) and close it. */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_5_set_new_connection, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__set_new_conne, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[172])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_set_new_connection, __pyx_t_11) < (0)) __PYX_ERR(0, 3640, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3652 * old.close() * * def _reconnect_internal(self): # <<<<<<<<<<<<<< * """ * Tries to connect to each host in the query plan until one succeeds */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_7_reconnect_internal, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__reconnect_int, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[173])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_reconnect_internal, __pyx_t_11) < (0)) __PYX_ERR(0, 3652, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3683 * raise NoHostAvailable("Unable to connect to any servers", errors) * * def _try_connect(self, host): # <<<<<<<<<<<<<< * """ * Creates a new Connection, registers for pushed events, and refreshes */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_9_try_connect, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__try_connect, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[174])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_try_connect, __pyx_t_11) < (0)) __PYX_ERR(0, 3683, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3751 * return connection * * def reconnect(self): # <<<<<<<<<<<<<< * if self._is_shutdown: * return */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_11reconnect, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_reconnect, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[175])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3751, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_reconnect_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3751, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3757 * self._submit(self._reconnect) * * def _reconnect(self): # <<<<<<<<<<<<<< * log.debug("[control connection] Attempting to reconnect") * try: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_13_reconnect, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__reconnect, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[176])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_reconnect, __pyx_t_11) < (0)) __PYX_ERR(0, 3757, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3783 * raise * * def _get_and_set_reconnection_handler(self, new_handler): # <<<<<<<<<<<<<< * """ * Called by the _ControlReconnectionHandler when a new connection */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_15_get_and_set_reconnection_handler, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__get_and_set_r, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[177])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_get_and_set_reconnection_handle, __pyx_t_11) < (0)) __PYX_ERR(0, 3783, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3794 * return old * * def _submit(self, *args, **kwargs): # <<<<<<<<<<<<<< * try: * if not self._cluster.is_shutdown: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_17_submit, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__submit, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[178])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_submit_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3794, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3802 * return None * * def shutdown(self): # <<<<<<<<<<<<<< * # stop trying to reconnect (if we are) * with self._reconnection_lock: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_19shutdown, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_shutdown, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[179])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_shutdown, __pyx_t_11) < (0)) __PYX_ERR(0, 3802, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3819 * self._connection = None * * def refresh_schema(self, force=False, **kwargs): # <<<<<<<<<<<<<< * try: * if self._connection: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_21refresh_schema, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_refresh_schema, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[180])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[19]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_refresh_schema, __pyx_t_11) < (0)) __PYX_ERR(0, 3819, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3830 * return False * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): # <<<<<<<<<<<<<< * if self._cluster.is_shutdown: * return False */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_23_refresh_schema, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__refresh_schem, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[181])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[30]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_refresh_schema_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3850 * return True * * def refresh_node_list_and_token_map(self, force_token_rebuild=False): # <<<<<<<<<<<<<< * try: * if self._connection: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_25refresh_node_list_and_token_map, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_refresh_node_l, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[182])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[19]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map, __pyx_t_11) < (0)) __PYX_ERR(0, 3850, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3862 * return False * * def _refresh_node_list_and_token_map(self, connection, preloaded_results=None, # <<<<<<<<<<<<<< * force_token_rebuild=False): * if preloaded_results: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_27_refresh_node_list_and_token_map, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__refresh_node, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[183])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[18]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_refresh_node_list_and_token_map_2, __pyx_t_11) < (0)) __PYX_ERR(0, 3862, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3996 * self._cluster.metadata.rebuild_token_map(partitioner, token_map) * * @staticmethod # <<<<<<<<<<<<<< * def _is_valid_peer(row): * return bool(_NodeInfo.get_broadcast_rpc_address(row) and row.get("host_id") and */ __pyx_t_2 = NULL; __pyx_t_13 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_29_is_valid_peer, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_mstate_global->__pyx_n_u_ControlConnection__is_valid_peer, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[184])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_13); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_13}; __pyx_t_11 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_staticmethod, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_is_valid_peer, __pyx_t_11) < (0)) __PYX_ERR(0, 3996, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4002 * ('tokens' not in row or row.get('tokens'))) * * def _update_location_info(self, host, datacenter, rack): # <<<<<<<<<<<<<< * if host.datacenter == datacenter and host.rack == rack: * return False */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_31_update_location_info, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__update_locati, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[185])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_update_location_info, __pyx_t_11) < (0)) __PYX_ERR(0, 4002, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4014 * return True * * def _delay_for_event_type(self, event_type, delay_window): # <<<<<<<<<<<<<< * # this serves to order processing correlated events (received within the window) * # the window and randomization still have the desired effect of skew across client instances */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_33_delay_for_event_type, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__delay_for_eve, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[186])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_delay_for_event_type, __pyx_t_11) < (0)) __PYX_ERR(0, 4014, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4028 * return delay * * def _refresh_nodes_if_not_up(self, host): # <<<<<<<<<<<<<< * """ * Used to mitigate refreshes for nodes that are already known. */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_35_refresh_nodes_if_not_up, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__refresh_nodes, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[187])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_refresh_nodes_if_not_up, __pyx_t_11) < (0)) __PYX_ERR(0, 4028, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4036 * self.refresh_node_list_and_token_map() * * def _handle_topology_change(self, event): # <<<<<<<<<<<<<< * change_type = event["change_type"] * addr, port = event["address"] */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_37_handle_topology_change, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__handle_topolo, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[188])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_handle_topology_change, __pyx_t_11) < (0)) __PYX_ERR(0, 4036, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4047 * self._cluster.scheduler.schedule_unique(0, self._cluster.remove_host, host) * * def _handle_status_change(self, event): # <<<<<<<<<<<<<< * change_type = event["change_type"] * addr, port = event["address"] */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_39_handle_status_change, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__handle_status, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[189])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_handle_status_change, __pyx_t_11) < (0)) __PYX_ERR(0, 4047, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4067 * self._cluster.on_down(host, is_host_addition=False) * * def _handle_schema_change(self, event): # <<<<<<<<<<<<<< * if self._schema_event_refresh_window < 0: * return */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_41_handle_schema_change, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__handle_schema, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[190])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_handle_schema_change, __pyx_t_11) < (0)) __PYX_ERR(0, 4067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4073 * self._cluster.scheduler.schedule_unique(delay, self.refresh_schema, **event) * * def wait_for_schema_agreement(self, connection=None, preloaded_results=None, wait_time=None): # <<<<<<<<<<<<<< * * total_timeout = wait_time if wait_time is not None else self._cluster.max_schema_agreement_wait */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_43wait_for_schema_agreement, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_wait_for_schem, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[191])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[1]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_wait_for_schema_agreement, __pyx_t_11) < (0)) __PYX_ERR(0, 4073, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4137 * return False * * def _get_schema_mismatches(self, peers_result, local_result, local_address): # <<<<<<<<<<<<<< * peers_result = dict_factory(peers_result.column_names, peers_result.parsed_rows) * */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_45_get_schema_mismatches, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__get_schema_mi_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[192])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_get_schema_mismatches, __pyx_t_11) < (0)) __PYX_ERR(0, 4137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4161 * return dict((version, list(nodes)) for version, nodes in versions.items()) * * def _get_peers_query(self, peers_query_type, connection=None): # <<<<<<<<<<<<<< * """ * Determine the peers query to use. */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_47_get_peers_query, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__get_peers_que, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[193])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_get_peers_query, __pyx_t_11) < (0)) __PYX_ERR(0, 4161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4206 * return query * * def _signal_error(self): # <<<<<<<<<<<<<< * with self._lock: * if self._is_shutdown: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_49_signal_error, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection__signal_error, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[194])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_signal_error, __pyx_t_11) < (0)) __PYX_ERR(0, 4206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4226 * self.reconnect() * * def on_up(self, host): # <<<<<<<<<<<<<< * pass * */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_51on_up, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_on_up, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[195])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_on_up, __pyx_t_11) < (0)) __PYX_ERR(0, 4226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4229 * pass * * def on_down(self, host): # <<<<<<<<<<<<<< * * conn = self._connection */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_53on_down, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_on_down, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[196])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_on_down, __pyx_t_11) < (0)) __PYX_ERR(0, 4229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4239 * self.reconnect() * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if refresh_nodes: * self.refresh_node_list_and_token_map(force_token_rebuild=True) */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_55on_add, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_on_add, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[197])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_mstate_global->__pyx_tuple[20]); if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_on_add, __pyx_t_11) < (0)) __PYX_ERR(0, 4239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4243 * self.refresh_node_list_and_token_map(force_token_rebuild=True) * * def on_remove(self, host): # <<<<<<<<<<<<<< * c = self._connection * if c and c.endpoint == host.endpoint: */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_57on_remove, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_on_remove, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[198])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_on_remove, __pyx_t_11) < (0)) __PYX_ERR(0, 4243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4252 * self.refresh_node_list_and_token_map(force_token_rebuild=True) * * def get_connections(self): # <<<<<<<<<<<<<< * c = getattr(self, '_connection', None) * return [c] if c else [] */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_59get_connections, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_get_connection, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[199])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_get_connections, __pyx_t_11) < (0)) __PYX_ERR(0, 4252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":4256 * return [c] if c else [] * * def return_connection(self, connection): # <<<<<<<<<<<<<< * if connection is self._connection and (connection.is_defunct or connection.is_closed): * self.reconnect() */ __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_17ControlConnection_61return_connection, 0, __pyx_mstate_global->__pyx_n_u_ControlConnection_return_connect, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[200])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (__Pyx_SetNameInClass(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_return_connection, __pyx_t_11) < (0)) __PYX_ERR(0, 4256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "cassandra/cluster.py":3563 * * * class ControlConnection(object): # <<<<<<<<<<<<<< * """ * Internal */ __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ControlConnection, __pyx_t_4, __pyx_t_9, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_11); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ControlConnection, __pyx_t_11) < (0)) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4261 * * * def _stop_scheduler(scheduler, thread): # <<<<<<<<<<<<<< * try: * if not scheduler.is_shutdown: */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_35_stop_scheduler, 0, __pyx_mstate_global->__pyx_n_u_stop_scheduler, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[201])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_stop_scheduler, __pyx_t_4) < (0)) __PYX_ERR(0, 4261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4271 * * * class _Scheduler(Thread): # <<<<<<<<<<<<<< * * _queue = None */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_Thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_Scheduler, __pyx_mstate_global->__pyx_n_u_Scheduler, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_4 != __pyx_t_14) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_14) < 0))) __PYX_ERR(0, 4271, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4273 * class _Scheduler(Thread): * * _queue = None # <<<<<<<<<<<<<< * _scheduled_tasks = None * _executor = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_queue_2, Py_None) < (0)) __PYX_ERR(0, 4273, __pyx_L1_error) /* "cassandra/cluster.py":4274 * * _queue = None * _scheduled_tasks = None # <<<<<<<<<<<<<< * _executor = None * is_shutdown = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_scheduled_tasks, Py_None) < (0)) __PYX_ERR(0, 4274, __pyx_L1_error) /* "cassandra/cluster.py":4275 * _queue = None * _scheduled_tasks = None * _executor = None # <<<<<<<<<<<<<< * is_shutdown = False * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_executor_2, Py_None) < (0)) __PYX_ERR(0, 4275, __pyx_L1_error) /* "cassandra/cluster.py":4276 * _scheduled_tasks = None * _executor = None * is_shutdown = False # <<<<<<<<<<<<<< * * def __init__(self, executor): */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_shutdown, Py_False) < (0)) __PYX_ERR(0, 4276, __pyx_L1_error) /* "cassandra/cluster.py":4278 * is_shutdown = False * * def __init__(self, executor): # <<<<<<<<<<<<<< * self._queue = queue.PriorityQueue() * self._scheduled_tasks = set() */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_1__init__, 0, __pyx_mstate_global->__pyx_n_u_Scheduler___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[202])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 4278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4288 * self.start() * * def shutdown(self): # <<<<<<<<<<<<<< * try: * log.debug("Shutting down Cluster Scheduler") */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_3shutdown, 0, __pyx_mstate_global->__pyx_n_u_Scheduler_shutdown, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[203])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_shutdown, __pyx_t_14) < (0)) __PYX_ERR(0, 4288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4298 * self.join() * * def schedule(self, delay, fn, *args, **kwargs): # <<<<<<<<<<<<<< * self._insert_task(delay, (fn, args, tuple(kwargs.items()))) * */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_5schedule, 0, __pyx_mstate_global->__pyx_n_u_Scheduler_schedule, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[204])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schedule, __pyx_t_14) < (0)) __PYX_ERR(0, 4298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4301 * self._insert_task(delay, (fn, args, tuple(kwargs.items()))) * * def schedule_unique(self, delay, fn, *args, **kwargs): # <<<<<<<<<<<<<< * task = (fn, args, tuple(kwargs.items())) * if task not in self._scheduled_tasks: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_7schedule_unique, 0, __pyx_mstate_global->__pyx_n_u_Scheduler_schedule_unique, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[205])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_schedule_unique, __pyx_t_14) < (0)) __PYX_ERR(0, 4301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4308 * log.debug("Ignoring schedule_unique for already-scheduled task: %r", task) * * def _insert_task(self, delay, task): # <<<<<<<<<<<<<< * if not self.is_shutdown: * run_at = time.time() + delay */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_9_insert_task, 0, __pyx_mstate_global->__pyx_n_u_Scheduler__insert_task, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[206])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_insert_task, __pyx_t_14) < (0)) __PYX_ERR(0, 4308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4316 * log.debug("Ignoring scheduled task after shutdown: %r", task) * * def run(self): # <<<<<<<<<<<<<< * while True: * if self.is_shutdown: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_11run, 0, __pyx_mstate_global->__pyx_n_u_Scheduler_run, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[207])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_run, __pyx_t_14) < (0)) __PYX_ERR(0, 4316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4342 * time.sleep(0.1) * * def _log_if_failed(self, future): # <<<<<<<<<<<<<< * exc = future.exception() * if exc: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_10_Scheduler_13_log_if_failed, 0, __pyx_mstate_global->__pyx_n_u_Scheduler__log_if_failed, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[208])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_log_if_failed, __pyx_t_14) < (0)) __PYX_ERR(0, 4342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4271 * * * class _Scheduler(Thread): # <<<<<<<<<<<<<< * * _queue = None */ __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_Scheduler, __pyx_t_4, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Scheduler, __pyx_t_14) < (0)) __PYX_ERR(0, 4271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4350 * * * def refresh_schema_and_set_result(control_conn, response_future, connection, **kwargs): # <<<<<<<<<<<<<< * try: * log.debug("Refreshing schema in response to schema change. " */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_37refresh_schema_and_set_result, 0, __pyx_mstate_global->__pyx_n_u_refresh_schema_and_set_result, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[209])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_refresh_schema_and_set_result, __pyx_t_4) < (0)) __PYX_ERR(0, 4350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":4362 * * * class ResponseFuture(object): # <<<<<<<<<<<<<< * """ * An asynchronous response delivery mechanism that is returned from calls */ __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[32]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_9, __pyx_t_4, __pyx_mstate_global->__pyx_n_u_ResponseFuture, __pyx_mstate_global->__pyx_n_u_ResponseFuture, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_An_asynchronous_response_delive); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_4 != __pyx_mstate_global->__pyx_tuple[32]) { if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[32]) < 0))) __PYX_ERR(0, 4362, __pyx_L1_error) } /* "cassandra/cluster.py":4374 * """ * * query = None # <<<<<<<<<<<<<< * """ * The :class:`~.Statement` instance that is being executed through this */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_query, Py_None) < (0)) __PYX_ERR(0, 4374, __pyx_L1_error) /* "cassandra/cluster.py":4380 * """ * * is_schema_agreed = True # <<<<<<<<<<<<<< * """ * For DDL requests, this may be set ``False`` if the schema agreement poll after the response fails. */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_is_schema_agreed, Py_True) < (0)) __PYX_ERR(0, 4380, __pyx_L1_error) /* "cassandra/cluster.py":4387 * """ * * request_encoded_size = None # <<<<<<<<<<<<<< * """ * Size of the request message sent */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_request_encoded_size, Py_None) < (0)) __PYX_ERR(0, 4387, __pyx_L1_error) /* "cassandra/cluster.py":4392 * """ * * coordinator_host = None # <<<<<<<<<<<<<< * """ * The host from which we received a response */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_coordinator_host, Py_None) < (0)) __PYX_ERR(0, 4392, __pyx_L1_error) /* "cassandra/cluster.py":4397 * """ * * attempted_hosts = None # <<<<<<<<<<<<<< * """ * A list of hosts tried, including all speculative executions, retries, and pages */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_attempted_hosts, Py_None) < (0)) __PYX_ERR(0, 4397, __pyx_L1_error) /* "cassandra/cluster.py":4402 * """ * * session = None # <<<<<<<<<<<<<< * row_factory = None * message = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_session, Py_None) < (0)) __PYX_ERR(0, 4402, __pyx_L1_error) /* "cassandra/cluster.py":4403 * * session = None * row_factory = None # <<<<<<<<<<<<<< * message = None * default_timeout = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_row_factory, Py_None) < (0)) __PYX_ERR(0, 4403, __pyx_L1_error) /* "cassandra/cluster.py":4404 * session = None * row_factory = None * message = None # <<<<<<<<<<<<<< * default_timeout = None * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_message, Py_None) < (0)) __PYX_ERR(0, 4404, __pyx_L1_error) /* "cassandra/cluster.py":4405 * row_factory = None * message = None * default_timeout = None # <<<<<<<<<<<<<< * * _retry_policy = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_default_timeout_2, Py_None) < (0)) __PYX_ERR(0, 4405, __pyx_L1_error) /* "cassandra/cluster.py":4407 * default_timeout = None * * _retry_policy = None # <<<<<<<<<<<<<< * _profile_manager = None * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_retry_policy_2, Py_None) < (0)) __PYX_ERR(0, 4407, __pyx_L1_error) /* "cassandra/cluster.py":4408 * * _retry_policy = None * _profile_manager = None # <<<<<<<<<<<<<< * * _req_id = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_profile_manager_2, Py_None) < (0)) __PYX_ERR(0, 4408, __pyx_L1_error) /* "cassandra/cluster.py":4410 * _profile_manager = None * * _req_id = None # <<<<<<<<<<<<<< * _final_result = _NOT_SET * _col_names = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_req_id, Py_None) < (0)) __PYX_ERR(0, 4410, __pyx_L1_error) /* "cassandra/cluster.py":4411 * * _req_id = None * _final_result = _NOT_SET # <<<<<<<<<<<<<< * _col_names = None * _col_types = None */ __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_NOT_SET); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_final_result, __pyx_t_14) < (0)) __PYX_ERR(0, 4411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4412 * _req_id = None * _final_result = _NOT_SET * _col_names = None # <<<<<<<<<<<<<< * _col_types = None * _final_exception = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_col_names, Py_None) < (0)) __PYX_ERR(0, 4412, __pyx_L1_error) /* "cassandra/cluster.py":4413 * _final_result = _NOT_SET * _col_names = None * _col_types = None # <<<<<<<<<<<<<< * _final_exception = None * _query_traces = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_col_types, Py_None) < (0)) __PYX_ERR(0, 4413, __pyx_L1_error) /* "cassandra/cluster.py":4414 * _col_names = None * _col_types = None * _final_exception = None # <<<<<<<<<<<<<< * _query_traces = None * _callbacks = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_final_exception, Py_None) < (0)) __PYX_ERR(0, 4414, __pyx_L1_error) /* "cassandra/cluster.py":4415 * _col_types = None * _final_exception = None * _query_traces = None # <<<<<<<<<<<<<< * _callbacks = None * _errbacks = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_query_traces, Py_None) < (0)) __PYX_ERR(0, 4415, __pyx_L1_error) /* "cassandra/cluster.py":4416 * _final_exception = None * _query_traces = None * _callbacks = None # <<<<<<<<<<<<<< * _errbacks = None * _current_host = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_callbacks, Py_None) < (0)) __PYX_ERR(0, 4416, __pyx_L1_error) /* "cassandra/cluster.py":4417 * _query_traces = None * _callbacks = None * _errbacks = None # <<<<<<<<<<<<<< * _current_host = None * _connection = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_errbacks, Py_None) < (0)) __PYX_ERR(0, 4417, __pyx_L1_error) /* "cassandra/cluster.py":4418 * _callbacks = None * _errbacks = None * _current_host = None # <<<<<<<<<<<<<< * _connection = None * _query_retries = 0 */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_current_host, Py_None) < (0)) __PYX_ERR(0, 4418, __pyx_L1_error) /* "cassandra/cluster.py":4419 * _errbacks = None * _current_host = None * _connection = None # <<<<<<<<<<<<<< * _query_retries = 0 * _start_time = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_connection, Py_None) < (0)) __PYX_ERR(0, 4419, __pyx_L1_error) /* "cassandra/cluster.py":4420 * _current_host = None * _connection = None * _query_retries = 0 # <<<<<<<<<<<<<< * _start_time = None * _metrics = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_query_retries, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 4420, __pyx_L1_error) /* "cassandra/cluster.py":4421 * _connection = None * _query_retries = 0 * _start_time = None # <<<<<<<<<<<<<< * _metrics = None * _paging_state = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_start_time_2, Py_None) < (0)) __PYX_ERR(0, 4421, __pyx_L1_error) /* "cassandra/cluster.py":4422 * _query_retries = 0 * _start_time = None * _metrics = None # <<<<<<<<<<<<<< * _paging_state = None * _custom_payload = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_metrics_2, Py_None) < (0)) __PYX_ERR(0, 4422, __pyx_L1_error) /* "cassandra/cluster.py":4423 * _start_time = None * _metrics = None * _paging_state = None # <<<<<<<<<<<<<< * _custom_payload = None * _warnings = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_paging_state_2, Py_None) < (0)) __PYX_ERR(0, 4423, __pyx_L1_error) /* "cassandra/cluster.py":4424 * _metrics = None * _paging_state = None * _custom_payload = None # <<<<<<<<<<<<<< * _warnings = None * _timer = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_custom_payload_2, Py_None) < (0)) __PYX_ERR(0, 4424, __pyx_L1_error) /* "cassandra/cluster.py":4425 * _paging_state = None * _custom_payload = None * _warnings = None # <<<<<<<<<<<<<< * _timer = None * _protocol_handler = ProtocolHandler */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_warnings, Py_None) < (0)) __PYX_ERR(0, 4425, __pyx_L1_error) /* "cassandra/cluster.py":4426 * _custom_payload = None * _warnings = None * _timer = None # <<<<<<<<<<<<<< * _protocol_handler = ProtocolHandler * _spec_execution_plan = NoSpeculativeExecutionPlan() */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_timer, Py_None) < (0)) __PYX_ERR(0, 4426, __pyx_L1_error) /* "cassandra/cluster.py":4427 * _warnings = None * _timer = None * _protocol_handler = ProtocolHandler # <<<<<<<<<<<<<< * _spec_execution_plan = NoSpeculativeExecutionPlan() * _continuous_paging_options = None */ __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_ProtocolHandler_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_protocol_handler, __pyx_t_14) < (0)) __PYX_ERR(0, 4427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4428 * _timer = None * _protocol_handler = ProtocolHandler * _spec_execution_plan = NoSpeculativeExecutionPlan() # <<<<<<<<<<<<<< * _continuous_paging_options = None * _continuous_paging_session = None */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_NoSpeculativeExecutionPlan); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_spec_execution_plan, __pyx_t_14) < (0)) __PYX_ERR(0, 4428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4429 * _protocol_handler = ProtocolHandler * _spec_execution_plan = NoSpeculativeExecutionPlan() * _continuous_paging_options = None # <<<<<<<<<<<<<< * _continuous_paging_session = None * _host = None */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_continuous_paging_options_2, Py_None) < (0)) __PYX_ERR(0, 4429, __pyx_L1_error) /* "cassandra/cluster.py":4430 * _spec_execution_plan = NoSpeculativeExecutionPlan() * _continuous_paging_options = None * _continuous_paging_session = None # <<<<<<<<<<<<<< * _host = None * */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_continuous_paging_session, Py_None) < (0)) __PYX_ERR(0, 4430, __pyx_L1_error) /* "cassandra/cluster.py":4431 * _continuous_paging_options = None * _continuous_paging_session = None * _host = None # <<<<<<<<<<<<<< * * _warned_timeout = False */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_host_2, Py_None) < (0)) __PYX_ERR(0, 4431, __pyx_L1_error) /* "cassandra/cluster.py":4433 * _host = None * * _warned_timeout = False # <<<<<<<<<<<<<< * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, */ if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_warned_timeout, Py_False) < (0)) __PYX_ERR(0, 4433, __pyx_L1_error) /* "cassandra/cluster.py":4435 * _warned_timeout = False * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, # <<<<<<<<<<<<<< * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, * speculative_execution_plan=None, continuous_paging_state=None, host=None): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[210])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 4435, __pyx_L1_error) /* "cassandra/cluster.py":4436 * * def __init__(self, session, message, query, timeout, metrics=None, prepared_statement=None, * retry_policy=RetryPolicy(), row_factory=None, load_balancer=None, start_time=None, # <<<<<<<<<<<<<< * speculative_execution_plan=None, continuous_paging_state=None, host=None): * self.session = session */ __pyx_t_13 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_RetryPolicy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_62__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_14) < (0)) __PYX_ERR(0, 4435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4461 * self._continuous_paging_state = continuous_paging_state * * @property # <<<<<<<<<<<<<< * def _time_remaining(self): * if self.timeout is None: */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_3_time_remaining, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__time_remaining, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[211])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_time_remaining, __pyx_t_14) < (0)) __PYX_ERR(0, 4461, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4467 * return (self._start_time + self.timeout) - time.time() * * def _start_timer(self): # <<<<<<<<<<<<<< * if self._timer is None: * spec_delay = self._spec_execution_plan.next_execution(self._current_host) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_5_start_timer, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__start_timer, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[212])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_start_timer, __pyx_t_14) < (0)) __PYX_ERR(0, 4467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4477 * self._timer = self.session.cluster.connection_class.create_timer(self._time_remaining, self._on_timeout) * * def _cancel_timer(self): # <<<<<<<<<<<<<< * if self._timer: * self._timer.cancel() */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_7_cancel_timer, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__cancel_timer, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[213])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_cancel_timer, __pyx_t_14) < (0)) __PYX_ERR(0, 4477, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4481 * self._timer.cancel() * * def _on_timeout(self, _attempts=0): # <<<<<<<<<<<<<< * """ * Called when the request associated with this ResponseFuture times out. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_9_on_timeout, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__on_timeout, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[214])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[33]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_timeout, __pyx_t_14) < (0)) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4536 * self._set_final_exception(OperationTimedOut(errors, self._current_host)) * * def _on_speculative_execute(self): # <<<<<<<<<<<<<< * self._timer = None * if not self._event.is_set(): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_11_on_speculative_execute, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__on_speculative_e, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[215])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_on_speculative_execute, __pyx_t_14) < (0)) __PYX_ERR(0, 4536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4558 * self._start_timer() * * def _make_query_plan(self): # <<<<<<<<<<<<<< * # set the query_plan according to the load balancing policy, * # or to the explicit host target if set */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_13_make_query_plan, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__make_query_plan, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[216])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_make_query_plan_2, __pyx_t_14) < (0)) __PYX_ERR(0, 4558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4570 * self.query_plan = iter(self._load_balancer.make_query_plan(self.session.keyspace, self.query)) * * def send_request(self, error_no_hosts=True): # <<<<<<<<<<<<<< * """ Internal """ * # query_plan is an iterator, so this will resume where we last left */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_15send_request, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_send_request, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[217])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[20]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_send_request, __pyx_t_14) < (0)) __PYX_ERR(0, 4570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4587 * return False * * def _query(self, host, message=None, cb=None): # <<<<<<<<<<<<<< * if message is None: * message = self.message */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_17_query, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__query, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[218])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[0]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_query_2, __pyx_t_14) < (0)) __PYX_ERR(0, 4587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4633 * return None * * @property # <<<<<<<<<<<<<< * def has_more_pages(self): * """ */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_19has_more_pages, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_has_more_pages, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[219])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_has_more_pages, __pyx_t_14) < (0)) __PYX_ERR(0, 4633, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4644 * return self._paging_state is not None * * @property # <<<<<<<<<<<<<< * def warnings(self): * """ */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_21warnings, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_warnings, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[220])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 4644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_warnings_2, __pyx_t_14) < (0)) __PYX_ERR(0, 4644, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4662 * return self._warnings * * @property # <<<<<<<<<<<<<< * def custom_payload(self): * """ */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_23custom_payload, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_custom_payload, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[221])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_14 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); } if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_custom_payload, __pyx_t_14) < (0)) __PYX_ERR(0, 4662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4680 * return self._custom_payload * * def start_fetching_next_page(self): # <<<<<<<<<<<<<< * """ * If there are more pages left in the query result, this asynchronously */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_25start_fetching_next_page, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_start_fetching_ne, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[222])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_start_fetching_next_page, __pyx_t_14) < (0)) __PYX_ERR(0, 4680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4701 * self.send_request() * * def _reprepare(self, prepare_message, host, connection, pool): # <<<<<<<<<<<<<< * cb = partial(self.session.submit, self._execute_after_prepare, host, connection, pool) * request_id = self._query(host, prepare_message, cb=cb) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_27_reprepare, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__reprepare, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[223])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_reprepare, __pyx_t_14) < (0)) __PYX_ERR(0, 4701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4708 * self.send_request() * * def _set_result(self, host, connection, pool, response): # <<<<<<<<<<<<<< * try: * self.coordinator_host = host */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_29_set_result, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__set_result, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[224])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_result, __pyx_t_14) < (0)) __PYX_ERR(0, 4708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4860 * self._set_final_exception(exc) * * def _handle_continuous_paging_first_response(self, connection, response): # <<<<<<<<<<<<<< * self._continuous_paging_session = connection.new_continuous_paging_session(response.stream_id, * self._protocol_handler.decode_message, */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_31_handle_continuous_paging_first_response, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__handle_continuou, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[225])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_handle_continuous_paging_first, __pyx_t_14) < (0)) __PYX_ERR(0, 4860, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4868 * self._set_final_result(self._continuous_paging_session.results()) * * def _set_keyspace_completed(self, errors): # <<<<<<<<<<<<<< * if not errors: * self._set_final_result(None) */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_33_set_keyspace_completed, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__set_keyspace_com, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[226])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4868, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_keyspace_completed, __pyx_t_14) < (0)) __PYX_ERR(0, 4868, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4875 * "Failed to set keyspace on all hosts: %s" % (errors,))) * * def _execute_after_prepare(self, host, connection, pool, response): # <<<<<<<<<<<<<< * """ * Handle the response to our attempt to prepare a statement. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_35_execute_after_prepare, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__execute_after_pr, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[227])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_execute_after_prepare, __pyx_t_14) < (0)) __PYX_ERR(0, 4875, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4929 * "statement on host %s: %s" % (host, response))) * * def _set_final_result(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_37_set_final_result, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__set_final_result_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[228])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_final_result, __pyx_t_14) < (0)) __PYX_ERR(0, 4929, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4951 * callback_partial() * * def _set_final_exception(self, response): # <<<<<<<<<<<<<< * self._cancel_timer() * if self._metrics is not None: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_39_set_final_exception, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__set_final_except_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[229])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4951, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_set_final_exception, __pyx_t_14) < (0)) __PYX_ERR(0, 4951, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4972 * callback_partial() * * def _handle_retry_decision(self, retry_decision, response, host): # <<<<<<<<<<<<<< * * def exception_from_response(response): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_41_handle_retry_decision, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__handle_retry_dec_2, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[230])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_handle_retry_decision, __pyx_t_14) < (0)) __PYX_ERR(0, 4972, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4994 * self._errors[host] = exception_from_response(response) * * def _retry(self, reuse_connection, consistency_level, host): # <<<<<<<<<<<<<< * if self._final_exception: * # the connection probably broke while we were waiting */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_43_retry, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__retry, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[231])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4994, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_retry, __pyx_t_14) < (0)) __PYX_ERR(0, 4994, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5008 * self.session.submit(self._retry_task, reuse_connection, host) * * def _retry_task(self, reuse_connection, host): # <<<<<<<<<<<<<< * if self._final_exception: * # the connection probably broke while we were waiting */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_45_retry_task, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__retry_task, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[232])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_retry_task, __pyx_t_14) < (0)) __PYX_ERR(0, 5008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5020 * self.send_request() * * def result(self): # <<<<<<<<<<<<<< * """ * Return the final result or raise an Exception if errors were */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_47result, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_result, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[233])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5020, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_result, __pyx_t_14) < (0)) __PYX_ERR(0, 5020, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5051 * raise self._final_exception * * def get_query_trace_ids(self): # <<<<<<<<<<<<<< * """ * Returns the trace session ids for this future, if tracing was enabled (does not fetch trace data). */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_49get_query_trace_ids, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_get_query_trace_i, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[234])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5051, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_query_trace_ids, __pyx_t_14) < (0)) __PYX_ERR(0, 5051, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5057 * return [trace.trace_id for trace in self._query_traces] * * def get_query_trace(self, max_wait=None, query_cl=ConsistencyLevel.LOCAL_ONE): # <<<<<<<<<<<<<< * """ * Fetches and returns the query trace of the last response, or `None` if tracing was */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_51get_query_trace, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_get_query_trace, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[235])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_LOCAL_ONE); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_10; __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_64__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_query_trace_2, __pyx_t_14) < (0)) __PYX_ERR(0, 5057, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5078 * return self._get_query_trace(len(self._query_traces) - 1, max_wait, query_cl) * * def get_all_query_traces(self, max_wait_per=None, query_cl=ConsistencyLevel.LOCAL_ONE): # <<<<<<<<<<<<<< * """ * Fetches and returns the query traces for all query pages, if tracing was enabled. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_53get_all_query_traces, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_get_all_query_tra, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[236])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (!__Pyx_CyFunction_InitDefaults(__pyx_t_14, __pyx_mstate_global->__pyx_ptype_9cassandra_7cluster___pyx_defaults)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_ConsistencyLevel); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_LOCAL_ONE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_14)->arg0 = __pyx_t_2; __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_14, __pyx_pf_9cassandra_7cluster_66__defaults__); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_all_query_traces, __pyx_t_14) < (0)) __PYX_ERR(0, 5078, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5088 * return [] * * def _get_query_trace(self, i, max_wait, query_cl): # <<<<<<<<<<<<<< * trace = self._query_traces[i] * if not trace.events: */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_55_get_query_trace, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture__get_query_trace, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[237])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_get_query_trace, __pyx_t_14) < (0)) __PYX_ERR(0, 5088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5094 * return trace * * def add_callback(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Attaches a callback function to be called when the final results arrive. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_57add_callback, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_add_callback, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[238])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5094, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_callback, __pyx_t_14) < (0)) __PYX_ERR(0, 5094, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5143 * return self * * def add_errback(self, fn, *args, **kwargs): # <<<<<<<<<<<<<< * """ * Like :meth:`.add_callback()`, but handles error cases. */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_59add_errback, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_add_errback, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[239])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_errback, __pyx_t_14) < (0)) __PYX_ERR(0, 5143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5161 * return self * * def add_callbacks(self, callback, errback, # <<<<<<<<<<<<<< * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_61add_callbacks, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_add_callbacks, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[240])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_14, __pyx_mstate_global->__pyx_tuple[34]); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_add_callbacks, __pyx_t_14) < (0)) __PYX_ERR(0, 5161, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5189 * self.add_errback(errback, *errback_args, **(errback_kwargs or {})) * * def clear_callbacks(self): # <<<<<<<<<<<<<< * with self._callback_lock: * self._callbacks = [] */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_63clear_callbacks, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture_clear_callbacks, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[241])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_clear_callbacks, __pyx_t_14) < (0)) __PYX_ERR(0, 5189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5194 * self._errbacks = [] * * def __str__(self): # <<<<<<<<<<<<<< * result = "(no result yet)" if self._final_result is _NOT_SET else self._final_result * return "" \ */ __pyx_t_14 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_14ResponseFuture_65__str__, 0, __pyx_mstate_global->__pyx_n_u_ResponseFuture___str, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[242])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_str, __pyx_t_14) < (0)) __PYX_ERR(0, 5194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":5198 * return "" \ * % (self.query, self._req_id, result, self._final_exception, self.coordinator_host) * __repr__ = __str__ # <<<<<<<<<<<<<< * * */ __pyx_t_14 = PyObject_GetItem(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_str); if (unlikely(!__pyx_t_14)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_str); } if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_14) < (0)) __PYX_ERR(0, 5198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; /* "cassandra/cluster.py":4362 * * * class ResponseFuture(object): # <<<<<<<<<<<<<< * """ * An asynchronous response delivery mechanism that is returned from calls */ __pyx_t_14 = __Pyx_Py3ClassCreate(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_ResponseFuture, __pyx_t_4, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_14); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ResponseFuture, __pyx_t_14) < (0)) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5201 * * * class QueryExhausted(Exception): # <<<<<<<<<<<<<< * """ * Raised when :meth:`.ResponseFuture.start_fetching_next_page()` is called and */ __pyx_t_4 = PyTuple_Pack(1, ((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_QueryExhausted, __pyx_mstate_global->__pyx_n_u_QueryExhausted, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_Raised_when_meth_ResponseFuture); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_9 != __pyx_t_4) { if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 5201, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_QueryExhausted, __pyx_t_9, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_QueryExhausted, __pyx_t_4) < (0)) __PYX_ERR(0, 5201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":5212 * * * class ResultSet(object): # <<<<<<<<<<<<<< * """ * An iterator over the rows from a query result. Also supplies basic equality */ __pyx_t_9 = __Pyx_PEP560_update_bases(__pyx_mstate_global->__pyx_tuple[36]); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_14 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_9, __pyx_mstate_global->__pyx_n_u_ResultSet, __pyx_mstate_global->__pyx_n_u_ResultSet, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_kp_u_An_iterator_over_the_rows_from); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (__pyx_t_9 != __pyx_mstate_global->__pyx_tuple[36]) { if (unlikely((PyDict_SetItemString(__pyx_t_14, "__orig_bases__", __pyx_mstate_global->__pyx_tuple[36]) < 0))) __PYX_ERR(0, 5212, __pyx_L1_error) } /* "cassandra/cluster.py":5233 * """ * * def __init__(self, response_future, initial_response): # <<<<<<<<<<<<<< * self.response_future = response_future * self.column_names = response_future._col_names */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_1__init__, 0, __pyx_mstate_global->__pyx_n_u_ResultSet___init, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[243])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_init, __pyx_t_4) < (0)) __PYX_ERR(0, 5233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5241 * self._list_mode = False * * @property # <<<<<<<<<<<<<< * def has_more_pages(self): * """ */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_3has_more_pages, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_has_more_pages, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[244])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_has_more_pages, __pyx_t_4) < (0)) __PYX_ERR(0, 5241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5248 * return self.response_future.has_more_pages * * @property # <<<<<<<<<<<<<< * def current_rows(self): * """ */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_5current_rows, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_current_rows, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[245])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_current_rows_2, __pyx_t_4) < (0)) __PYX_ERR(0, 5248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5256 * return self._current_rows or [] * * def all(self): # <<<<<<<<<<<<<< * """ * Returns all the remaining rows as a list. This is basically */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_7all, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_all, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[246])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_all, __pyx_t_4) < (0)) __PYX_ERR(0, 5256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5265 * return list(self) * * def one(self): # <<<<<<<<<<<<<< * """ * Return a single row of the results or None if empty. This is basically */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_9one, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_one, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[247])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_one, __pyx_t_4) < (0)) __PYX_ERR(0, 5265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5281 * return row * * def __iter__(self): # <<<<<<<<<<<<<< * if self._list_mode: * return iter(self._current_rows) */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_11__iter__, 0, __pyx_mstate_global->__pyx_n_u_ResultSet___iter, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[248])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_iter, __pyx_t_4) < (0)) __PYX_ERR(0, 5281, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5287 * return self * * def next(self): # <<<<<<<<<<<<<< * try: * return next(self._page_iter) */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_13next, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_next, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[249])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_next, __pyx_t_4) < (0)) __PYX_ERR(0, 5287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5308 * return next(self._page_iter) * * __next__ = next # <<<<<<<<<<<<<< * * def fetch_next_page(self): */ __pyx_t_4 = PyObject_GetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_next); if (unlikely(!__pyx_t_4)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_next); } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_next_2, __pyx_t_4) < (0)) __PYX_ERR(0, 5308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5310 * __next__ = next * * def fetch_next_page(self): # <<<<<<<<<<<<<< * """ * Manually, synchronously fetch the next page. Supplied for manually retrieving pages */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_15fetch_next_page, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_fetch_next_page, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[250])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_fetch_next_page, __pyx_t_4) < (0)) __PYX_ERR(0, 5310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5323 * self._current_rows = [] * * def _set_current_rows(self, result): # <<<<<<<<<<<<<< * if isinstance(result, Mapping): * self._current_rows = [result] if result else [] */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_17_set_current_rows, 0, __pyx_mstate_global->__pyx_n_u_ResultSet__set_current_rows, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[251])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_set_current_rows, __pyx_t_4) < (0)) __PYX_ERR(0, 5323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5333 * self._current_rows = [result] if result else [] * * def _fetch_all(self): # <<<<<<<<<<<<<< * self._current_rows = list(self) * self._page_iter = None */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_19_fetch_all, 0, __pyx_mstate_global->__pyx_n_u_ResultSet__fetch_all, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[252])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_fetch_all, __pyx_t_4) < (0)) __PYX_ERR(0, 5333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5337 * self._page_iter = None * * def _enter_list_mode(self, operator): # <<<<<<<<<<<<<< * if self._list_mode: * return */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_21_enter_list_mode, 0, __pyx_mstate_global->__pyx_n_u_ResultSet__enter_list_mode, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[253])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_enter_list_mode, __pyx_t_4) < (0)) __PYX_ERR(0, 5337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5347 * self._list_mode = True * * def __eq__(self, other): # <<<<<<<<<<<<<< * self._enter_list_mode("equality operator") * return self._current_rows == other */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_23__eq__, 0, __pyx_mstate_global->__pyx_n_u_ResultSet___eq, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[254])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_eq, __pyx_t_4) < (0)) __PYX_ERR(0, 5347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5351 * return self._current_rows == other * * def __getitem__(self, i): # <<<<<<<<<<<<<< * if i == 0: * warn("ResultSet indexing support will be removed in 4.0. Consider using " */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_25__getitem__, 0, __pyx_mstate_global->__pyx_n_u_ResultSet___getitem, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[255])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_getitem, __pyx_t_4) < (0)) __PYX_ERR(0, 5351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5358 * return self._current_rows[i] * * def __nonzero__(self): # <<<<<<<<<<<<<< * return bool(self._current_rows) * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_27__nonzero__, 0, __pyx_mstate_global->__pyx_n_u_ResultSet___nonzero, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[256])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_nonzero, __pyx_t_4) < (0)) __PYX_ERR(0, 5358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5361 * return bool(self._current_rows) * * __bool__ = __nonzero__ # <<<<<<<<<<<<<< * * def get_query_trace(self, max_wait_sec=None): */ __pyx_t_4 = PyObject_GetItem(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_nonzero); if (unlikely(!__pyx_t_4)) { PyErr_Clear(); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_nonzero); } if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_bool, __pyx_t_4) < (0)) __PYX_ERR(0, 5361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5363 * __bool__ = __nonzero__ * * def get_query_trace(self, max_wait_sec=None): # <<<<<<<<<<<<<< * """ * Gets the last query trace from the associated future. */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_29get_query_trace, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_get_query_trace, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[257])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_get_query_trace_2, __pyx_t_4) < (0)) __PYX_ERR(0, 5363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5370 * return self.response_future.get_query_trace(max_wait_sec) * * def get_all_query_traces(self, max_wait_sec_per=None): # <<<<<<<<<<<<<< * """ * Gets all query traces from the associated future. */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_31get_all_query_traces, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_get_all_query_traces, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[258])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[22]); if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_get_all_query_traces, __pyx_t_4) < (0)) __PYX_ERR(0, 5370, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5377 * return self.response_future.get_all_query_traces(max_wait_sec_per) * * def cancel_continuous_paging(self): # <<<<<<<<<<<<<< * try: * self.response_future._continuous_paging_session.cancel() */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_33cancel_continuous_paging, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_cancel_continuous_pagi, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[259])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_cancel_continuous_paging, __pyx_t_4) < (0)) __PYX_ERR(0, 5377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5383 * raise DriverException("Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.") * * @property # <<<<<<<<<<<<<< * def was_applied(self): * """ */ __pyx_t_2 = NULL; __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_35was_applied, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_was_applied, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[260])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 5383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_10); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_was_applied, __pyx_t_4) < (0)) __PYX_ERR(0, 5383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5410 * return row['[applied]'] * * @property # <<<<<<<<<<<<<< * def paging_state(self): * """ */ __pyx_t_10 = NULL; __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_9cassandra_7cluster_9ResultSet_37paging_state, 0, __pyx_mstate_global->__pyx_n_u_ResultSet_paging_state, NULL, __pyx_mstate_global->__pyx_n_u_cassandra_cluster, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[261])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __pyx_t_12 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_builtin_property, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } if (__Pyx_SetNameInClass(__pyx_t_14, __pyx_mstate_global->__pyx_n_u_paging_state, __pyx_t_4) < (0)) __PYX_ERR(0, 5410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cassandra/cluster.py":5212 * * * class ResultSet(object): # <<<<<<<<<<<<<< * """ * An iterator over the rows from a query result. Also supplies basic equality */ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_ResultSet, __pyx_t_9, __pyx_t_14, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ResultSet, __pyx_t_4) < (0)) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "cassandra/cluster.py":1 * # Licensed to the Apache Software Foundation (ASF) under one # <<<<<<<<<<<<<< * # or more contributor license agreements. See the NOTICE file * # distributed with this work for additional information */ __pyx_t_9 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Session_execute_async_line_2680, __pyx_mstate_global->__pyx_kp_u_Execute_the_given_query_and_ret) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_Session_prepare_line_3177, __pyx_mstate_global->__pyx_kp_u_Prepares_a_query_string_returni) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_ResponseFuture_result_line_5020, __pyx_mstate_global->__pyx_kp_u_Return_the_final_result_or_rais) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_ResponseFuture_add_callback_line, __pyx_mstate_global->__pyx_kp_u_Attaches_a_callback_function_to) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_ResponseFuture_add_callbacks_lin, __pyx_mstate_global->__pyx_kp_u_A_convenient_combination_of_met) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_9) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); if (__pyx_m) { if (__pyx_mstate->__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init cassandra.cluster", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init cassandra.cluster"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #else return __pyx_m; #endif } /* #### Code section: pystring_table ### */ /* #### Code section: cached_builtins ### */ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_object); if (!__pyx_builtin_object) __PYX_ERR(0, 195, __pyx_L1_error) __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 371, __pyx_L1_error) __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_property); if (!__pyx_builtin_property) __PYX_ERR(0, 549, __pyx_L1_error) __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 471, __pyx_L1_error) __pyx_builtin_filter = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_filter); if (!__pyx_builtin_filter) __PYX_ERR(0, 1546, __pyx_L1_error) __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_all); if (!__pyx_builtin_all) __PYX_ERR(0, 1860, __pyx_L1_error) __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_any); if (!__pyx_builtin_any) __PYX_ERR(0, 2160, __pyx_L1_error) __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 2163, __pyx_L1_error) /* Cached unbound methods */ __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; __pyx_mstate->__pyx_umethod_PySet_Type__update.type = (PyObject*)(&PySet_Type); __pyx_mstate->__pyx_umethod_PySet_Type__update.method_name = &__pyx_mstate->__pyx_n_u_update; return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "cassandra/cluster.py":126 * return (GeventConnection,None) * else: * return (None,None) # <<<<<<<<<<<<<< * * def _is_eventlet_monkey_patched(): */ __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); /* "cassandra/cluster.py":1718 * successful connection is established. Remaining pools are added asynchronously. * """ * with self._lock: # <<<<<<<<<<<<<< * if self.is_shutdown: * raise DriverException("Cluster is already shut down") */ __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); /* "cassandra/cluster.py":3981 * host.dse_workloads = row.get("workloads") * * tokens = row.get("tokens", None) # <<<<<<<<<<<<<< * if partitioner and tokens and self._token_meta_enabled: * token_map[host] = tokens */ __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_n_u_tokens, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 3981, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); /* "cassandra/cluster.py":4295 * pass * self.is_shutdown = True * self._queue.put_nowait((0, 0, None)) # <<<<<<<<<<<<<< * self.join() * */ __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(3, __pyx_mstate_global->__pyx_int_0, __pyx_mstate_global->__pyx_int_0, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 4295, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); /* "cassandra/cluster.py":268 * * * class ContinuousPagingOptions(object): # <<<<<<<<<<<<<< * * class PagingUnit(object): */ __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); __pyx_mstate_global->__pyx_tuple[5] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[5])) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[5]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[5]); /* "cassandra/cluster.py":270 * class ContinuousPagingOptions(object): * * class PagingUnit(object): # <<<<<<<<<<<<<< * BYTES = 1 * ROWS = 2 */ __pyx_mstate_global->__pyx_tuple[6] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[6])) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[6]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[6]); __pyx_mstate_global->__pyx_tuple[7] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[7])) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[7]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[7]); /* "cassandra/cluster.py":338 * * * class ExecutionProfile(object): # <<<<<<<<<<<<<< * load_balancing_policy = None * """ */ __pyx_mstate_global->__pyx_tuple[8] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[8])) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[8]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[8]); __pyx_mstate_global->__pyx_tuple[9] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[9])) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[9]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[9]); /* "cassandra/cluster.py":505 * * * class ProfileManager(object): # <<<<<<<<<<<<<< * * def __init__(self): */ __pyx_mstate_global->__pyx_tuple[10] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[10])) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[10]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[10]); __pyx_mstate_global->__pyx_tuple[11] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[11])) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[11]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[11]); /* "cassandra/cluster.py":591 * * * class _ConfigMode(object): # <<<<<<<<<<<<<< * UNCOMMITTED = 0 * LEGACY = 1 */ __pyx_mstate_global->__pyx_tuple[12] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[12])) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[12]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[12]); __pyx_mstate_global->__pyx_tuple[13] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[13])) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[13]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[13]); /* "cassandra/cluster.py":597 * * * class Cluster(object): # <<<<<<<<<<<<<< * """ * The main class to use when interacting with a Cassandra cluster. */ __pyx_mstate_global->__pyx_tuple[14] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[14])) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[14]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[14]); __pyx_mstate_global->__pyx_tuple[15] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[15])) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[15]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[15]); /* "cassandra/cluster.py":750 * return self.profile_manager.default.load_balancing_policy * * reconnection_policy = ExponentialReconnectionPolicy(1.0, 600.0) # <<<<<<<<<<<<<< * """ * An instance of :class:`.policies.ReconnectionPolicy`. Defaults to an instance */ __pyx_mstate_global->__pyx_tuple[16] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_float_1_0, __pyx_mstate_global->__pyx_float_600_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[16])) __PYX_ERR(0, 750, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[16]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[16]); /* "cassandra/cluster.py":1508 * UserType.evict_udt_class(keyspace, user_type) * * def add_execution_profile(self, name, profile, pool_wait_timeout=5): # <<<<<<<<<<<<<< * """ * Adds an :class:`.ExecutionProfile` to the cluster. This makes it available for use by ``name`` in :meth:`.Session.execute` */ __pyx_mstate_global->__pyx_tuple[17] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_5)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[17])) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[17]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[17]); /* "cassandra/cluster.py":1707 * self.protocol_version = new_version * * def connect(self, keyspace=None, wait_for_all_pools=False): # <<<<<<<<<<<<<< * """ * Creates and returns a new :class:`~.Session` object. */ __pyx_mstate_global->__pyx_tuple[18] = PyTuple_Pack(2, Py_None, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[18])) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[18]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[18]); /* "cassandra/cluster.py":1974 * reconnector.start() * * @run_in_executor # <<<<<<<<<<<<<< * def on_down(self, host, is_host_addition, expect_host_to_be_down=False): * """ */ __pyx_mstate_global->__pyx_tuple[19] = PyTuple_Pack(1, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[19])) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[19]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[19]); /* "cassandra/cluster.py":2013 * self._start_reconnector(host, is_host_addition) * * def on_add(self, host, refresh_nodes=True): # <<<<<<<<<<<<<< * if self.is_shutdown: * return */ __pyx_mstate_global->__pyx_tuple[20] = PyTuple_Pack(1, ((PyObject*)Py_True)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[20])) __PYX_ERR(0, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[20]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[20]); /* "cassandra/cluster.py":2106 * return is_down * * def add_host(self, endpoint, datacenter=None, rack=None, signal=True, refresh_nodes=True): # <<<<<<<<<<<<<< * """ * Called when adding initial contact points and when the control */ __pyx_mstate_global->__pyx_tuple[21] = PyTuple_Pack(4, Py_None, Py_None, ((PyObject*)Py_True), ((PyObject*)Py_True)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[21])) __PYX_ERR(0, 2106, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[21]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[21]); /* "cassandra/cluster.py":2188 * return self.metadata.get_host(endpoint) if endpoint else None * * def refresh_schema_metadata(self, max_schema_agreement_wait=None): # <<<<<<<<<<<<<< * """ * Synchronously refresh all schema metadata. */ __pyx_mstate_global->__pyx_tuple[22] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[22])) __PYX_ERR(0, 2188, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[22]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[22]); /* "cassandra/cluster.py":2354 * * * class Session(object): # <<<<<<<<<<<<<< * """ * A collection of connection pools for each host in the cluster. */ __pyx_mstate_global->__pyx_tuple[23] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[23])) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[23]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[23]); __pyx_mstate_global->__pyx_tuple[24] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[24])) __PYX_ERR(0, 2354, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[24]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[24]); /* "cassandra/cluster.py":3563 * * * class ControlConnection(object): # <<<<<<<<<<<<<< * """ * Internal */ __pyx_mstate_global->__pyx_tuple[25] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[25])) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[25]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[25]); __pyx_mstate_global->__pyx_tuple[26] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[26])) __PYX_ERR(0, 3563, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[26]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[26]); /* "cassandra/cluster.py":3584 * _MINIMUM_NATIVE_ADDRESS_DSE_VERSION = Version("6.0.0") * * class PeersQueryType(object): # <<<<<<<<<<<<<< * """internal Enum for _peers_query""" * PEERS = 0 */ __pyx_mstate_global->__pyx_tuple[27] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[27])) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[27]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[27]); __pyx_mstate_global->__pyx_tuple[28] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[28])) __PYX_ERR(0, 3584, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[28]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[28]); /* "cassandra/cluster.py":3605 * _time = time * * def __init__(self, cluster, timeout, # <<<<<<<<<<<<<< * schema_event_refresh_window, * topology_event_refresh_window, */ __pyx_mstate_global->__pyx_tuple[29] = PyTuple_Pack(2, ((PyObject*)Py_True), ((PyObject*)Py_True)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[29])) __PYX_ERR(0, 3605, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[29]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[29]); /* "cassandra/cluster.py":3830 * return False * * def _refresh_schema(self, connection, preloaded_results=None, schema_agreement_wait=None, force=False, **kwargs): # <<<<<<<<<<<<<< * if self._cluster.is_shutdown: * return False */ __pyx_mstate_global->__pyx_tuple[30] = PyTuple_Pack(3, Py_None, Py_None, ((PyObject*)Py_False)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[30])) __PYX_ERR(0, 3830, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[30]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[30]); /* "cassandra/cluster.py":4362 * * * class ResponseFuture(object): # <<<<<<<<<<<<<< * """ * An asynchronous response delivery mechanism that is returned from calls */ __pyx_mstate_global->__pyx_tuple[31] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[31])) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[31]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[31]); __pyx_mstate_global->__pyx_tuple[32] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[32])) __PYX_ERR(0, 4362, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[32]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[32]); /* "cassandra/cluster.py":4481 * self._timer.cancel() * * def _on_timeout(self, _attempts=0): # <<<<<<<<<<<<<< * """ * Called when the request associated with this ResponseFuture times out. */ __pyx_mstate_global->__pyx_tuple[33] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_0)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[33])) __PYX_ERR(0, 4481, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[33]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[33]); /* "cassandra/cluster.py":5161 * return self * * def add_callbacks(self, callback, errback, # <<<<<<<<<<<<<< * callback_args=(), callback_kwargs=None, * errback_args=(), errback_kwargs=None): */ __pyx_mstate_global->__pyx_tuple[34] = PyTuple_Pack(4, ((PyObject*)__pyx_mstate_global->__pyx_empty_tuple), Py_None, ((PyObject*)__pyx_mstate_global->__pyx_empty_tuple), Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[34])) __PYX_ERR(0, 5161, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[34]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[34]); /* "cassandra/cluster.py":5212 * * * class ResultSet(object): # <<<<<<<<<<<<<< * """ * An iterator over the rows from a query result. Also supplies basic equality */ __pyx_mstate_global->__pyx_tuple[35] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[35])) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[35]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[35]); __pyx_mstate_global->__pyx_tuple[36] = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_mstate_global->__pyx_tuple[36])) __PYX_ERR(0, 5212, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[36]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[36]); #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_tuple; for (Py_ssize_t i=0; i<37; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); } #else Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } } #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { const struct { const unsigned int length: 11; } index[] = {{1},{9},{5},{5},{502},{720},{33},{68},{44},{390},{106},{66},{932},{55},{1657},{106},{51},{192},{44},{72},{45},{67},{195},{106},{107},{19},{63},{46},{25},{60},{279},{214},{28},{94},{93},{96},{154},{96},{165},{63},{31},{56},{55},{60},{40},{59},{26},{60},{44},{60},{40},{38},{306},{22},{34},{35},{22},{53},{49},{48},{57},{1142},{101},{142},{74},{61},{49},{39},{30},{37},{33},{50},{67},{43},{24},{62},{63},{57},{44},{36},{18},{28},{64},{29},{200},{55},{42},{18},{27},{28},{9},{57},{52},{86},{32},{41},{49},{46},{101},{54},{115},{59},{45},{16},{1861},{55},{25},{86},{16},{306},{131},{232},{64},{28},{50},{30},{16},{129},{39},{40},{24},{33},{102},{928},{44},{26},{29},{129},{118},{133},{97},{69},{54},{57},{55},{33},{27},{187},{31},{32},{51},{56},{55},{51},{32},{39},{54},{14},{32},{614},{72},{57},{68},{415},{50},{4},{50},{32},{41},{50},{61},{52},{58},{44},{63},{62},{58},{195},{10},{70},{158},{53},{57},{1},{0},{1},{1},{1},{1},{2},{3},{3},{2},{80},{9},{57},{97},{20},{109},{85},{68},{67},{44},{77},{65},{91},{80},{44},{44},{61},{107},{48},{53},{49},{65},{61},{79},{59},{55},{66},{34},{53},{80},{85},{49},{39},{42},{18},{69},{82},{105},{7},{28},{56},{63},{6},{17},{16},{11},{2},{13},{14},{30},{11},{9},{90},{83},{85},{82},{30},{15},{47},{81},{13},{8},{6},{97},{61},{22},{36},{20},{5},{22},{63},{67},{9},{9},{18},{20},{5},{12},{14},{14},{7},{17},{16},{16},{38},{36},{38},{32},{21},{32},{31},{20},{31},{28},{46},{20},{36},{38},{26},{38},{49},{32},{29},{47},{16},{20},{21},{15},{26},{28},{30},{35},{37},{36},{39},{39},{17},{29},{14},{40},{15},{17},{13},{26},{33},{42},{21},{31},{30},{39},{38},{34},{25},{26},{19},{31},{37},{36},{39},{32},{39},{16},{33},{30},{27},{11},{14},{19},{19},{18},{16},{23},{34},{32},{39},{21},{17},{32},{26},{39},{51},{34},{57},{40},{39},{39},{41},{32},{28},{37},{50},{42},{33},{37},{31},{25},{30},{39},{25},{33},{24},{25},{27},{23},{27},{49},{32},{35},{26},{43},{27},{36},{40},{43},{41},{4},{27},{23},{22},{22},{38},{39},{20},{38},{39},{20},{4},{6},{17},{15},{22},{26},{19},{15},{20},{36},{26},{33},{5},{7},{8},{12},{5},{18},{14},{16},{25},{29},{16},{15},{8},{12},{12},{29},{16},{30},{39},{21},{30},{12},{13},{19},{19},{19},{26},{14},{23},{4},{14},{18},{12},{24},{22},{7},{18},{27},{8},{6},{5},{9},{12},{15},{4},{35},{13},{10},{7},{8},{7},{15},{27},{8},{8},{16},{22},{15},{24},{26},{28},{9},{3},{17},{22},{5},{12},{8},{10},{14},{21},{14},{21},{17},{13},{14},{23},{63},{46},{30},{22},{23},{40},{21},{22},{24},{20},{23},{17},{15},{15},{26},{20},{14},{12},{10},{6},{12},{20},{16},{25},{24},{16},{7},{5},{15},{5},{4},{23},{20},{14},{23},{22},{28},{37},{31},{55},{70},{37},{31},{38},{26},{21},{25},{21},{26},{52},{35},{49},{32},{38},{26},{27},{30},{27},{28},{26},{30},{29},{35},{30},{34},{29},{21},{27},{39},{23},{13},{9},{16},{21},{18},{18},{21},{26},{20},{27},{13},{34},{22},{25},{30},{25},{24},{14},{13},{22},{21},{11},{13},{13},{23},{35},{13},{32},{26},{16},{20},{29},{23},{11},{13},{10},{19},{23},{25},{14},{19},{26},{19},{16},{11},{7},{15},{17},{16},{16},{33},{37},{31},{36},{31},{35},{19},{42},{75},{35},{32},{25},{35},{25},{74},{56},{33},{33},{40},{23},{15},{21},{26},{32},{36},{21},{27},{38},{29},{22},{39},{17},{15},{33},{17},{15},{28},{19},{36},{19},{20},{16},{14},{28},{28},{61},{44},{22},{20},{15},{18},{5},{15},{4},{6},{18},{16},{16},{13},{17},{11},{2},{23},{25},{20},{8},{20},{7},{7},{19},{24},{1},{7},{3},{8},{12},{13},{17},{11},{21},{8},{17},{18},{12},{25},{4},{7},{18},{17},{9},{6},{3},{9},{27},{3},{6},{16},{19},{4},{18},{6},{15},{9},{4},{9},{8},{14},{13},{23},{13},{10},{8},{4},{13},{11},{5},{8},{17},{17},{14},{21},{18},{1},{8},{13},{15},{14},{16},{10},{6},{24},{13},{9},{14},{17},{20},{20},{18},{18},{24},{30},{36},{32},{17},{28},{28},{26},{25},{27},{17},{18},{17},{18},{14},{18},{15},{20},{14},{2},{7},{5},{11},{29},{14},{15},{6},{2},{17},{30},{5},{15},{14},{9},{23},{18},{5},{5},{5},{12},{3},{7},{8},{12},{8},{22},{10},{10},{11},{15},{24},{15},{12},{12},{11},{11},{18},{12},{9},{4},{10},{8},{12},{8},{7},{15},{23},{9},{11},{10},{16},{14},{18},{21},{11},{17},{27},{13},{14},{25},{24},{7},{25},{26},{26},{23},{24},{12},{21},{18},{26},{25},{16},{4},{16},{26},{5},{6},{2},{20},{11},{6},{15},{24},{23},{28},{12},{13},{16},{13},{12},{27},{14},{15},{1},{6},{11},{10},{5},{5},{6},{14},{7},{7},{26},{25},{18},{19},{20},{30},{16},{21},{20},{33},{32},{16},{15},{11},{7},{7},{5},{21},{12},{15},{12},{7},{25},{21},{8},{9},{7},{4},{7},{11},{12},{13},{5},{1},{7},{7},{6},{14},{7},{8},{16},{26},{18},{24},{23},{9},{16},{2},{3},{6},{7},{12},{14},{9},{5},{14},{6},{7},{15},{5},{6},{21},{10},{8},{16},{6},{15},{3},{8},{9},{23},{13},{4},{7},{22},{10},{13},{18},{24},{28},{13},{19},{17},{30},{28},{18},{8},{9},{16},{8},{22},{8},{16},{6},{1},{7},{13},{10},{15},{10},{10},{11},{6},{16},{13},{13},{15},{2},{5},{19},{6},{11},{12},{8},{8},{9},{6},{17},{16},{7},{12},{15},{8},{8},{7},{3},{9},{20},{33},{32},{21},{18},{25},{22},{16},{22},{15},{27},{29},{21},{8},{19},{28},{31},{31},{15},{16},{14},{9},{16},{15},{19},{22},{9},{11},{11},{6},{13},{3},{12},{27},{27},{14},{10},{24},{13},{12},{23},{16},{14},{12},{7},{1},{40},{22},{21},{21},{23},{32},{14},{11},{3},{7},{7},{4},{5},{13},{16},{13},{11},{7},{8},{20},{5},{1},{15},{23},{22},{9},{13},{4},{8},{24},{16},{18},{12},{10},{12},{2},{19},{18},{22},{9},{21},{13},{13},{25},{10},{7},{11},{27},{25},{16},{13},{17},{16},{9},{6},{9},{11},{12},{5},{14},{5},{8},{9},{4},{4},{3},{4},{8},{9},{9},{4},{5},{8},{7},{11},{13},{6},{11},{8},{10},{3},{10},{14},{11},{8},{14},{10},{9},{14},{13},{21},{22},{31},{13},{11},{12},{9},{10},{23},{24},{13},{8},{5},{4},{3},{14},{7},{8},{24},{23},{15},{16},{7},{13},{19},{15},{25},{9},{20},{14},{12},{28},{25},{14},{8},{12},{12},{16},{11},{28},{23},{7},{8},{13},{8},{11},{7},{8},{15},{12},{28},{10},{7},{17},{25},{26},{15},{3},{7},{1},{4},{8},{19},{5},{24},{3},{17},{29},{5},{11},{12},{15},{8},{8},{12},{12},{11},{4},{8},{10},{14},{9},{10},{5},{11},{8},{3},{11},{3},{11},{6},{3},{8},{15},{6},{27},{19},{7},{12},{9},{10},{14},{15},{15},{9},{11},{16},{8},{23},{11},{14},{5},{23},{16},{3},{10},{8},{20},{18},{26},{5},{1},{10},{9},{15},{12},{13},{10},{11},{7},{11},{8},{7},{4},{11},{16},{12},{13},{10},{6},{4},{30},{10},{11},{17},{6},{3},{8},{4},{17},{11},{7},{20},{15},{20},{17},{18},{24},{20},{8},{16},{13},{7},{15},{16},{12},{8},{31},{8},{12},{18},{17},{16},{17},{26},{5},{18},{10},{12},{5},{6},{8},{12},{8},{12},{10},{14},{12},{14},{13},{5},{6},{4},{20},{6},{18},{2},{17},{10},{9},{19},{21},{20},{18},{19},{11},{6},{3},{7},{25},{34},{31},{32},{13},{24},{14},{15},{29},{23},{22},{31},{30},{26},{8},{26},{17},{16},{18},{17},{7},{15},{19},{6},{11},{11},{28},{8},{10},{15},{7},{6},{20},{10},{23},{15},{20},{13},{9},{37},{34},{8},{15},{9},{6},{11},{15},{18},{7},{17},{6},{5},{14},{9},{12},{13},{11},{10},{17},{11},{5},{16},{2},{5},{3},{11},{12},{11},{3},{21},{6},{15},{30},{7},{2},{1},{8},{15},{16},{9},{22},{21},{13},{19},{27},{28},{20},{19},{23},{17},{10},{14},{9},{9},{18},{4},{12},{4},{12},{8},{12},{9},{24},{9},{21},{10},{7},{10},{28},{8},{3},{29},{17},{30},{8},{20},{17},{12},{21},{23},{18},{27},{27},{17},{28},{31},{24},{31},{12},{19},{11},{20},{6},{10},{6},{14},{24},{8},{18},{6},{25},{13},{9},{5},{8},{8},{6},{8},{10},{14},{16},{20},{26},{28},{11},{11},{5},{24},{18},{10},{11},{12},{15},{9},{18},{10},{25},{26},{12},{13},{27},{28},{4},{15},{7},{9},{19},{17},{6},{7},{7},{3},{7},{5},{32},{3},{5},{24},{11},{30},{14},{4},{8},{9},{6},{9},{5},{4},{5},{15},{7},{8},{6},{9},{19},{7},{12},{9},{19},{18},{22},{6},{15},{29},{30},{13},{9},{5},{8},{7},{17},{20},{12},{20},{18},{17},{13},{13},{4},{8},{9},{8},{7},{19},{6},{20},{21},{21},{20},{9},{13},{20},{11},{10},{8},{8},{13},{18},{25},{14},{12},{4},{5},{1},{3},{22},{24},{27},{5},{6},{7},{12},{25},{8},{4},{4},{18},{17},{18},{25},{12},{9},{4},{15},{7},{9},{8},{11},{6},{15},{7},{8},{9},{5},{2},{14},{2},{23},{33},{36},{1221},{2},{2},{11},{245},{121},{246},{58},{22},{56},{236},{84},{275},{111},{45},{115},{345},{342},{33},{81},{73},{62},{75},{63},{381},{442},{17},{186},{218},{2},{44},{98},{72},{31},{206},{64},{326},{30},{14},{9},{42},{12},{15},{881},{56},{2},{72},{92},{75},{51},{92},{40},{69},{185},{55},{42},{42},{18},{55},{86},{146},{20},{37},{171},{38},{72},{74},{91},{471},{119},{113},{106},{46},{23},{58},{247},{61},{55},{18},{30},{79},{69},{33},{340},{33},{62},{62},{27},{67},{57},{77},{135},{39},{137},{42},{134},{507},{22},{17},{30},{18},{60},{47},{17},{223},{43},{196},{10},{27},{30},{49},{15},{119},{87},{1222},{49},{59},{95},{27},{26},{27},{27},{27},{29},{27},{49},{54},{26},{1933},{20},{20},{11},{63},{19},{9},{29},{47},{116},{64},{44},{42},{124},{25},{42},{94},{94},{210},{131},{166},{23},{47},{35},{65},{42},{19},{43},{21},{61},{29},{53},{21},{51},{33},{45},{96},{149},{137},{31},{100},{7},{51},{54},{21},{47},{15},{11},{13},{13},{69},{11},{11},{11},{11},{57},{174},{98},{94},{79},{96},{41},{13},{52},{15},{14},{14},{14},{15},{14},{15},{16},{14},{14},{16},{18},{19},{48},{27},{18},{128},{51},{123},{62},{58},{64},{42},{2},{67},{38},{6},{6},{20},{26},{360},{210},{95},{9},{2},{2},{18},{42},{62},{53},{36},{72},{22},{11},{381},{2},{30},{456},{33},{53},{57},{41},{27},{37},{150},{32},{1}}; #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (22839 bytes) */ const char* const cstring = "BZh91AY&SYu\322d)\000\030\243\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\300@@@@@@@@@@@@\000@\000`m1\336x}\335\260\005w\267\275\200D\240\223\317wR*\225\364\327/\233\320\000\000\000\000\000\275\357\216\r\354z{\354<\235\265\274\372<\034\033>\201\241\241\356\361\357>#mF\200U4\333\235\334\305\000\001Q\350\240\257\246\211(2\347:\224P\nE\357|{\275\366[\250\373cFv\006\2731\335\240>\225\347Y\323\270\244\220l\373\273\262\223\353^\354+\227\256\347\223\271\260<\331\n\366oZ\321\220\224]j\243\254\004W\255 \365\205UE\024\200\n\211\273\341\340t}=\365eD\247s\356\324\036\252\246\206\331Os\323\332\365w\334\353\333!\t{m\236\355UU\366)\335\256\373\2169\303\200z\r\255Eo\267\016\265\324\205(*\224\024P\240\000\036\204\007\274X\002\035\350\204\225T\024\221\320\024a(B\020L\000\021\200#M4\000\004\324\364\3104d2L\t\200\202\233\322\243\364\311\351\r&i\242=P\364\215\250\003M\001\002\020\2014\023M=L\231L\224\336\231)\275\023\024\311\246\215\017M\2512\003\324zj\032i\243\312x\311G\251\221\223j\0326SOSA\251\342\010\222$)\355ML52dh2\017SA\210d\310\331\023\324d\323\033C4\215M\203\006E#\0054\310zL\232m\020$\322H!\004\310\022e3&\215S\3654b\233&\232jz#'\241\211\251\247\244\365\036\243\020\307\252\000\000\r\006\206\215\r\014\324\004J\022z\202\243L\246oRoI\211\204\3112\230\236\324'\246\236\241\223\323Ji\264\365256\211\220\365\036\241\240\304\310\310\031\251\210\323OMM\000\211\"\0014\004&D\310\230L\2304\232\232x\244~\243$\366\222{T\014\233Q\352\r\03224\320\032\000\000\000\003O\352\010\231\033\\/r\263.\203/o\231\272\023\326<\246\317i\3567|mo'\243\002\223^\336\333T\310\r\361\2635\327N\3442)\037\tF\177z\003\215\270\306\330\211\345\276\366\241}\035S`\205\347\2425*\360\215@\352\251\212\267\3050\363#Q\315\030^\341\331B\255\224\262\366\317<\357\336\357\2630jU7\307\003\023Z6\365k\241R)iF\020!\007\215J,\204\213$;\177\034\354\365\275~\013\207\263\363\327\344\375\330\000}}\357\254\372\353^\367\373\265\245\252[\354\373\003\005n\211d\013\250\\n\\\355b\305z,\013\003\364\214\006@\261z\2716$""\213\210\006\016\261\037\002\205\016\254[\214\024\242\341\214\\\t\211\271\201&\200\310\265\214\347,6\024\211\313\000\230\310X\210Q33p\"%23\001\273-\302\202f4\3476\210\247\001\221\tCq\0272\334\2412\224\262\204V(\327\247\352qw}\216\317?\017\371\375>F<\236\300\362|\257\211\360~\377>\223\237N\2359\363\347\373\237\335\362<\273\207\300|W\303\301;\376\217\377\001\3741d$O\341`\310\035\221\030\262(\204R\"\214\221I'`;@3)\2313\016m\t\337^\343v\367\276\320f\214\312\030\334n\035\376\007\031\337\306C~V<\2759\342\\\221\206\324\264ZFZ\026\"\306Gr\227\333\345\017l\366\373}\201\304\345\201\211\207\233\371\343\335\334\247\242\035\307#Y\\\271\220x^\2473p\346\361\036'-M6%\242\310I!'X\026\002\204\364\004\251\342\2414Rkg\330W\271I\355\005p8\320\205\354D\223\2377\230y\203\247\227\206[i\302\332\232\353\257\347\353\342N\300\235\036{O?\201\304\265W\036V\246X\253KJ10\234\271r\345\327\307GM\250\303\322x\247@}1:\222VT&\363\237A\356u\362t\276{Vo\221\2425\207\236\024\030\334\002\257|.X\261\350\354\366\016\317N\307c\315\300\322.\273\326\235\307\364:\240yfs\353v\010\304`\364F\036T""\177\335x\222\240\215\t{9\267=\256\236!\334\006\341\tA\277~\020d\356\232U#K\3169<\027n%\004\007\356\356N\235;{\177r\267\354\350\200'\206\206\341T\220\230\311\\m\323\300\247\243\014&3\022\335lu\353\344\365\310\300s\355\346\376 \000!\264\242s\341\020\370\"\321P AG\304\346\370\266_'W\340\264\2563&.\357w\235\224\362\035\322Q>\357\233J\346\2222\007B\024$\377\266\n\342\264\225\250\003\n\314\241U\025\310S\225\016\302\n\375\203\313\353\277G\377m\223\037\312\036\343!w<\217\374,\235\227\263\211B\316\233\337\020hU\261V\277\363\225\225\340\326\2343\253\327\256O\010G\031\030\351\355N\007(G\020P\020Sn9\376i\026\270>3\274EB\355?\260\337\332:\035\342{('!MH\024\006O\376@\347\244\307\364c\311\370\030e\266\355\306\243\253\355\333\224\364\356d\350\312\256\311\256\342\007\000y\256'\247\345;\366\300\031i\320\306\230?q\374!\033\241R\t\004ub\307\206\307\205\327\237f|\341Xa\005\356\276k\362\302\371c\237.\032\354\214\305\004\243D\343\315\"\200J\301\301\014\002\367G\215\300\nl6]\355\307\237\264\013L\213\016\335\273\371g\304\253\333\326:\346^\000-4\352\363\325\311*\360@\356Y\265\024\260\013\250W^\334s\355[\306l\243t\362 `\316 `\202\232\304\361_\274S}}\235\261B@\327G\npPCt\033\372\036\370\035\315\356\267W\344\373_\223\247\034\362zu+\002\351\333\325\270n\335\261Iz\n\233\252\330\331W\251V\272\326{\177\247-\305U`l\217\200\356\000R\010\022\251\211*\tR)\230\230U(\034\036\265\203*ym\210\316D\266@\263\202\\>-\331\025\200\t\022\251\252\300\035\275\002\240\254]\207\347\005N\217\215\226:luq;\030\212^Kp\321\240\371\345\020\245`\006P\027Y^Dmu\317\266\022'\374\367\026\267\033\000\311\317\033\372f\335@,\337\227\226\204\226T\010\226\212]\271\2068\215-\267q\254j\203\244\345r\213\302\016|\271\n\232\0246Q\000\005\246^!\352\177\020\257=\273\217$\300R`x\272\207\262\036v\310\320\016\236\362\257\004G\320\263\366Z\207\272h\216\322\277\346\300\260oH\214A[\366\364\361Z\230\220\374\254xf\351\213\322A\014\353x\263x\346\307\361\220\251[\351\212\006\004\236\214\236b\331\214\200\035_\265oe\334\036_\306\354m\350\343\026\316m""\311\224\253\2543\2170\323m\021\231\006\374\205-p\322\000\363\216\037\026\366\264\303*\273\310\361kh\0212\273\356\240\025W\n.\314\025\271\014\226q(\3520Hb\260[\223\252\263\001\330\330\265C\320\270\372\000q\260\3447\361z\335\2261\246\205\306\374Y\300\203\032\000\225R-\310p\237\314^\252\254\371g\303\203\311]hs\322\005\355)%\205\020\366=S\021\347\305T\304,pmqv[\330\025a\324U\221m\322\n\tR\267\372\000K\356\267\303K:\253\330oqa\312/\232q\022\326A\327W\r\234\246\316\245\320\016\321r!\245\006\024\200\2445\263\020\367U\014\207\335 \230\332`\221c\327 ]\257u\216\311\3447\032\334m\002\304\274\216A\325\376\342\016\353m\302\201\276[\034\014#\340\001sr9\310\006J\201\314>\302\310.E\230((\025\264\310\003\301\376G\364\267\213y4\235\336'\001\214\355\353a\326\365;\202\0107\215R\255\010\300\n\240\366M\027\257\321?\306\006\376\240v\235\276c\374\213\326\333r\033\216\006\311\3345IB\324br\036\024]\207T\267\266@\232\276{Ql \201e\022Q;\365\361V\254p\236C'\301\037\007\273)\272\217\000\351\272@\013\344+\345\003\242\334\201\316\023\247>`@\342\236yM\207!\036\253\324\223\241\313\230ow\\\335\016\311a\234n!\356#\"\024\001\027\245\271uK\001l\303\255\252kU!\241X\225\027L\340\330\2029)\307gU\355\212\263\270\3076PY\301\226m\337\275\2666yI\016\005\233g\354\336E\323s^r\026\007E\r*\226\271\001O<\324\256=P\275\201!\010\021\324\200.\265\304Z\305\014X\267J\240\310\030\313\220\3008\343`\357i\033\334\313o\206\317;=\360\312\n2h\2556>&\203\274\010\002B\202@\353E\367\321v\317.\007\263\235\210\306\334\355\324f\325\356\204\033\212\262\211\351^\r\260\007\325i\323\323)Y\204\330\352T\223\313L\262\254d\230\306\362 b:\253\261\240d\020\"\025\326!u\227R\320\345\305\345m\016,\341\222X\303\021\300\200\313\227\033Z(\003\253[8\023i\376\030\022b\335\355j~\317n\323a\014\305<\216\275}\"\236\003\022\0052\202K\013\225'\321;\310\233\320kq\n\327\nz\210\337\274u\013I\027\223ff\353\304\201w\256T\241\245\235X\261\n\202r\025\325)\201\277~B{\354{\3048\305$\200S\256\000\177o\215t\002\254\002\267\260W1\312\273\275\021\353\215\227\243\020""\204[\252'\321\241\227vm\310\n\312\256\326\000\270Wv\361\267!O&\273{\326\365\334\365\3258&\256;{! \365\363fUJ\004\r\354\377q\362\313B\016\346\023G\203y\331\263\355{B\037\036\340RtU\354;\346\357Tv\373\007\"/\241\231;\203wS\231\356\025W\237\274\376\374:\026(\014\242\250\274\274\242\035\323\276\253\337\350\361du~\365>\377\355nm$\353\340\371\371\323\306\377H\311}#)\351\337r\26316\330\267\353\313\273\242~\277D\016\235\024\350\321s\003\010\034\316i\374\335\271a\211\2565\225\020\010\202\266\204DH\235\031$lT(e\\C\025G\rDL\323\253\247\211\n\001\232\270QmH\231\207 \310\223e\311w!L\227i\201\002\230\364&\303\271X\200\215\034\221\020\224,\231\246\346E\225\022\222\2030\346\203\237\001\241\034\037\033\021B\020l\033\333V\007m\227\233\0131u\217\357#\220}\260Oz\374\2528\025UQ2*4\360\363\236\213\327m\245\342\332\230\3363\375\327\331\330/\271\225\303\361\272\n\316\272\026\356\307\037\343H.!\\@\366.\317\347\212\302{\312t\263\2342\2035e\372\205\237e\226\240\304n{0\352\202i!W\"V\014\221\3114\224\315(\336\366U@)\241M\000\246S\226\252\246f\320Z\212\253u\240\343B\335\312$\005!\020\220\240\210W\002\272\005t\256W\353\325\370\365\337\224u\323\355\357_f\007\265\356A\023\355((~8\213\367`z\371\007\315\267w\220\222\201A'\275<}Q\341S\024\3211\340<\200v\014\274?`\353\353@8\361X%\002t\243AZ\352\236\346G(\354\347a\215\367\2362\220W\242O(%\341\035\022\276\352f\317[G\025^\245\377\323\353\201\225R\353\003\273\356ok\007\t3\273\240h W\275R][J\237Rg\306[\376\215mb\300\261\313X;@B\340\2270j\022\347\360U^Z\342\327wPr9\\\261\241\310F\342i)N8\327/\332\330e\325\326\276\023\346\201\324A\3454!Gt\304\242F\244\250\242\224\311v\032\021\243\335\351\024\326$\276_\r\013Wt-\275\352\250\317,8}\310\n\346~\355\324.\205\324\270\023d\251\234Di\244\256\335.K\325+\305\237\006#\027\265\2407\263>c\216\216K\026\022\005\266\343[\267y\241\310\022~W\325\037Z1\373\267]\325\251C\213\317\334\376\204\341\366\274\r\267\245\r\310\367\371\263J\237\3339\332\303\022\263m\325\r\215\235nK^V\335lF\036\203m\230\230\373\031\227*?\263#\263G\032\2769""m\2304\3032f\315\034!\232\254\321\014\032u\311G\202\036\204\266\"(\3471h\002\324\352\205\232b\356\347\330\372\343\261\024\037$\"\263(#j\351\\,\356\332\237\337\231Z=\217\355\177\006\262g\210r\314J=\234\354T\352\013\004\347\205\212Ex3\265\332Eu\233CZB\261i-Z\245!A\330\r<\336\036\315\030\030\261\356\246IY7\266\324\2227c\204p\354+n\013\345X?y\244Y\205^a\306\235\343\353\220\"\322\302\003b\356\032\320\025\341Q\305|\230d\027\245\303\213n$\316o\263|;D\304\355N1.\320\212\2046\213[\331\354A\360\240\362\004\360\365{\226\333O\031\217D\200\330\037\333]\202T\241\371\014\231\020\311\t\256\341\360\232:\374>*\350>\322\032\027\017\362\267V\343\357\334\r{y\375\353\"\262\325\254\335)n\033w\332\"Go\231\372\016n/\016\225/#l\225\332\303\230\205\363K\245\350\342|\323\361jT\270\217\255S\201\201\2377P2\346\320\232S\362\260\342\024(\273M\214\2140\002\326H\26637\213UFC\375%\037\t\222\201\023\365\301\036\257H\367x\220K*\211\361Q\337\r\257\247R\267\207\235\005\346\373\036A\361\024\336\341\362\035\270\375iR\316\1775\241\227\325\002\037\317\376\306\036h\260\372b\355\341\177m\302\272\370}\353\236\244rn\373\005\247\\\206b78\335{\267\022g!\242\370\330\322\010\004\226w\034\244\220E\250\001\230l!\206b\213\230\3341\030\312\262\322\245,\033\005Jca\221m\245\266Q\326n \243\035MEf\337\257\333\036OF\332\343g\367O\246\256\006\220\255&YlY0\306\020\375\3325/\344i\013b\243\245CK\003\306\347;\"\306f?)\362\331\374\002\037s\350T\371a\374I\017\305/\277\364\030\332\216\031\304\362\211H\205\254\377E\273\336\350\256G\360\206\177\276$\250\211R\245=\272aL\ne\264J\211\352\304c\330\032\225r\233\362\016\206\223\351\331\330\322\212d\027\020h\232)k\024He\320\005\024\330\360\332\025\r\002\272\005\320.\205\345\361\364\032\360\321\307\371\2167\267\0160\34768`\360\304\240P\2162\305c\205J\365\320\226\022\322Z\022\322\251\035\005\232\264\032\227\352SQ\346\213-\032t\374\274\032\272\313\330Q\325B\262\n\252V\000\254\200VD\254\225\220\322(\321\265\332gT\321k8\224\272\267\246mIj\315_,m^\260V\254\201X\n\300g%J\t\274\224m\321v\247n\305\372\361\305\210/\317-:\365}$\342\256\211]+\240\222\212\350WL\352\023\350\352\352\321\357X,J\263\244\353\325\313\305\302\316:\350WJ\350\205q+\242W)U\247\271R\363+\210.*\325(\310>\245K\204\360\224\335\304\332P\027[\327\323\316\300\363\3148\361\253\347E\023\325Ow~P\355\236\026\211]\032\261\325%i\304p\214\375\276\354\351\232\235\216\375\246*\230\324\247\315\377W\207\226\363\177\222|\354\374;\265\221T\371=\254\365z\213<\023\365\024\266\240}9\0202\"\\\003&M\035{\030:\370\235u\371\265\307\3342!\2212\023\247CY9\254c\317\033\256\366 \276\005\244-\000Z\t\304\342u.\006l\375\277\003\237\271\025\375\355\2549\345\372iL%\251\302\232\252\202\025Q*\245R\255RJ\035\266\275\235\337\250\325h\227\311u\252}\312x\376\206\004\332T\023a\266}\212\030_\r\016\002\333[\321\336\032K\205\304K\205\312\211\315\245\312\320\352C\177cgSP\341\037m\344\002\234DO\016\200\247\341y0\204\030\305E\024QE\024\177`\264\202\222VJ\311Z\262`\233\266\336\\\354\224\337e\252J\263\261\216\256rm\025\013\352\211Q*\005M\312\213\"\310Q\267\340\267\253r]^\331X\273K\216""\231+\346\337\237\267/\303?\303\223\352\240\270>\377\334\237\370\371\312\037\227\362\207\370\006='\241\204?d\237\230}\177\250\037\226|\311\377\312U\t\t\260\377t\022F\224\006Jk\307\330gV\016\241\354\347\3471]\302\30258Z\256\216M\315?\367\330| A\234\332\216\331q\002\352?\244\246@\030)\222~o\317\357\374\237\237\270\301\370\376^O\325\275r\016N\367\267\220\036\214\270\3006M!\255\332\001\246\024]6\246\n\323\020\000/%\014:\2303\0304\303\rDd\304\223UY\214T\000\247\312\002\343@K\014h\350kU\210\203\206\2158\305D\0010\013A]N\004\255Z\211`\340Y\030&Hr&\340(B\235\324b\324\200q\371\264\234\343K%\257\203I\"\004\265\021\244\021\302\032?\317\303\362\354\232\352uc;\232~\226\2659<\235*\tF\231H\251\307\271oC\317\336\341\177\303;\222\326\236\237\350\210l\333M\320\317\023^\016]\226CC\233\202b\001\005\0218pL]\347\241\323>Y\201\201\220\\X\234\220T\364Op\247\211\335R\244f\321Ws\250xS\217\332\217em%\266\270\273&\003\261\250/\217\361\305\203dX\240\303F-{1%\213(xe\217\305;\270\013\210?\270\272T\000\013\202\333\021\223\374$k\356\345\000\213x\2334v\312\361\211K\336\214h\323\"\336\373\016W\210\033\033j/h6p\371@\260\342\340M\324\r\224M\235\220\331\r\234\277\365\324\314\343\305\302L\227\244P\303\242SCA\333\272\206e3#\301\332\243K\303(\211\372\212?2\205+v\347%\006_n\r\034q\265\342\272!xB\302\ty\020\274\227\223\217\277\227\203\347\303\277\303_\343\376\010\032)E(\224J4J=\230\323\224\356iit\002\250\3349P6\002\t\336J\365p\305!8\013\001\342\243|2(\345\313\3006\014\215\3770\020\376\341\022\004\316\255p4=\360\002\215\200\367\305\267\310`P}\246\226*\243\r\034\355Y\372S\021\364Rt\304\036P\230\302\377\211\250\355mmE\374g\033\344\365c\217^5\217\227\217m\304\032\211\r\375\341\372\210\320Fvl\376\264L\225\270#\345+\263*\253\n\002\371\372\277\"\001\360 \315\2332j\235\035[{oT\200\332\277\205\215D\022\207\030\227j \030r\034\225\277\232\332\354*\341\276J\275\3640\3504kx@KalKil\262\233\351\276w\356z\276\354\036\336s\267\366w\242\364\303\351\212\214\375\020\304]\340\005:\006\237\230M\347i/\201qR\270_\273\205\315,\213^!""\316\313\010\260\341\020\252\211\204M\205\343:\347\277\243\327\326\256\325u\267\335\271\311z\344H\204HD\211@J\tA92gpe?\351\251\0273\246\327\210\245\220,\350k\tSwn\025\220\t\210\025\222\262V+lO\247[\257\376y\202\217\001<\251\332\004N\323\377\341\220\214\343\3772\202d\214b%\330\363\010\022\207\347\rhQ\007v\320p\033;\374?3\\@.\tq.\026\355\372m\267o\254|a\217\222\010\235\315\305\262\200g\347\242\240\250rU\317\204\023\201Q\263\357\272\026\364\320Ghx\367\336\242\335\266\344\362{ciZ\260\274\210^KIw\253\243p\320\301\265\263\203kS\341m-\337\323+\325\325Mp\251\237\025\302\263\nH\225w\310\2251\226\r`\251\310\251Dn\326\264}80\216\326\206'`\301\243\023I\332\367c\020\306\030\320\271\252_\340\3701\034I\202\034\270u\360\347\332&\312\235J\354\276R\333\332\260s\367p@\241p\323\3652\266\010\026/\224\307\265\323N=\344\233\024\347\027\336\217\r+\253\233\027Bjd\313\272&\374\247\032\230\0044\204\302\234{\3717\271\277\267\036\256\253\273\2719\261&J\366\335\315\273\001\312\003\270\000\300\233\3712aD#\"Q\030r\241\274\211~[/\231u\362{\276\330\020\336\007\344\006J\264\000\336\250k\333\335K\320\321\000[r\326\274\273K\374*\304\244\215\332/\356\310\316,\331\233\005\371\273\275\312\027\217\267r\272\"K%2&\376\267\356\254S\250Z\271\254q)\231x\2666\034\314\3679]\024O \375\210\221\001\342\003\204\023U\000x\004\004\304\343oY\316 &3\030\\\303{\227\347S\276\336\237\02473f\216n\025*w\3058UR\r\025<\032`A2\314\036\213\357V\262%\240D\263;\022&\250Z\321a[u4\352\334Q\222n\2458\220e\270\310DS\254\251\250R\203\261\000\262j\204bi\034f\"\246|\215LM-6\312\263\023\022\\\010\201\034%=\360$W\275a\265\332\003<8\355\354\025ab\341\035&8G.\303\r\333\334pM\215\036\262\004\363\362{\323\023\322\213\264""\2548e\034\204\002\241\264\360\2676a\330\017+5\005d\370\343\3511\n\251\331A\324\010\006}jyD\030\366\025\375?\223\366kD\321\301\237\365\225\272\227\372;\346\007\351Vm\302\013\362\203\272\261'\022\311lm\237\213\2604\327\355{\303\322=\211\353\367\307\301\336\301\315\265\273\365M8\204T\014)\236_T\304r\026\220\261~\333\216\0279\205h\3044\005;\210\246\262s\r\037 j\232\351\034T6\0059\266\366\0029\215\002=\024\006A\374\343\225\231*n\354\306g \252\254\314*\303R4E\026\246\313\213\n\t\356\253\327[4\0029A\254\364\327\326\036f.~\037\216U\310\363\326\002\245\276w7\327\372Z\022\373O\257\351\300mO\251\353?N(\344o\005EA\n\023$\237\033s\314\233(\224\257k\036\001\272\247T\225QV\212\271Y\\\304\274\363\227\224\341C\204N\036\023\207\224\313\333\336\340\355gv\024\023\207\220\361\353\210\003\341\320\266~[5@\307\360\025a\216\246%\376\271\t\216\260\251=S\302\247ugR\357\033\263&\224\nT;\017\2371'\013\030K+!\t?\272\311D\257ZIU#DV\312-\270R{\3031\017\032\365a{\261\335\357\370\367\032\2007\037d\r\237\364\313\241\033\367&\210\026(2[\363\377\331\233\365g\366\331\300\205^\027\216R+\345\246\375_\353\270XU\322\205\233K\353J\000\013e\254\376\303\260\332\372e\031\026k\227s{X\323\r\247\340\002\225\351\214\216w\321R\253\235\2636\330O\323\223\355^\00457\216\256\207\273Id\220\024bA\004@@\353\365B\263xZ\257\217\277\315:\320$t/\216\203@9\027\244\014`\204`y^v\307G\346\203\034(UUW\313`k\201\230\227\226B\365\253l\"\362H]Y\002Y\250-\201&\3017\272\203B\005\301\n&X\322\320\274np\237\n\252\261\216\263n\211X\211\177On\232\222\232\231n\301P\240)U\013m\224\272Y\202\3008a\220\nL\006\272\354\216\361\316+\001\322\230\253 \"\367\022\357\300\346I~j\214Rbr\261\254\345\024\363!\220\034\344\014`\335wQ\005\316\203h\226\332C:5lE\201 \353q\033\233\026#q\224TU\025a\225\334\007G\325\340\272\216\n\225-\311\3350O\335pdm\232\010J1c\200\334\305\205\341\330\005\300\302\201\227\020\014\353 \265\022v/p\275\r\272=\327E\307\021\345w\267`\337\324w\\\362=}*c\340\325\247\212p\253\266\306\021\206\351\302\250b8:\210\346\341\335\331\211<=aJ\364\207\377\204U\212\311\254\277v\376%l`x\327q\231\245\260?\202\305\267\345nq\360@\311'v=&\2602{\014\033W]\306\211\201b\022\344\013\207\354\214@\333$\032\354tN\240\022\340n6.\t$\330\351\244\036\312S\0133\200\331N6n\030\234\231\300\",\243\206s\261\240\3607\n\301x\256\274\323\207\322Sy\333^[Sf\325\\\2145\352\246\224A\251<\231\231\t\020\001\321\026\016\240\240Q~\035\256\301_c\313\024\264\354\302\3127\233\014\013\222q,\003\020\031\323\270FyM\205\365\246b`\251\336\003@\225\320\2733\364\220\006\371\373vL\021a\336T\254\340\002\204\2421\274\251\351\037\017S2L9\237\203\217\006\004\317g\001\354\276&\244\236Wj\253\025h\224\326fShw\3658\230c\320\315%\257\254\330\327E\343\345m\354\365\224""\246\366\344\263d\000\224\003\252,8~\347\273\006\352D\344\372\341-|\302E\360\211H\364\212E\216\217X\2064\247\022l\254\251l3I\332_\254n\227\203\254\205/`\235y4\030\236\314\206\210xp\364\356\330g\003\316\036\n*\253\0259\326oe\025\253\205]\354\010eU0\305\272\304\220o/\r\306%5(\034\272\334Q\036\257\206c\n\200\340\205\003\264\347~\2403\221\310\026\201AE!Cc\033a\200\275;\360\031\240\301\034\020p\031\246\0243\216ll\212h\210[\205\005\344e\014\363\273\327\027\026\260'm\022\206\330\027\270X\200dl\343\215\323\240\333Z\306z\307.8\025\2717\270;\035\007\026q\002]A6!\tGV\214\271\207*B\235\243*\343\275\010J\010\244\030\202\t\202X\212\373\346E9\315x@\306\005\230\001h\312\240\013\231\365\244\013\226\261\357\343\232\350\237I$W/\211}o\3051`A\220$ \261\216\302\204\003gd\360\357La\363Y\374\277]\n\213\255\313\036\217\236c\316\335z\236\263\233\037\006K\3330\016\2166\361\205$\315\242H=\372\303@\310\203\246\375\213n\321qa\022,'\376\270\331\212\330*&F\271\026\374\243\010\305\013^\346\021\241\347]\273\274\224\360*\014I\003\271\010\223\273,k\3024\235\351\372d~t\017pa\260x\237\243d\241\324\364\237\\4Xb\340_\203\321\226`\221%lj@\264\277\250\017\262)\312\370#\227\211\014\310H\022%\373\201\322\273\374\241\335\001\260{\021T\250fdx\313\032\2279Z\327\332\r\221 }>\202\354\030\211C\334\340\370\374\017\037E\354\210l\233\031\232\324\2423Z\273\014\335\230|I$8\303\230f\017>]\r\265\275\346N\217\377}\272\303LH\347Q\210!e\255iq\024\364\371\311\322\375c]\332\201\355 \031'w\177\037\301\373\366\323b\260\256\006\365!3\013\335\307a\344\013\"r\010\034U\247\026v{\035n\217G\261_b\264\266\033\327\255ol,\334\336q\013\202\255\2210\006P\013#R\013\t\241b\025\022\005\253\351}o\267\365\275~O\251\353\231\333\032]\227e\312\354\317\303\203\344dL\251 \241\004(\205K\311\214\031\016\"X\311Y\264\253.\363\224\230X9\013\031!\301E\273s\016c\001\0323THU\031i\020\204\024\024\227\n,\325'\024\316X\220\340\034\273\004\334\340\226+*bnM\235\3665\266\325\026\343K\254n\333~i\361OL=\306EEEV\022\004\232)E$4M3\335\251\032)Imnn\350\352\006!_\036\ne\363\207\334K\003\177\321\241\300\370\335>\276Z\343\357\2351\313$\242\240\251\203\360\3158\323A\216\277\364\235\022\310U@\313\034\265\244\254\264D\245(G*&\233\027\356&\201\236[\270s}\235}\275\237k\247\235x\274\211\"\364R4\206\244\360V\331\303b\224j`\201\2353\311\036\204J:s_\247nE\253\014\322\320\030\244\357\362\nUo\251\201\216\303\010\024\226\202\377\035\274\227\352:\246HK\232\302,\267\r/\3744O\345\352\223(\023l\225\n\200\240\304\3316\372\372|-t>#\250l\304 \307YDH\311\026oC\224R\246o\2308\332\003\354\212\315BM\264\030(w\317rSmOL>\273\352oU(C\221\260\345U#\316\212+\312bb\223\275O\270\244\000R, &\023\020XrN\017S\3249\222s\2618B.C@\031\346\230\236\201\"\254\205J\304e\214\250\322\302\243\005\212\310,7\356\003\363\240\231\322Ug\177\246\370\352g~\252~6a\214+ah\364I\271\010HO\0202q\"\r\210\036\301\307\306\355\324P,B\334\270\034\"p-\314\216\026\376\363\203\211\242\317\246\246S\351O\177\245\221\234:\303\361\357\201\364v\304\317\352\300\272\030\300\204\225\301\302\311e=fWI\361\265\323+\271\316\037\037\035^\317v\223z\357\332\346:\207j6\357\224F\307}a\2419\017&2\005R\360m\344P\355\276\371\264\326j\036;\002;V\322\265\250\244Uk*\341\342\311\345\322\201\016\274\341H\nrz\315\274\246\336\207\200\274v\336\350\330\335\273\371\r\230\232\350\026\262A|p5\206\322?\234|h\206\222\001\224\023\"\t\2212\242e\010\342 \003\314\275\257\246nm\244\263\336\341\250\341\237\313a\004\037aH\200\346|eA\372\010\310#\272J\230@\276r\2306\250\014\2220\242\362t\333\340\353f\006\241`\376\2637\"\031\327\005\326\367\270\347\211\2177\227H\316\037L\366\366,\321*\200\371\316oQ\234\373\"\244\357\213\210<@\014\215\313)\204\005\354\000]S\335\354\372\345\304f,\300\007P(&\013\246\225\333\002UL#\266\3332rq$\002\030\025A\212g\"\332Qw\232\022""\004\002\317\362\025\255\340\002\t}\021@\353\216w\022\313\253\205a+Ov\321@\312\024&\013\014\225\3014\027,\3144\273\263\200\330\n\373\226\242\004!\331\337r\230\rs\220\356\312Q\307\3130\371\243Nk\005\361\303h\321\002P\000>\241@\230\006\353\205\213\300d\207P\330\350\327\215k\026\n\354%#\017;\313<\310e\260@\021R\314\250\022,\241\333[gW\021 \350Cq\242\270\345\316\266F\247\013h\214\306$\273\270\r\2764\314\242\305\2640\226\020\230\273\"\003\234\215dP\202\206Bp\0048Ay\020\300\021'\232\352\\\2402\034%\303Z\306M\203\243\226\260\262H{$\342b7\000\205\215\201b\345\314\266\330B\006\265.\001\0010\025\\n\301\354q\252`\r\305\303\014 \2227\0142\343j\022\226\220\300\206\032\"\362\250S[\216+\2142\330\366\310'Yd\211\326\362 \300:\246\273]\230]\t\010\th\200\204\202\0228\336\200\270\356\"<6\305\005\226\301G\245\273B\262Ae\013\342S\334\324\312\226 \344q\211\270\022\230\036'\027{\306[\230\030\265\2354\0344\242\020\036\212\242\333\306\320Q\257\266\332\027PZ[Y\330\306\r\004V\346\251\310\226\266Bk\216\000\014Q\3634\261@^\202\315\311d!\335\333@\2058P%K\010\3052\313\300\274&jq`\314\225\t\206\260;^\357m\341\271F1`0\371\026\354\240%\312\245*\251M\007@\021\3676\372\350G\215\371q\t\354%\247\217\213\330\360\204\373\203\000\337}m\013\355\247\354\202\013\235\375\200\355\333\006\346\373\215\":HI\002\341>?\332\3406\031\3272Y\003\246\373c\216w\306\333<\253>%x2\003\271(\206\005\036\027\032\3570t\003\020\3010,\334\322q\361\252\027\314\202\340\306\035\254\033N09\304\260\300A\025\211\001\317/\036>\004'\251\0018\361Hv=\235j\234R\213Yx\302\304\002U|\246\0271\306\300\324\371\007>\324\207\267\355\372\313i1\265\271\374\363\r\\`\0078j<\n\304\230\3410\260\035\277\251\n\036~9-\304\343\317\257\257\335\347\017O\177\035\357\020\367S;\024\034[\325\205L0\240\210Vc)\203\205\271+\224\231\004\254\311\202\367\006\360K\256\335\246\206[\375\376y#\2335\305\032`\333\227\226\327\025\323\216""\"\201\317\325\335nx\371\026J\234Hp\230N\032lM>\274Qg##\246\034l\033\304\023\257\030`U;Q\250\326\370X\236C|6\224\322\266\355\260SJe\326nbY\345\266\262C\321\311`\211(\310j5 \2422X\203\022\256\026\250\200X\222,]\036%:qv\347[\237\214kg\\\323\310w\333\223\016\245\274\272\206]NM\035Bs\3336\035\004a\302)\330N\317G\224\340\3160\370]\022$\367S\243\261\013D\261\355\203\317n\216\217wBw\021\274J(#\253\032x\364\213r\205\225\305\333\214\210@\035\t\036\010\2471-\323\207\023\216\246\013\224\323s\205\272V\273\343\333\271\373%y\366\263\206\230\017\244\270S\016\330\372,7,S8n\033\311,Bu\324\272t\300\266\367[D\277\035\374\034\305\255(\326\365j\347\222gC,F0\t\354\363\356}^\225\027\204\307\353\006\373f\334\\=\27443\233uvL\357\343j\316pH&\247\214\340j\240+\272\212Wwd~5wv\271\031\267L\305\033\341\001L\210\t\2666\302\340o\357\322\036\201\006\003n\006\\nV\324\005y?\234ARS\273^\030p\007\246,\010\213\004\020E\000A\202\310\213\004\266\t\245_9\361'p\213\t\362\272\216\034\356\251\222\207) AH\200H\206\305\265\266\224\233L\270\320cl\267\353\327$\014\024\322\325d\r(\260A\001\302\311*\252*\301F\331d\211\030\240\366\016\361\010x\250\227\352\205\007\245\034rL \\\302\003V\363\331\006\223\235\363\270n\363`&\231\307\204\013^)\227>i\237<\013\313W#\016\306K\360\004\220\n\002\342\251H\305\013\216\024B\203N\237\242A.^h\224\212\336\017L\267\224\335\004\nJ\002\311\021\303\276\255\307\230{\347\343\341\354B\343\310\252cY\327\267\r\272c\333l\013\031\201X\233X\033\246\357C)\360]\314\342C\355\344\252\314\346\303\207^\277^L3\356\263\303h`\026x^\270\201\316{\370\3450\030\262\340\345\002B\037\227\276\325\204\210My\255\232\000~82 \025\360\331\230\335\023\236\233\247\227\273\273o3\314\334%_\274q\213\347u\344\034\014\250(\364dV\274\207-\032\304d\003N\355\273h$J?5\206\2020\231\010\027[\036\356X[\ni\257\214\347\322\301\261\365$\002\217d\003\250\240{\272\206\242C\226:\334\242\364\037\220\205\241\232\025.\n},\006\350\336\360s3\316\356'Z8d*\343\202\345\230\362\303\212Z\234\032cY\32069\315\241\234\033""\334\267\265\206\007\033\347\315\r\370~\023\332\366\037h/^.\336\037\325{\224\3539(X\000-\200\242\010%\306b\317\366p\203\222\252\242\022\003A\030FJ\202\024\020\034W\325\351\032\037\266\370\3150\022\225\221\214#\021b\221Ozu\201\357\340\007\323a\263\026?\006\335\267\2438\023\345\351u\313\212\346\325\275\316{\355z\033\024\371\316\371e(e\243h\331\307\336\316\316W\347\312~NI\314\272\237pf7\007\234P\255\320>n\224\351\311Q,\211\222=i<~\225\250\200\351\307$\235u1Q\n\300h\272\373\264\351'!y\216<\277WN\007xH\004\302\222\222\035\004\316d\276\363\357\001\357\010_\306\2063Gb\224\376sG\205\021\263!\177=+\250q5w(\375W[\264D\232s\222\251\244\211+k\3208\363\3360\215\302\034h\017\222\347\277jj\022\022\007\353l\360?N\036\276\001\330\315\035'\031\272w?\204\350<`|D\341\266Jg\361llt\006\035\203w)\002H\261\004\272\204T\373>d\034n\205\342P\007\312HFA\204Q\221s\341\277\024\240\277\207 \226\034\342\310\203\226\326p:!6\000\366\260;8\320\347\363dQ\370y\256\233&\322\266\334\373}\006\272\371\260\226\261\037\237\261\254\306\004\235yZfu\225\330\254\034\tB\213\036A\002 \275\376;\340u\014d\013/\214\"\240\310\031\030\2658r\251\350\007f\024@\322\310\332V\322\250\354\244\222\240\023Ar\"\006\235\264\276xm\334a6\317\014\233\242\205k\031\277i\233&\362\t\312K\306\373qS\206\231_\026CY\335\346\177?\203\330RM{[\356\\\360#\222x/\252\016\035\242\024\361\304\251yq\016\212\027""\317\264\013<\021\"H\204\210H(A\021`\304\026$}T\242\240\261\200\203\0061\021\202\222E\005UY\030\213\024\211\021\024Y\005\000\021X\"\260\001`,\004b\311\024\200\212\"\252\240\210\202\305D\210\3061\021\022I\002HI\247y\256XQ\364\365}W'v\224x\035C\210\357\006\022E\025\010\301\022\010\177U5\352\351\343\327\267\236\336\335\365\243k\224\3675\313\323z\030\001\234O\177O\014d| \232\006\373\270:da\027\207`\332\216F\306tH/D\014r\356\341>\357\"\227~\226\345i#\224RFZ\23094\024\336\027\271\231\207f\272\231h\321\305\007\270\200o\233\260r\347\261/\301\r\245%\275\207\321\356\217\033_\014S\245\260\235l50MD:$\261ESw\201\003\2017\315\363\200\340;q@~\355\2202\206\252\013\235P'\332\204\261\t\304\350v\003\277\325\366>\377\311\366\017\255\264\361\037q\250\n-@YPY\350\033$\037z\000[\010\270\030F\337\030&\026\207D\352\237p\365\331\017j4\351\257\313BTX|\347nu\320\245_\252u\353\260l{\232\340rx\0074\230\214\256\326VG\252=\232Z9u\031\235d\271f\356\037\020L\302*\025\232\242\240\216p\001EA\217\267042\266\330*\0142\334\324\033\374\253\240u\020V@\033@\035\024\301\213\335t\0301\206\250bxB\315\037\271\252\3011\r\245\241\316\3634ChM\240\230\\d\230\312q\002G\317\335\177\227\354\307\367\202\261u\004\356\244\333tO46\377\007\317\214\373\344\036\216c\272\241\226\247\261\003\3640\353\307\251Z\215O\266#Q\300\252\227,\323D\177 E<\030W\334\3704\3505r\0241\021\203\022-ml\254%\211e\340\303F\206Y\241\322d\014\314\302\313\346M\203\325\320\016<[\350\013\322\323\223\2402b\301\206\0032\225\201\344\336\003\320\\\352\335\371b \310\212+R!\244\206 \270\374\244\200]\010\326D>\257\320\253!\303\2049\365\277\321\253p\200\021\004\2724\035?\247$\n\375\037\323\333_gt\313~\254\010\310m\330\314y.\235\324\235Y\345\266\260\340\364\361,\002\251#\366\325\n(\252\014Q`\257f\tx\310\025\000\370%f\374P&~\305\277K\205\027\250^`\236\326\245\347k8\207\220s\347\235}V\265\266\366\3218\006\026\354\026\010Ma`5\371\003\377\r\333\277\226\214l[\217\233\262\371=\375\212}Q+\316\033L1\303\306\303b\360<\242\006B\0246\243\306b\236\355\017|\220\206\371C\204 ""||\234\r\322\351\\\322HB\021 ,\030\014\210\310\251\"\304Qfi\223\351\235G\331\356\007l\266\302\324h\341\253\242\263xOO\320?+\362\217\321\353}d\037\240\374\237\213\332\350>\022t\346%\230\362\257x\200\325\220g\314=\353(Xn\356{\232\303,\243\022{\030o\200|\337\217\014\327\321\3130\322D\215\031\267\241\277\216~\316W\307\021\303\\\217F\2253LCp\343$x\250\261\202\t5E,D|\031{@\340p@\247 \030\024d\025\304(*\001EU\\\335\200yy\036\217S9\316\350a-\205\t\352\233C\350\33471o\017s\033\274\316\354\264\026\252t\344\205\244\202\027q\203B\022\343\355G\r\341\332\0250oP\315Z\022\2252\013@U\024F\001\312%\344\031\241\313\242\331C\004.\332-\351*\\\024\274\245\262\320\tV \301$\014\225Q\324b\350C\256\2340\022\002\022\021K \035\233\212\267M\232\275\004$\036\252\r\317\\\303\220p\314M\300\337=\016\220k@\016A\346\211\316%\240\t\322\000\022\262\000RJ7\253\016\300\201\235\333\037\235\342W\216x\363\312RL\234t\222\301\2472\2200 \230%y\255d\260\3050\203\373\230\320\200\266\214\006u=\350\315\272\026\006\017\214xbS\3010:\305!\"\n\214\001\212\216J|\247i3\350\316\215\370\274N\256\376\t\303\210x8\371\014\000\356|\322@<\306\033\210\024\365\262\302\030\002p\341&\255\206^\205\n\342\020\331\2022V\010\242I\327\336;\030h@R\023r\003q\260\021-\345\2234\003P\321\222\005$\033K$\201\205\200""\202\250\"\n\202\317{\205\216\312\031\014e.\225Hll&\306\2675\335\327]\t\330\203\305\211\350\301\325\2111\005\005G\347\231`\241\210\025\204\362\367'\2213\234E\037(K\031UQj}\320?,\020\300\010'\343\343\354\370\347\347\345\222\211\233\003B\007\"$\206\302\006\007\330\370\316'(\204\237\007\333n\373\027\010J\246\020)&\001\302\346a\371ytW\001@\334W\224\322\324\277\225\355\370\177\020@\t\007\252yA{f\000A\321 R\201E\004aH\3126K($`\2001\355\341\350\335\213\256a\016\2000\0304\361\316\313\004,\235\300j\264\314\326%Z\003\247\210\232\300;0\025\030\261@`\210\204P\207\346$=\324\223B\010\271\020\020~P\323\316\026\332\351{\334\267\232\200\264\026\240\036x\306\022m\266\371(m\276\235\266(\253\233J\033\272;\222N\341\223\274\207\214\257+\236L\323)\303.\316\230\341\017\300\370lv\317\323xa\362R\244\345=\211.\025\027\2451\014\347\325a\335\266\323$\316\347\016m]\014\235\376\363\036<=\017\242\346\251f\241\346\205;\220\202\206\036\341\025\222\352\273zp\271\277v\273}\246Y\353\350<<\373|\032\376/\336\3203u\243\206\255v\0331x\304\366|\002\211j.t\236\254\271\330\361\214\371\251\034\311\231\027\025\023\nw,o\367}\303\337\367\241\357\306\3216\342V\324\244)\346V\226\303\013E\240\2051\010\301l\246\003\322C~(\220 \240\244d\256\234\342\346\326\305\361\177_\340\233\352\025\326\201\001\302\202\204\251 \3017H:\332 \225\205*\2160M\335T9\t\0324u*R\306\326.a\211RIDX2\201F\\99#2,\032Ya\022C\265\230\026p\246\034J\305\020\316n\303sb\210&\240B\251\023%\230\270\024\253\002\200\240\224\264\362)\326P\031\261e\232x\2463a\324\214\335\270\277\334\375\257\227\345>{b\014\021\030\261\014\313+S\0201\225\200+\025X\210A`,\025\024\025EDV(\301\004\371\364\242\"\202\311\213h(\240\000j\337\210\245O*\013v\252\255\032V\331*\314\0230\2701Em\0210a\246i\225\3220O\210@($X)\021\201\215\020\022\n\"\"\252\305\2201\256\220\t\3170dGI\265\343\206p\260n\316L\312!\313\310\345\215\303\240\n\210\022\375\235\373x\304\202\300\323\370\375\002x\344`\355D\337&\026YB\326\\\202Xdh\231Y\361a3M0\264t%\246\232\031@%JR\261`\302\220`\224\020l\371\275\354%\034\224w\304!.7%\361#L \024\tr\025M\274\351o\321VRS2\212QP\347\333t'\306\317\0370\353\306[\200c\207\246\3521U@]\272x\022{\r}\276\356\217=\323\244<=/9m\251\344\313\217\243Z3J\253I\270O\202\343`\217=\022\270l@\321\003\033\024\n\336\315\221\260deP^\225n{0\211\215\262\311e\022\000p\207]\305\375H+\002,\222!&z\347Q\206\304wn\343\337.\034\254*&\273\225\003\202\000\006s\033]\273\231\224\201\243\326\002\275\344\256\355M\222!\003x\355Tq\356\210\353\003\236@\300\230HT""\357=Z\302t\247\325@\311\344\251A\3239{\335\010y\370R{\310{uv\357\364g\032\225\230\347\253=\005\276n\263\313\021\020\331\010P\207\224\037I\000\251\0349\030<\255\255\202\21348\342\367\307\017\t\211\371\275Y^yl\037M\373,\024a\264@C\222cdes.\021)\353\372\200z$8\004 B\000Ed\010\020\035\325C\252:\007\240}\030q\005/\000\241\311`\246\006\035q.a\031\033'y\003/\016\267N\276\214OD.\2744:7.\036P\261\270BDd\354\211\335_\2160\024\214\202\003\000\320\300D\001`zZ\311\266\331\222\245d\204Y=\300\266~U!\250\243\205%\205\260\242\3006)ih\306\020\250\025%\005c\347\330\352\372=]\370\370\345\352\325O7\032x@# \247{\310\230*\245\213K3*b\013EjX (\326\214\"\313\005\226\211\022\2774p\313\246\277K\351\315\\\272\371\2779\2359\263\252M\252\367\317\253\222\325H&\031U\244\032!\231\232\010\346r\252\203H\244\271x\235\311\252 \255\td\0174\254\005|\2742c\027\335\306J\037KfT\3724\234Z\355\014\210\263\r\004\201\266\006\216m\312j\212L\006\303\272\025E$\001\347E\204\231\300\221M\321#\260\205\004m\204\033\354\034\270\027\016\203\0043O0\223\326\331\266\033\303\313~7T8z\206\362\234\357L\346\330\267p\242=\356\231\365\"\267U\301\002\201\036\344DCAuPJ1a\300#\002\004\345\205\"1\3273X\352\247h[\346u\204/G\355\364\315\257\203{\027sf\226\315\005PU\331K\363D]\263!\222\342w8\334(\224\316\336\271\\\034\000\263\302\226\026e[k8z\"\271\021\320\025\007\\'\001\366\241I\241hR80\r\317%\266\003\210\263\225\345\276\322\216 \311\316\000.\373\007h\235\200S\220\021\\\004\260\010\242\302\344\224W\n\305\215\r\214\224\273\340\265\2547\273\345\344\006\031\251\003p\342\365\373$R\002\020\007\257\000\300\004\025g\313\207\275\t\321\347\341\351\031WQ\365M\315JV\202D\3228N\004;L\312\240\220\313!\347n\232c\335\333gJ\312\362\\\362I\353\315N/\324z\326\3400\253\272*\020H\014\212\252\016\270t\367\340\004p ewB\020\346{\220\334\310\230\205\355SKwNeM^\031\375\337G\327\266\204v\366W^:\276\256\335\200t%\020\020P \353\225\255~\331Nf\330\335\353o\025\373\034\014\221\321'\010\226\262\237\263\362\320\273\302\364\231p\265\320\374\021\354m\220xD\030rQ\336@""\202/\003\274\207#\004L\240\017=\345p\216\227kG/7T\210\023\335j\310\347\205\375Uo\324\265\337DA.B\230\004`\033B\307.(\366\213\256\024\364\220\204!\314:B\270\343\257\262r\007>y\230\347\347\361\007\276%Kw\372$\334\211\006\"\254\217\223\t\002\210\226\226ZPE\204\010@\204*Q\033l\211\236Yh:\356'\177\204\322\332\315\247\207K\001\273z\302{3w\226pt\276\265]\266\343\307\224:\334\310\013\372\317\343\371\263{\002\230\366\353\327\216\027\307UaE\362A\r\355\316\333\365\234\374no\354\030gz\326\236\371\355\322\323\020\2120\004\206?EY&w\225\277\206\270\334\327\307+ \215\3723\321EBAR\220\262\374\367^x\001\000\251\224WD\026\020\310\316\316UT\021\243\025h\300\021\267|L\n\030\345\337$\242$\324\321k\224\025v_[}\373\231\330p)bByy\034;\316'\nh\343k\001a>y\205\232C\nu\326\202\327h\361\302\271.\341\222o\316\034\304\211\002\354\220\204m\264)jR\221\214\020\273c\016\217\0030\\\367\277\216\264p\336\267\323R\314\266:&\022\033F\225\204\203\201\367\303\205\031\363\362\247n\032(\247\225xu\320{G\226\222\035e\254\032\032\312\316\216\343^\273\362jt\252\"LQY\225I\034!\r\240\332@\332\r\255\244\342Cl\343\364\026J\364\252\320\331\247\350\352\220\200\t\356o;c\016\007X\241,\354\276qC\n]\004\260T \022@(AD\303hU(\n\02734\242M\2124\252+-X\025\214^\254\205>`,\0317\231\325\\5b\235`k\031c\367\325\001\244h=\302\0219Y\000]\326\327\273!\302\002\025\030\020\323%,\232k\214:\345\336\342\350\016\246\004\001\210\276f~6\326\214Vml\001`D\205\013;\227\205[\260\235\252\302\010U\333~/\026\265\316\355\202l1H\270\255\333z:\307\\\323gd\227r\252\206\"\350\220\"(,\203\270\202`\306J\233\267\025\252xw\001\270\333\215\022\026i\336\274dv\220\027\201\332\035w\002\206\345\rOz\344\201\233\026\262\242\314+\027\\/e\242\202\372\2665\313W\021\252\325/.]\2575\221e\266\030v\321\313\r\222<\234L\020\245\301X4\304\311\226\231mFD\324a|\342\264\227\310\3139u\302:\226\034$\207r$$\312\010\000\272P\200\035\334<\204\264\313\233Y\306*\014^\236\370H[#\n\231\212\324p\276\030\320p$#\022\034\343T\304\325\325L/0\nH\032\022\025\316\223U\222\035J\006\270\014""\320O\264\210\2372\032>\033f\374I\266\354\213\026E\020\030\260\024'\202\005\342\346:\314@\271\"B\365B\304\337\216YNv\310\274\243\034y\330!\314_\002\354\300\314J\252\235,!AD1\240\241\031W\200\261\033!\331\226\036\200\312z1'\006\237\223\010\320\261\245\0015\025%\357z*a%\256\353a#@\247\034\320\265\3257\336\205\337&\203\242}U\313{P\336&\311P\222\033j\347(\323\301\270Rp0\224\311vr \357\013\306\265\0167\321\263\004N\251W6\236G3\272\030\343\205\240\020\345-}J\014-\303EL\254\001\n\"\364~X\201QZ\222\t\363\376jT.\353\236D*\030\341QC\206\200n\360\341\240\030\270\236\023([\177{\034\270S)\356\347\301\031\275\316G\036\377|\342qH\237z\252?\001\032NPJ\202[\034x\335\321\360\360\271\036}\032\261\205\022\345\345\363e\364\264\334\247\214\201\345D7\260\261\345\014re\255\313\002\302\331\224\304\303\02330\200X\242E\004J\310b*\023\n`\251\tP\214`X\213\034,\306\310\rL\274\230Li\224+\254\260Q\313b\210\254QX\002\032b\332h\350Q\235\3420\244m\226$K\302^\241\316\237M\005\371\007\204T\016:iOa\002\351A\254|:\022\246\272\305\317\235CJ\276\264i\324\350g\215\334\361\203\322,\247\211j\231\222\340\344-R\255j\000\233\365\307M\366fA\220p\203$\000\334(\033\026\210\335\204k\033\272\312\t(\303J\241\0169\027\r\030\021\202s\326\233\2543sH\310fB\321\201R\235p.U:\276C3U\306f\t_\007.H\214\035zp\354C\250\275)\016\252T\323\253\007\035\366i=W\277$\365\226(\244\263c\203\022`\3303\336\373\226\307\247>x\202%\321\314\t\367\270q\303\256\231\340\274\341A\261.\232G\010\217X>3\023\254\374_\n\010|\"\007\302'\302\0071\016b\363\027\231t\002\353u\271{\227\351\036\007\034;\364u\374\263J\324\232h\037\004\363\342\036\263\325\362\371\315\303{\355\322\245\265?\266\310\260#\026$B\332R\211V\240\255\217\254\330\364\224\030\007#\332\034\000x(\353\274\000PAR\021\221A\214\221?% \025\237\006y\231\337\014p\2671:}\352\217\333\024\331\037hp\036\372\357\246\275\275t\310.K(P\034(\251K'\255\322o\317l\234\335\301\200a\274\361\361\0136\207\2131\275\212\262\003Qi\205B\311\005\344\020\306#\321\023.E\232 \301\204\360\223\311PD\275\366/r\037\217\020""\240\333\211\343=4\034\252\365\210\326sN9\177_\357d\001:n\037\243\320\035\256\250\275\027/\023\371\031\323\355e\214\213\003\364\222_:\030\206\202\034\004\205~\247_\311\020\024\3570p\000c\021\206,\337\314\236\205\031\010A!\020\200(\240\016\262j\032y\021\023\"!\220\322\322-\370m\205\323>\241UTT0\030Kk\016$\326\216>o\346\363>\227(\247\254DeA3!\202;\224\r\024\t\203\325\017\256\200\"\nC\256\345\333#m\026\345O\231\256\342w\010\014T\030',\3310H|G\006s\274\334\206\346\364\354\220#\034\215'\354\205\215\333\000\201`\013\010k\"Y\022\316\266\270:\376\254\345\313A\t\342\240\202\220T|\255#\000DG\330z\363\346k\331\3619\260]\312\037V\375\217\200@\347n6\3479\311&\\\371\311\245\352\331\316\030,\220\317\255{\330!U\233\331J*T\211\034@\206h\245\255\344\346\241\211\315\267j\335C?B\036\205}\nz\023\304=\036{\345\346\036P\026\275\264\200T\032 \242 \221`\244X\nH\013\024I\022AA! H2(\022\t\274U\340{\373\250n\006\201\276\373\270`B\226#Bs0j\276\232=\360X0\352\214\316\322`\326\\\322G \367\253\225\006\217J\\Qd[\002\304\306\003whF)I\023/\313\240TZ\002\211\035\224\233F\034\333\304\251\266c\016\003US{W\371\373\334V\n\205J\250\333;\262\330\321\221\357\270?_SFN\216H(\207H\204\3314\232\025 m{\250a\364\341\242\277\225V\217\313\370,=\036]\316DF\263t[\032\316b\237T\013\360\331\036g\264A\222\004W(\001\\j\306\322\325NR\326E-Y\251ss\256\2474o\235\376\022\337/\222\371\001\344\236\300\373\037\017\267\343\307\344T\361!\252\206\253\253\256\247\262{\227\330\372m\371\217B\324\016\352\345R\242)\344Rq9&\023\277\333\177\212$\210H\220\210\242\224k\017~\332X\326cA\326\255?\003^\340l\253\",XV7\325\244\024\211\341F\210\373tz{\210\217\t\002A*J\212\001\t\300\2210\027\207\351\343\273\361\007\241\363b~yS\374T\277 \314\177\335\313\251\270\027?\016\240M:\273\2554\016,%f&\276\342\253\263M\265Rf|\347\360\341V-+\324<\306\300\306\256\036s\237\262cZ\240\335\307\234krDR\235l3\nI\250\202\364\334\366\"\035\226f1\031Qp0\310\314\302$L)\2716d\334\245_\257\340\003\337u\327\236n\337\311\375\037\344\374O\361\262\013!\340\317\234\230\202\305""\204PX(\242\003\024\212\010\301AUX0P\213 \013\023\267\221Y\372\224'{\003#\005\021\005F\000\210,\202\301T\221\025QH\013\001<\217\350\024?\220\375\325\374M\225%e?\332\310\nO\302\300\375\327\357\204\211\001\005k\242!\200\204\225\005(\312\200\252\"\226\224g\312h\344\213r\226a\033b\205@\205\375M\262L\030\260AM6\010\250\033YE\004F(\216\007\354\374\026\177\007\272\236\366H\345(aA\264\352A\037\2528\240\022\002H\372\237Br\370\364C\373\342\265\032\004Ut\317\273\2050\375\352\025\340\232\242\225\234\tS\366\017\207o\317\321\177\364\3452\\'\347\263\370\236\030E6a\246n\233\260\227\347\252 \277\332\377\2753\033~\366\265\257\216\233`6\222\t\374J\324\005\202&\317\320L\214\323\260\224`\345#\374m\014CYd\225\254b\250\300D2\205\202!1+\"ml\237C\374;\257\326\3748} \333\370i\222jc\003\363`\303\005\010B\376\301\230\314\341\003\010\230!\232\210b\014\220\n\303\024F\221-00\240\036\257\302}\317Os\364\327\013\003\007\304\242'w#\223\3432\3164\261\370\2164\\\025\200N%r\007\030 2\215\214!\256*q\025_\227\245\373\037\240\207c\373\273\33347c\371\034\303\355Ne\241\312T\023\377\023.\357.\021\007\020$^C\2132$ \210\300\215 \003\224,\211\322\300\317\227\364G\366\037\244}\223b\376\345\n\315G\376\220s+\376\362\323s\3649-a\257\256\361\315\3357\334\3169\333\006\344l1\274f\306\241\255\353\253\r2r\342^Hk\t\313\313\214\035Yv\260\242\354\346\031\222\256\345\337\033g\021\337x\343\351\010\036\347\323\372\354\2144O\235\t\215}I\263\023\344\224\017y\244\204c0\025\305a\324\340s\nK\323\364p4mf\306J\265\266\303\361:\022\"\032% \326-`\177C\253i\275\322\364>\212\303\247d\351\275\177\247\265\213.j\022-\330A\031\202\224\3046R0s4\330\230\273\377)M\210\2226\022.X\3223\020\030\316[N\216\032\275\366\235\277_\367\307\355\333\367O\325>\351\367gM-\353\372\242p\234\234\210:\365\341\r\262\020\264\026*\346\252W\347\366\271+m\3245\304\261A\255cl\266qdl\333\302\214\271PE@bF\311\302C\212[\000\224r~\257\330\364O\373\366\207\243\366pN\017\331\336E?\325\203 ,{vA8\213\240\222BuA\244\205\240\261\002\310\313D\377\257\377\025\250\010h\325N*H\221""\211\326\352\221 \306f$\263I\254\r\272P2S.[\320\230G4\247\324\372\337 u\341\352\307\260'\3400\266\030>\025&\027\335\373\337\214\3605\217X\335\361,R\013c\304ur\321Z/7*\246\006l=\021\312r\377\235\331\234\260\347{7d\251\212[\014\207\024\345\223L\331)'\023\353\375\277\274\207k\210{\377{\001\231\364\253\323\272~\352q\244\001 \217\317\221\311\256\343\223IU\177B\251\313\262G\021\266\021` 1\213]\304\022rQ]t/\367!\300*\201q\221$w5\337\364\317\252\375^O\325|\217/$]DfD\241\204\224\0218\315\367\177\333AE\277+~V\304.T&\252\032 \330\343N?\251F\233N\377\276\371\200\266\301\002\340\354X\354\016\266E%.\020\352U\321Y\3443\261\020\325\226A\242\">\357\372?\363\373\350\027{\357\217\325\337\236\371\257\313=\034k\003p\265\247\263D\022\216\344\264J{\372b'l\303\215\016+\330KS\225\016\327\216/I\366)\321\317a\027\017\n\357L@8\334q\306\256\266\343\241zX6\230:*\345,\315:\002\004\214{\277S\361\017\277\314\260\274\013\034\243S\177\215!^%\243\343:\254(\300\345\2207F7L\363\250Z\347W\023\216#\305\272_QRj\317d]\261N'ka\"\0013vF\025J\r\345\202\245\213\211H\201\305\207|c?\233\277\323\366\237A\010\214~\236U\2769\375\000\240\300\276}\\\215\025];\307\0202\257\212\036\023K\030F1u\320\253\213\2477\305\252\235\357a\230\002E\344\312\311x\034Gr$IP\r\325K\036\036X@e\003D+\316\3553,x\3234]X\256\376\007\217\307\315\342\034\265\205\322\220\374\006\320\341\032\030\340\226\241\\a\0204\032\233e\316V\311\211\276\230\333x\314\031\261PwN5U\266\224\217\323\270=\3346\343p,\231\2544\370\270\224\t\343a\202\322\362<_w\033\371\337?\002+}\256\205\316sO\360p\2258\233\225.\34508f\014n2%A1\n?F&\013\323\0213\235\244\330\207\245,#\200\320XyA\356\316\302\021\276\272\036\217\001\312\271N\363\325\321\321F0OW\005\222\215\025\003\276~h\027\376sk\333\347\300|\256\331p\3303\373\277\216\357\233n0\374e\230lX\223\201p\201\245\004q\204\204a\255\035\003\273\313\345+\305\314\207*'\254Lu\217g\2447\341\037\216& \003e\310\"\021\024\2318\013\237\311?9\232\316\317\242?\342\226Z\247h\271s\271\002x\213\033\200H\300\327\030n\023#\343\306\264\262\245P""\346\346\361zX\354\364\357]'\236rD\236\013\254\016\013i\317\004\3167)$\354\263\327*+\014ksdh>0\tq*\027i\226\311\247\276\226\247\037=\232\0166p\272\312\240\303\222\332X!\3118\223\212\020\000\\\274\303\313\373\274\310\216Y;\320=t\007?\265\246\356\330\rZ.\272To*\205\247\270\021n\003\005\016\017\2130=\232\226\n8\026\360H\343\022\244\025#1\217Dy=\036\035\375\034!\306\231\256<|\221\365\t\361\221\3408\3604\307\264g\036\337\001""\323C|\357\242\243\203\315\305W\270h\305\357\342\032\231\036\017\016\377\027\237\314y\210\3361\275.qZ\272\266\032\274>\234\270\350\226\351o\351\227\270\225A&6\251\014\030J\363s]\377\244=u\341~\023\ts\364x\331\371|\307\307\030\214g\013\243\225ct\311z\326\354\346\353n$v\266&v\000s\227\336\361\3752@\036\002<^\361\371^\003\023\342u\221\315G\\\357DJ\032\307\215\351\211:Q\317\0227z\036\347\370r\221\356s\244X_\0071\211\361S\347\310X\263\\\335\016\355\355\315\223\262*\371\3461#\371dz\376\267\322\360{\n\014w\320\034\244\t\004\312!\370|0!\257\0375\260v\313\372\234\207\223\315]\356\366;\311\217\t\3722\200\237\005\367\306k>\336q[\216\230~\246\357W\266\261\310}h^\277v\034\302\014\342\375\177\220\306\211\232>\306\303^\332\255\220\355\366\277\230v\301\357y\275\337j\001IQ\356\3628/K\272c\3276~x\367y\264=OUF\365{\375\276\307\372\311Q\373^9\310\370\217sL\227\024OY~\351\263E\362z\266}^\326\364i;\325\210\270}\306\033\356\036\352\3565=\302\004qU\004wV]\276\327\271\201\346\234\037S\223\322\231=\276OW\333\237\301k3\334\032\0325\035\321s\372\307k\223\265\332\014\217R{\222\214'\333\356L\001(g\331n;\273\177\014\217\215\363>\341\307\251\352u\257{\223\324\244qO\270y\"\311\322\202\375\237\343\365{k\257\323\355w\372\345z\321\310`A\244i\367Iz\365\254\221;l\317W\235\367Oo\270\300\355wg\250\365WP\365\271%6\344\271\021\372I\364/\251\225\233\314\303\225\177\243\016w\241\307\320\366?\030\317g\267\370\236\2654\275J\357+~p\364\257\264\372#\366\236\250~3\031\036I\350\311\364(z\374\376g*\376pd?z\372VG\267\251\\\363G\345\214\304\357?\227\320\343\323\352h\344s\234\261\310\347i\030\227\347\362\377G\253\323\311\370\365\270_7\3129!\363\313\360|\217\002\365`r\374\240\316\207\\N\361,\017\251:{\274\375\347\243~\346o\223\272\336\377\017\212'\243\242:\345{\277\017\257\345\321\207\345\363\236O$qy:\372\345\020>\007\215zn~^>\250D\275_{\n\322;/\345\345\367x\274~<\217>w3\227\366\371\025\030\352\376O\224\247\227\275\227\247\357n\265\034\363\255\337{)\321\317\337\306x\024w\355\346\256\267E~,\3551\347\002\217\361\267\325z7""CW\205\322\325\241.d\330\234\022F~\320\330\t\202\252\210*\200\250\216\301\025\221\204\000\221!\024\221\010Gj\237*\314F\342\331\264\307t\332\241Y[\336\326\".\305[\370\272\004K\020\210\033\356\256\331\213\206=\245\301\361\234{\377c\235\342\343T\367\361+\250\230\370\207\276],\220h;\362\270\252 dJ\335y\324\\\303\315\251\230qH!\344f\210\272\312\273Y""\201beU\"\343\360\2312\276\276\2563 \355i\342L\233\271\372.\242I\023\372\356\036\351\225\264\353\333z\213\210.\354Cz\017\332/\026\254l\367_\257\321e\350\013\372\361zqN\246AJV\023\3503\016Z\027}[\333=\366\266TO\203\353:2M\177n\3246y\311\373\367\022k\272\205\206\014\213\027\342\003}\357jg\353m\257\226\026\262O\346\350\315\271\266\271\324%\321\316\261\212\361\247NT\244\324\271\336jO\204\302\326\265W=\364!\035\007\274\202\270\263+/\210\205+jj1\361\335C\373\226\363B\237\031\023\357_\014v\205\304\014\354\314\362[\316\266\215\341\247\343+\213\354e\332\234\262\332\356|*j\207\331\376\265\242U}Wk\013\006a\212\212G\312\304AV\020\024\345|\247c?%\354\"\320\300\\\277\336\325\365\344\247uS\205\361Le\330\230\270\216\0337\343\315\213\315\233\315Q\205\213\254\347\210;\252\312\342\312\010\262\213E\215w\262\316\"mh\210\231v\372\225L\327^\376s98\031e`\304\342\323/5**\025i\262\031\301'\251Z\037\\^\377\337\376\354\352/\346|\r\201\347[\212\214\312\265/2\247\202\360\350c\224<\336\036\324\336\273TG\301C\021u\227\356\260\315\263,\361\033-jd\306hL\277\2267J\354\241\"\227\227\213M\251I\315)\310\351SU'\254\367A\330\253\327\244Gu\232u\263\2147\371\017cTUZ\010_2\213O]\276\324?\026\317p\325\223\000\035Y\331\346\021\202P;\221\206Q0\354\345\313S\237\024\305\346\273\037\316G\340!}U\227\027\276\375\216\006\265L1*\036\354\3001A\007b\237d\211\302\214\031o\023X\244\341SjN\277\374]\311\024\341BA\327I\220\244"; PyObject *data = __Pyx_DecompressString(cstring, 22839, 2); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (25782 bytes) */ const char* const cstring = "x\332\315\275\311_\023\331\372?\336v\3236\316\240\2508\007'@1\212\2638\364\215\200J7\202@\324\266\207\033\213$@\332\220@*Qi\333\276\275t\231e\226Yf\231e\226Y\262\254%\313\374\t\376\t\337\347\375<\347\234\252J*\250}?\367\365\373\335kC\325\231\352\014\317<\034\302\303\227o\204/\321\377\207\257\343\327\365\360\315\360\245\355!\372_$\024\317\246\323\311x>\225\315\204\262\013\364\226\311\250\267\225l6m\207\026\262\271P\322\212/\205\226\262v>\224\312\204\362K\311P<]\260\363\311\\\230\207\230\310\330y+\023O\332\350\237_J\331Tm\331v\310^\312\026\322\211P&\233\017\315S\227\\\322\312'\023\241D*G\343\247\327\206B\331Lz\215\007(\330\251\314bhd9\231_\032y\031\036Uc\253\231\014\014\276\014o\347f3\205d.E_\2612\211\020}1\237\\Nf\362\3641+\203\361\223o\223\361\002>\220_\312e\013\213K\241\227/\347\222\266M\013y\371\222\246\255\246\350\371\036\326\241\276\371WX5\r\253Q\350\243\374\231v\3651\313^\313\304\251\025\217\207F\331\204\255\2469\376\326Z^I'\351+\326brdD\n\361\277{\367\356\205l\031't\327l\241YfP\273\260\235\314\307^%\327\354\025+\236\0348\271\274\246\237O\0067\327\323?97>9>\032\r\235\013=\230\235~\034Z^\213/P\017\356b\372\341\3443\257\223\231\024\355\"=.\317\2472\226\206\002}\026V\"\021\213[\351\364\274\025\177\245\366\304\364\367\266I\346r\252I\330]o\333\215\370\222\315\320mW\351\360\327\250e\320\312Z\032/\024\362\205\\\222Z\333\201\307\306c\r\266\316'\221\\\010\245\263\213\261\\\322.\244\363\366\200\372=\024J'_'\323w\373\023\311\371\302b\377\340\210\257c8\034\346\337\300\223\\\366\r0D\365\013n\207\377\321G\302\364\337\000\217;\024:9\313\035FBg\354\223C\030d\223\271\321Ngs\003\311\267\361!\331\2226\263\301\027\244\351\311\031\336\271\3763v\177h\301J\245\223\t\365\035\356>Dx\023\017\370\234\354\240\357\374\355\201\300/\351\352\273\236\235\0332\245\261Wo\254\334\242}\367]?\257\265\177$\324\237\312,d\373\337\017\005\016\246\340\350\256Y\351\220.\212\3610rtC\203\236\031G\022\tBz\320*>\002\246Rg\354P>\253\017?\222N{\250\232\355ke\021\224X\004\375\026\341T*O\273\261\234}\315\264!""\313\344!\223|\233\347\266\030C\266\304\016-Y\257\223\300\027\002m\220\033\014g\361\034\324\240BV3!\2065\242E\231l\301\006H\254\320\307\223t\216\351\324k\034\310r2\276deR\3662}\211\246\220B\033\372@\006C\346\262\313\274\2032\026MF\343Z;2\244\260.\272\224\304\202\350\277\374\233l\350\215\265&\253U\247\202\201\346\315\014\010\016d\017/\204\346\334\211\202.\317\257\361\307\2754YF\320\364\216\272D\354\226>V>Ol\002\275\364\3413\tU\347G\333\227Q\007\360:em\017\240!\036:3\324\206\270\014y\tPP_\233\367\302\2209\234B\236\370\304J\2366\303\016-[\211$6\241@\347`\341g\356\002\241U\n[\236_[I\312A$\262t\306\340Y\311\267);\2576\226\300\223\266\014[\317G=2\022\272\034\036\326\0344C8O\304+CsX\013\331\361\245d\242\220\306\220\226\375\n\207\3118\027z\223\312/\321\354C\205\014\235z\002%\204x\311\025\354\310\210\031\206F\261\362t`Y\372\030\003 \321\002[\300\301R\024PN\"\034\212\244m\202\360\302\312J\032,q\336\262S\361Pr\265`\245\t\214y<\354}*\223\240U\320\211(\016\305\320\200}\"\244L\\\000\014[yk>\205>a\000\017\355\213n\271L\3745\227\242\341\376H\n\020\322l\210Q\020\363VS \364\312\207\006\322Y+\201\017\320\332C+D\346\355\301!\341\317\302\373\301\342\001s\264\3274\033H\007j\264l\336J\233\201\350\033\200\377\002\3156g\347\263\331D8\364\334\312eh\\\301\320\344r*\017T{\263\224\314\360W\022\032\244e\245\324\3043\335\204\010)4\340\202e/\001[\344\014_d\013,+\344!\210H\003\202\t\213\316:\267L\223\361o>6\276\231w+\264\264mZ`\316\n\313y\244\226W\262\271|h.\005z0\247\245\022?s\326\245\304\220\232\33253j\300$h\363B2\037_\212ac\356\016_\362\263z\034!\232\305\024\263if\375\346k\036\316\240\311\353J.K2\220\035C\377\001=\210\242\245\317is\223\n\356\024\021\311d\211\036\346\024\024j\311\257\220\313a)8\206!\227H\342\225`<\235\346\261\350\304y\005\300\202\234\225!\211\005}\322\004d\241G\3317\370\312\020PLa\\*\037:\227\262\317\021\r\247\225\314\223\300@KT \034\032aQr\344\345\270F\226\227\212\212\345\254\224\315 \221J\253\217i\231\316\314g(\364;I\025\343\343\205\025>\352\002\313\301\231,\321\032\305\014\270?SGH\257.y\324$Q-\t\345\032\312\261\020\242L\006I\200\0109\"\333\036\361\352\376\032\204\002\213*\207B/\027hc\260\375\336q@q\230\210\350\021l5,!\031#\251\021\300\005\213\026\013\000\033:\243\211\205\320\313s\340\267/C\004l/\317\235\023&\376\222\201B\321\234\004\037\376\232\371\350\n\035S\322\025\016\265\020\016\014K$RX%\255\205NX?\322\300$\313\276\311\346\022\346\313\314\240\260\022\317\"i*\004\005,\n`\317\227\010V\344\310\345\200\364\231gW\200\2744\362\220w\177\205#yf\305\220\3153\326J\to\025-\371\251\235l\303s0SU\323\314i\314\270D\331\000\\oR\366\022\326 \024^\200\233\350E\322\277\236\346\243\245\346.0\315'\223@i\372\241\300\200\026-$\031\313\227\351\016yv9\351\256\266\351\370S\313\313\311D\212h\001Q\340\201\371\344\002\020\331;\234H\033\366\240grS\204\222#\006\321i\342\262\004\027\2060\007\354\234\365\232\230\232\005T5\300j\246\221\262E\034j3K\2526\232\032\t\r\023\323!\"\007\231\274\302+p!\236\"\021\r\367\343\272\263\031\321\253Y\246\2634*d0\305\350\027\n9FT\277\364E\304\332\206\\:\237\214[`\377D\332TC\367h\246]`\026:IS,\020\313K\373W\2406\316\263o\347\316M0\027\2602\371s\347F\024\237s;\0004\004\024\r*\322\036\003\2545Q\243o\022$\233\361\204\266\r\321\270\314uM+=\275\324\"\321\255d\342\334\271\241\020\t\001\304OpT\311\214\r\235\207>\346.\311LA \322f6-\310\204\343U[\274\306\214\0214\177>[\310{\326\365\024\212\033}\237\325\270/S\340\374\252j\2406#sr\225-b2C \240\271|,\237Z&\352-\247\034#]\340\356\003+m'\333\250:\264\335n\313\315u.\250\036\003'\243,|\340\033\244\t-\020\267\305c\030?\006\006I\264u\2470\0308\030\375\336\376\245\032g \233\037\374\034\255k\300\277M\276\311\372\266(\232+$\275j\221\240\0038p\026bO<\311\002\032\010&3\006B\000\213\230\017\2512z\306\202z\364\217\2056\321\033\004m\244\307h\226p!S |z\302\343L3P\332a\365%\2456\021%\316\020\013~\023lHR*\322}\213\370\265\021\2024-\247\226\372\353`2\204P\232\213\021>\346\263q\322\360\224""\020\036\272\014\214_\"^N\210>\3406&\264\032\325\362\031I\350\227\230\313I\263A:_0\373\034\342}f+1+0y\2679+K\331\345\244\013\214\356\226Od\\\325a\331\372\235\210\213\302\203!9\t\346\274\314\226\2158z[3^\275\355V\340TH\347\031hZ\300\335\320\273\370\312\373\241\320\370\023\241\254\264\001\006\321C\223\367\237p\213\344\212\375\376\277\331\026\242\357\201\020\370\377\321Z\323\363+x\246_fU^\035\312^*\010\265\322+\206\335;NBN\314c\271\213\0219\210\001\350\210M3\227`\301\231\246\270\260@-\004p\005\306[\350\3710\370\305\345\260w\364e\353\355\377vp\315=yd\367K\3777\343'\363\026}`\201\360t)\226\314@\024g\005!\221\\\311\221\204\013B\016\326\247\005F\205\241\300\200\253\341KBa\314p\244!-[<\"\210\260\031\r\375u\233|\366U2\323\332\304\220$\357\314R\231\377\325\312m\200\274\235\317\025\342F0h\345\003^\335@Ck+\177\r&\316\364\261 \376\0206\224:\271\031]V\353\0241H\311\303C""\032KC\202\0170\275\337na\306(\035u\305%\232\003\014\003P\217\226\222$\213\316'\255\274\247Z\344w\261\205\345\222\264(|\322\2651Q\013E\230\233\206\365\332\275i\021\363\005\273\275\275{\324/\274\321*Z=yl\302!\n\222{\205\021\224\275#TX\031m\026\374\010\024\010^H7V\326r\325\264\235<\t\334!\370)$\331\376\025Z\246\215\304WY\344[\344O\347\3205\227\365\232\365\365\244\002j\224\001\026\207\"\205CLn\370\244@r4\224\217\214\232E\022Ze\323\304\371\260\025\031\202\231\320\311w\357O*Q\024\342\340\273\367c\331L\322\263\375\320\253^e0\230\224%}\036Jk\321\002\224\350\335\017\350\253\345*\317\031\r\205\232\332y\333@\300\226v\2711%\343\261\341\035J~\213\250\307v\3133\274\003g\344\004\316\020\313\213\222\002\360:\233J0H\017\301\010\007\240\000\347^\311A3\210\263\251\334\025@\275\302\315@3\246\016j\010\322\337t\005J\202b\350\244FC\374\257\344>k%u\321X`/\352!\227\362\313\351S\256aV\027\267\223\356\307\031\201\374\033\2736\022X\352=\2206-`G\244\023D#\335\204+\320B\365\224\322\274\224\321F)\030\341~\0360\361an\356\213;5w F \360\3164\310\217\024\374\001cWP\214\204\351\010s\003\345\304\024\217\025\324 )\205\303j19\342q\360\212n\200\203_\244c\312\250-\001\353\020+\t\321Im\301\375+<\253F|\300Z\356\313Pv\376w\232\215\031\215\204\324\370\2221Y\300\003\301\256\003m\304\303<\330\327\026\344V3\203h\367ZX\354\375\030\303\202\247\204-\274\306\233\357\237I\263w\213\376\227\025\031I\317\275e\352\330\023\257\003L\231\241\274\3166\313]\231\225Y\023\265\335U\317!\024\253\3514\311\306/y\024\303\253B\354\241J\ti\374\037\371\326\277\314x\341\r&\370\014\357\371\377\221\273\\L7\263\252\351\027y\312\233f\2006M.\362i\255\331\373=\344_\340\032\3679\277\315\327\275\366\030l\245\307\002\300\314\204\241\206M2\026\321_\017\364\004\235\350?:\245\346AN\021\313\013\211'\303\316\027\026\026\002\215YDC\202\017C\303\366]\275\t\032sZZ\213\32124\356\367q\006F)\350&\001\307\340\005\263\026\023\002\357\227\337,\301\262B\"\t\226!\\\217-1\315\372\236x(i\224\327\251\2042l\304\262\"|<\020Y\301\020pK\233t\210\222\260\3162\240\325[q""$)\211(\227e{6\006Y\206\027x0\034zl\275\202\257$'\324Qcc\3126DX\210\264\245V\340~\010\0341\236\204C9\254f\243\255U\332\240*\004\002b\231\265\2009\231r\241\317\211P\242\220\023i\200\277\004`~\340\312@,'1\027\t\264\322)\353\377\031\3336\032|K\347\246NM\022\211=\342v\320L\253\225\231\022\003r\233\345\n\031v\227\203\356\nTg=\265\020<\314\032}\3546\344iT\230_&\034\342QXnQ\243d\013\031\3502\264\256\327V\232\244\035\266\222a\377\2228\31536\035\325\004\314\351\232]\207\245\3072\201u\n\004\226?\344\372\322lH\203\311L\202\305y\325\237\200<]`\371\213\007=c?\204\351-E\352\r{Je\355\023c\342\254\315\261wY\363\326\0014-\220\330M\232\n h\231\340\004\004=\324T\3562c\304)|R\366o\327\373\363\224\206\334?\356\376H\273B=\362)#\033\341\t)bl~J\021\036eH\020{\204j\250\202l^\202\032\001\310\205\010\315d\220\025\326GJ]ab\n8\016\353\222\240\216\272N\t\016\205\225\333\242\000{\201P\307\017\262\231\272\t\216u\3777\036\177\234\032\276\260B\347\267\234\262\227a\270V\3464\257\244\245?1`6\355\235~z?\024Z\244\375|G?\336\017*#{\253\222\020z\223\315\364\343g\016Q3kp\273\253\266\005\273\300\201%K\326\n\315Y\331\347\340\262\001\322X\241\376\247s\343DN\373\265\350\305\024\201!\325\035\332r\277\0306\300\256\003Ub\205L\212\372\212l%\253\276\340\017b\001H\264t\223*\365=\350S8\001\264T!\241\022\020\243^\004\365Z\224\365\021S\005\304\261\325\022\000\3428\353\0375\312\233\007m\200\340\025\211\236\306\202+<\270\020\250\210\235\3602\022\324.\225\266\303\036\013\271\262\n\260=3\371\326B\000j\010\352\025\221\003\265\317\200\2503\211\360\244\330\n<\246z\327j\320\316\234\322d\354n5\363\207\247\010\037\232\r\2474\317\224\035\317r(\326T\226\315\371o\222\254\277%m\034\233\242\304~_\311\024tg\340\320\347\356\301\224\322\3139\276\014*\031\2635-\321\323\014,\322\251yh\354\371\224x*<\334\243\r\221\317\031O*\346\010sJ\250\331\030\310;\252\360\207(3\275L<\234\232\236\035\037\2332n\205\000\200J\024X\343\230S\245.l\241\027\273\346\320\351q\226D\342ln\226W\344Fe`\216\023t\026\304\232\355\333b\002\362\352\241\212\372j\035\365""\335\353\367\240\\\312d\3401[\360\022\337\305\337O\021\257`\017\251\307lRX\031R\356\264\264\016>0\212\026\367ew]n:\255\342\001M%Mm\201Y\213(\340\336Q\236`\177S\266Y\252\221y\236\010\326\332&\372\313\316\003\t\207\224v%Gi\024\254\246\320\244\260\352\2350\300\343\tXP\361\320F\351\312\230(-\013\026\206t\272)\376\351K=\276m\303w'\246\346\306g\243\241\211\251\350\264\270AC\003)\230\222,x|\211\365\r\206\236E&\237\216\317\205\006\276\037\n\341\337`kx\257!\237\256,\254\212tho\233i\233\260\036=\302P\210\303\240\302\230\002?\310<\370\021\223\361\310\237\3239\t \002sI\3211\022\341*$mm\367\010\240\350\326\022@\022!\361\3604\007\354\345\227/c\036\000\024\263\363\313\010%3$\035\323\031\370\324:>\265#\356\320\3365#\037\240\220\263i\250 \273\026\366b\300\215\366\033\024\332\010(\372\277Y\256\016u\003)dX\t\326\"x\352\377\325\206\350\221\0027\305\253\304\245\231\255\301m\216\240\327\324Bh\304\312\347s0)\26436\275\004b_s\335\325f,\326$R@n\2271\02079?(Qu\256P/\270\351\272\261 \235\230Q\014wR\\\214Y\224\005\364eh\315k#\2372\205k\222eF\027&c\206\0234\325N)O'\313\327\305\030R\232r5^\2220\355\232=\020\330#\023J'%\312\304\330\260\350\274\300;\002l\244\236\017e}\3419D\210\205!\202m\223,\262\230R\001\267fc\262^\211.\000\000\215\216\245\277\020\333\004$\003\341\243\205z\3058\206\"\225_\013\001\320\210\016\347\335\022/\035\033<\031\034\357\256gr\367d\313\344N\016\206H[WQ\222I\217>\241\033\264\215?j\241\373\306)2\357!T\354\212\311\022\017\0107\261\033\r#\254\352\010@,K\360\030\035@\226\231\006\237i\352\025B\313,\361\342\220\346\276\200XJ\036\317\014\3702N\340\221]\216\255Xk\020\021\030\027\370\200\205z\022\001YQ\261\217\022>H\220\233\325\001*\036\252j\306S\352\221H:#$\371\2144\177!h1_d\234W6\202\320\273\367F\007\340@pT0b\213\231\325\037\253\257\004\013\257\233\275\311p\036\027\347x\213\207\353\202\036\366\221\310\rO\330\352\035\272\022\276q\236\261d\034\301q@\037W\330zI@\256\242p\303*'!\034e\371\007r\304\270R|_\252@\304E\016\002g\023b\022\001\270\023*T\321B\314\235\204\302cP\363\035\032\007\262""\312\020\267\312$E\271fq!-qp/\371\233\264#/\351\320\342\257\020!\006*\303$\207\001\225\r\366\336\261\037\222\200\231i\235\241\234\242\366\006,\322\231\027\346\305\r\240\346\342>\244l\233x\355\305k\227n2O`p\324\002.\037\370\254\216\006Nr`\235\211\324a\2003\221P\360\213[M\331 \032\274\304\035\246\\o$\234\245\263\034\202gLr\"\356\263\"jk\237%\261\0327\327\300;\005\035I\332dg\226\3102\035\254\034\203\267-\206@eD\231\232\350N\223\342\320\032\207\315\001\366a7\222\235d\344\370+\315\202\232?F\322w\014\275\370\013\366K\025\227\315a\240:\273#\357u\001m\222\351pIe:\314&/\270\332\177!\003\321v1\303\021\367A\342\217\037\257\240]\314&=\306/e\244\3222\357\354\027\371 \302<\232haA\212\312\231\034\327z|0\263\236\260\024\"~\005\035G\014\313+\232\241\227\372\204\321\210>/v\305\347)\207\363Ry\324\31501|\243\371x\274\346\343\320@\032\001]\327.\335\272:\270I3[\267\033\276>\351\021\223\3204\034\241\037Ots\226\274\026\254x\273\017\334\273\033\272\334\032\201\277\262\326\314\353t\214\\L\245\244\016yOS\335\021\343\001\247\270\344 \372\034\235\212\017\306\323\331B\302\360\035F\305\346\324\267\246\375\326Q\022\376\r'\330^-$\261\337\003\311\360b\230\243h\006Y1\340\346v\373A\271\206@v\n\362\357@*\317\306w\235#\302\374\200N\005\257m\306\004q\001\r8\271\016\256\320\340\316\236\344\251\246\200]9\204E\250\3669\001/\\\271\223\263U\376E\263?E\276E\302Gvq-\360S\017R\031\225\244\245\257\323\341a!\\\007\267\347\270\013\023\023\346\023\234 \233\007v\232^Ift\204\250\327\032\220m\327a69_H\245\205\301\351\235\3228\243\227\243\274B\355\006\360|'\305$m\221mMM\036\2506\235?uj&w\261\t\307>\1778\315J7\007\204\331\177""\006?~?\030\250\231D\241a#8\350R\363\315\221v\030,f3[\250\325\346-T\200,_\016\244\002\350!e\007wjc\265\321q\205v\223\265\016\302E\312\346\304\323\300\361\\\025\322\353\322s\357\335+\344\274\270\240\211\236\370P\333B\353\363M\274\203\201\035\222\n\327]*\202K6E\031V*\234\346\210\255,\335\343G\341T\344\273\376\340\006\017\223Dzj*\t\363\240r\351\266\252\267\354\036\203\360\026x\345\301\177%\242\350\021E<\216y\354\2131\261/\352\225%S\354k\031u\033L\242><7>;\021\231\204\227\255\245jrz42\031\223\006au\340Mw\362\001v\215\241\253\271\256\331\005\350\306\330\"\002\324\rP\030t;\n\033\366\205E\265\017\240\026f7 )\320\372\302=\245V\322A\250\210\205\360\212\320bW\235\273\273\030_\344\332\360r6C\337a\347\253\351\247/\020\014\215g\n\313\014m1\261\264\263W\367]j\345\375\310;\350\034\357I\273\226\344k7\034K\2567bK/\313\006\202FJ\214\212#1\342\002d|\232\345;\260\022\025\005\007\345`\310\230\201\020z\251\324\264\367\301\271\321\377\025\300x\323\341\rp\014_\030\276|\203)\230\312\352uC\274\274I\344J\334G\2046\334\014t\236\362\201\001_#=\350%\032\364:\017\232\006\211wG\364\316\240\335\210\231\254PII\0240\270\245\\\232\250V\252\314Z2?\250\263\220\214\315\313\277\370f3\206W\232\371?\331\323~\355C\216\245\022w\325\304\356\276\203\246\367\376\177\216\227\237\007Hr1#\021$\216\323K\"K\306&\324\033\224Sy\0033\205\331c\216\246\240e.\257\304\026\221\036\302zT\013\201\024Vk@\037w\332\026\362\013\027n\336\016\2514\002\343\nAD\304\033}\207\344?\243\233\377\007w\265D\036\304\236N\315=\031\037\215<|8;\3760\022\035\3474@\372\260\033m\016\355\013\370)\226oIh\272\377\":>\307\201\377\217%\342\315\237\004p\037\034\334\274)#\260{W\010\273\026c1O\301[\\\036\322|\231\210y\217\223\026\235)\254\304\304M\034#\370\244\027\255\002\273\255\030Ic\022i\037C\244ML'Y\2316\2321\004\222\020\323Jn*k\271\336\303\324\353\023\200S\320\024.[\257\274\2555\023m[/W\026\232j\0227c\312\330f\312d\241\342\316\217\231\013}M\265\242\3701\002\276\230J\035\332\254.|\207\325@\373\036=X\313\363\t\353\236iM4;\021\213/\0252\257lO\231\370""\225\264\000\317wr\306\200L\3366y\263\245\211y\313\262\275(\355\266\342\2502\217G\312\324P\305\"\r\201Ac\360\217\230\033C|[\303\250\203\243\325\265\"\350\270\353\001B\276]\311}\252\203\256\347\353\023\233S}6\255l\277uh\316\367Qx\3365'6e^sGS@r\323k\000\340\004IG\272n\221/\2411=\227H\t&\236\334T\013\021\320\337\312\235\356\342f\267\330x\033\265\273\214\246\271M\233\233U|\315\332_\300b\256\246\3229x\233\336U\245+iM\036D\2247\367\304\332\241\017\265\363\336\347\303\220\016E\334SPXi\t\2327\027\226\351\032\rb&d[\353\003\315\r\274\346\312\330\353\024\241{\273\226\320\236\354\346\302\246[p\232\253\231\337\265\255\225Hp\315\3676o\246\031\345\346\255\030e[[(R\241\317\257\245\302\364uk\260\347>Pjs\337\317g]\274\3649\367'}\3465H\237\272\315\3503\357\024\032m\362\215\232w\216%\3603\014\366Vl~\245\221\256Epk\323f\307D\004xL\320\3432\357\373\005{\315}3\361Yn\321\243\326\013|\346\364T\233D\2546\367\341\264\273&G\336\236\022+o\327\3020\3726\365p\007 \3733\037\233_\313'[>\304\002FKr\\KA\370\t\024\025\376#\003\360\231\264\326{\247\321T\223H\246-\322\207I\335e\325H@\267\265\031\310\232\205\354\244\244\207\3171\255\225\240\3716]<\032T\233\026\032\027\264\335\302nez\237\3311\240\235\272\270S5\025\013\325&\315\330\315\360\311f\332\342\325\276a\312\026\006\315\313\017\2507\033\270Y]L+\244\201\215\\:\312\330\301g\243\360\311Z\371D\017;\226Z\240\207|\254\260YK%Q\2646\000\010@\226\213o\002\2201\205\374l\213\t\252\346\253\002\002* \001\264\337\234\302\n\013=\000\020\006>\330E[\233\265\355\357\027&\002\000F\361\331\240rE.Z+\024O\r\252\n\332\337M\316\376\213O\365SG%>\312M\017\312v)aS\rLxL\027Zb\351U[\257QW\245\316lReh\320fmh\317\214\265\346\023\355|Dh\223\246\000(\317\236\347\222c\221hd.\032\371)6:9\375t\014\261wcOG\243\261\350\213'\343c\243\021RY\222\263\320\355f\263\363\251\214\004I\253\260\274\330\303\331\310\223G\261\311\310\324\303\247\221\207\343\376R\032&:=:=\251K\037\343\003\323SS\343\243\321\211\351\251\271\330\223\361\331\230\350\357\217\246\347\242\233\265\232\035\177<\035\035oi6;>""\363t|.:g\312&\246>\347\003\001\255\202>@\315\314\007\246\237O\215\315\215\307\236]\036\023\271\334\205\tU0\236I<\201\203\256\351\365\201H\365\252t\222\344\331\373Z\234U\373\230\\!-\014\314\326p\35116\004\232\327\240hH_\231lvd*2\371\":1:\267I\233\3665s/\346\242\343\217M\203\345\225\374\3328\242\002h\036j%\354-Rj?ge\351\324,\257\234\301\2010\272Q\223\245\251%\200F\003\377\370\333\225l\006\246\006\313\007\254\262?\017\306\243\2434\275\211\237\307a\262\030\217>\230\230\235\213\322\361=~29\036\035\037{\360t\212O\221W17=\025\273\034\273d\236\257\304.iH\214<\234\230z\310G\312\3078>;\207N\314\335\335\371\363\255<\346\266\344\346\371n^kV\023x\265O`\241\277\213\222~\370Y'\337\311\205\315\323S\303sZ\207\310\351\242\313\255EW\334\242\230.\033\025\307\366l\366\215\202D\251\3206\2326)p\270q\344\221\357\272E\377\333\023u+\311\2302Q\306\360\022@hP\034ee_\313m\370\250\272na\"!\346\337\250\tP\230\260\357g\263y;OS\204\007\306\013q:,qr\374ad\364\005\343\264 \366\364\324\270<\314<\235\236}\372x25\237|\355Nt2\033\177\205S\237x\374\364ql*\022\235x6\036\213\214\215\315\216\317\315y\001\001p1\367\364\311\223\351Y\002\251\307\323\317\306\307bS\323c\343\217e\036\217\2250\376\030F\272\270\335t\307\003\275\322aeR\361\250\266\024>\324\206\302\251\361\347<\016\375\210\306\010v\247\360\027F<\211&SYw\246vD\307\005Ne\261m\355^\r\320Le\347V\350\264\322\034\347\343\202\026\021\22765\342\344\301\275\033\023$!\320\276\265\344\345L\323\364\304Y\350\335\372'\343\264I\374#67\372h\374qDQ\2169W\322\367\213\3324\207T&JP\347\r\340P\311\277zLe+\341>S\331<\273l[\362\203\237\344R\331\034A\310\014n\335TH\363\230cEs\3767\263)\315\305\332\360\032S\276\314\230\216\030\214\245\347WZ\245\352/\353\336\324\232=v1\023\204\325T\253\3549\315\245\n\201\332\024\177j\202\"\232\265\026Bxi-\025\241\254\265\274\260\322T\266\222]\001\364$Mj\261fE\315I\301\352\365\231\304\3404\275>\315\230\275\240\203Y{K\377\215\245H\204\237\002=J.\360\321\217\277]\262\240\331\n (\340\020@B\000\255pe\374\324(I\230\013\336\374\343\304\024\244\224""\361'\021\"$\336\262\331\351\347s\336w\201\330\330\350#\022P|\235\t\035c\232\250x\313\237MO\320\200\321G4\020\375\232}\301?bS\343?EY8\230\005E\341\217\020\311T\tu^d\211\005PA\277-\277)\021RCnK1\221\301\326R\271\233\205\377\010D\256\271\316\344\201\340\352#m\215ln\004i\2375O\304\205\305[\252\2256\0277*wL\3766C\214\3778OL{\255\333t\023[e\"\031Oqh\271\001^W|U\326\336/\030\245\271\021\333\323e\005+D\353\232\253\351\033\266K\374\364\236\004\264R\316\263\346\032\036\271\271\320\334\243\325Z\221\017j\215\371\343\322\240\346\032(\211\354Dp\005\372\026\014\377\214>\355\233\250?\302\366\371cJ\207\240zc\3304\026\324\240Vm\372\233\277T\322\362i\024\202\020\021\207 \260\332$\251x\263|\343\200:\365w\221\232j\340A\312\265\355\347\217bh\252d\333\216\362\242(d\261\003\232\264\307\245\246\332X*ao\232\t\037\230 \335\234\250\017\207\215\2628~f\016\177S3\355{\224\\iE\264L\342\264\233A\035\213%W\231\374\230w\010q\304\226\375\205\206v\271%\354\343\363\226d\262\031\222H\263\276Bq\005\262:\277L\002\211\247F\376\302\034\355\274\247\214m\277\222I\204?\014g\273U\276v\2128\266\020/O\213\300A\344\223\336\035S\025m`\300S\353?~U\321r\256\252<\303\214\317\223\243\356\276(*\313\241\035n\351\033\032HE\335z\244F\037K\213I\326aL\273\301=/S\323\261\350\364\217\343\244\340\266)\236}2j\204a\325D\211y\336\027\267=)\210O&#\321\361v\365\317.\373k\334w5e\337$U\2314m\036\332W\371\354\362\334\364\350\2171b\276\343\221\307s\321H\364\351\234Y\275N;s\237\\\233\212\247(\225AD\000\023eo1.\304M-h\007\263[\221+d`A\005\224\306TV\252\351\365\031C\231&\312\211\335\274\"\267\036j-\322\277b\234_\346v4nj|D\376\004DL\242\310u\0230\264,\366\006\026e|\265m\205\2730\200\354&\325\232\007\376\323""\221\274\375L|\017\300N\273\241t\003\355\267n\t\362in\320.\030\250\271\235\022\324\232\262\235\003\223\237\233\013\335\013\211\332\327|\252'\253~\034\230\320\334fQ\376\232V@a\320\230^\300\215\247\211\370+\273\275n\265)f\261\327\010\220\313\014\"\270\264-\372\353ff\001JAlzm\rv\3604\020\325\261)\241\274\351\225\361\233\320\204\223\326t\235r\364zAH\025m\nE\304\240u@\304\\\300_\2347e\232\330\352w\366\240\3507\345\030Q\231\277\376=p\275\331\332\241\232LlV\347Qf\330,\332v\267?\247\263\374\261\335Q\023\200\253\370:\227\372\355sM\177\226w.\223j2,G#\367'\307\243\323O\246'\247\037\276P\\\021V{\261\351\265Z\366\242p\234\260A_>\312j\366\323\214a\007Q\302~\244I1\243\212\276\301\002\022\256\221\352\351\324\350\364\343\307\023\321\350\370\330\323'\236^^\r\370iF(6\312G%u\205'l{\354\001\306\362\204|0pG\375{,\233\304]\257\343\010\231Uf\204\347I\213\250V\036\277\236\341r\2661\223\301\373{%-\230\253\200l~\022\024\310\246\323\312\021\343y\014[\264\277\234'\037s\363\344U\030\242*7\247/\257<\254zV\003/\343\342t[\262C\005-\321\271\371\252L\265.6\207\230\273\014\200\264\370O\216\202\237\210\262\362o%\035\311s\306V\350\255\303d\224\320l^\263,\301\345%\342N7N&<42\350\311\375\254zW\037\367G\254z\203\331\210\323\025\2401e\311X\243o\331\341\353eAm\336\220b\236K.\020\301'\010]P`\014\021\021\002\242\000\210\361\3514yZ\\\212\267\220\"\262\302\302\223\373d\323tq\"M\336O\237\347\322\227\223e\314\272\302h\026p\371V<\311?T\300hNr\366\345R.\3167\027\310e@Q\010\032\343T\210\230I\210\340\3370\035)\366\325\234X\022\374nk\261\016j\240~V\031\370\372\242\362E+\305\373\243,H$h\323\277\311\354\342b2\027\344y\372d\270\371\347\324\267\250\302\376B\250\000\376\022\217J\334Z\241\233{%\363\340\344\244\246(\343Mr\2246\315M\n\264\222\242PW\342\332\266\234\253\314l\226\303\364\211\334\245O\344,\241Z\213\213 \325M\201\375~\333\2541\3016\307_l\376\n\237qpX?\027\252\221\215\215\310U\325D\335Uy\3356A \201V6/\024&\231!\3714)\317\374\323\316f.\307<\006W\177\325\225\326*\2223\026\013\204)\362\006TU\177\253\220\377njk{\265M>]4X1\325\245\372>>\365\256\024Ey\263\263\005B\350\305\\\266\2602\277\266\364\271\021+\301\301%\201\271\020\201\231\017m\362\034\226\254 e\301\0208\333\357\n\306_\371R\364\203\310>\375K\247\026\326\024\2020\231\305\017_\356\267\274\270\342\007\277kI@^\230\317\252\233n\325/ym\272\237\227\t]\212ji\025\346\317w\373\337$\273\202\375S\276b%\270\311\235\225\244\334\251\007!g\002z\312\345\312\177\021\326\315oR\213\265u\261>\r\365\016\272\255\354+^\017-\315\342\372\325\030\376\210\203\236\017\221\264xj%e{\274m\002\006T$\206Bs)\002J|6P\336\240\024L\001P\270Rv\000\335I)\365H\000L\336\304\360\231\362*\024\336\3333R,O3\213\260\231/\322/-\261\304\274\317r\253BL\204\230\004\252\004-\233*\250\234\017\r\367\334\251)\245\022I\332\347\274\254\251\245\2657\001\201\337%\366\327f\352/\277\n\3301#\373z\236\351\261\260\342O\310\001\335\260u\364\006~2\313\373\235\300\354w\233?\r\315\313h_\372A\377\306\231%^A \203\321\007\006$\372\r\313\210\372\005]\212\036\335;\345D\230T\"%Dx\355s\342?U\303G\006M\307\210\250b-\327\214H\275\001\010M\026\234\373\000K\260\311$5\017^%I\242\\\203^\\\365)\366%\245\346\036J\270y\314,\371\205\311\271<\n\276\250\347\354\033""\363\240Zz8\255\257\227\247\330;\202]\210\307\325W\230\031b\335\362\337\242?\256\201^\230*\305\020t\025\213\265\313Xo\223\251\336\024o\327\034\177\267,!\322\312\233/\350\256^\244\221.\362\363\340v<\031\345L*\315\003W\331\300\274\004\312V\021\n\314\"\243\217uo\302\307\333\376\345\013T\010\233\325o\336\337\030\305<\323\367\275\317\246\216\224?\200\326&\261\021mb\"\224\254\251~\021\342\001K\304\336j\020F\376\034\004\363WeP\216\251\337\372U\251\231>)e\023\221%\006T\202\306\245~3UA({L\033\347\375\357\000\032\375\211\226\nC\232c\313\271,4J\3345@/\366\342r!G\377\256\360\345\272\261\230\3733\021\343\333\"5\274\261\210\257\256wg\217\027\363\024\005\351\231\344\033\370\325|\036!\225^\027l\230C\345\002~(Y\027\217\232:e\247x\177Sr\231\t\t\360D\354\270O\236\021 m\005\307\344z\202p\341Ip\235\311\342W\010\276\004\203J\337\200W\271=\223\260:\212\371R_Z\224\315\255\020\024$=\016\327\204m\312\240\344\332\220\271ZKX\026!8\340]Xa\362\303\254\320\344#7%&\373,\300\336\027W\200\245'\033\023!\"\257\\\200\236?&\201\277-F$$\241\014\034`\303\036\r\302\363\310v\021y\2273\226g\305\001V^\211%\014\262\025\270\021`z\3630'W1q\237l~d\n\247\366V4\226\225\354\212N\007\000\202\232\353\344\2642\0333w\216\230\207\200KHt\221\002\265\240\210\021\355)wg\251\013\214\330\020\013(bv\337Z\216\341^\247\210N\350\337\032\225A\230\023\205\270\330\232\024\221vi5\347?\304\232\336\365+\220\325XS7O\r\241\332\025\276\202\210\244P\310\301\252k\323e\022-.\260f\307}\354\323\005\372\263T\361v-&?5\206\321N\256\260\233\204\2175\206K\301\204\034\013T\361Oy\214\247\275\334Z\236S\t\305\346\331\303\356\021\001\344Q\256,R\345blR\300Jb+\300\305g\274\020\276\315?\361\247E\370:\356\030\033sr\232^\020\017Hd\227s\326\233&\207\016\274\275l""\266q\263~]Z\344f\206\267\346\210\007\032A\202\312\374\r\001Q\001\267byh\260x\2718\321\230s\215\333^\006\362\351K@>\221\336\374\251\244v\177\006{\233|\366\246\273D\374\257M\225\256\375\010\330\335\346\026\222\340\333G>q\353\310\346\267\215\264\277e\304\\xa\036\232\315\372-Wb\230\002E\311Z\357!1%\372nR\245,7\351\314&Q\301\365i\013\333\363\334_\342\211p\333,\262-\306Y$\261\230\233L\222\363\222\301\002\216z\225p\316\374\024F\312\336\202\004\013\274.7\363\177\30135)\325\364\273\371\235\300\323[\224s\345D\035c\333\344I5Vd\005\212\237\010\304\325\332}\223\303O\277\332\032\246\330p\213\343\365<\312I\373^y\033\230\307hVcn`\023\301\302\375a\014:\362\226),\373\034Z\001/\2603\250'\006\207\246;\001T\001\256\232\346?\034\314?\274\365\0139\342\256\t\342\353\036k\227\327\362\345\321\332r\205L`H-\027\346\3613\2251\306\370\246W7r\220\005\\\324\0225\317\275\266\265\300\332\034\210n\376j9\257\3204\013\270\260\000d.P/\362\031\303\374\2261\361\301H\221X14\336\212o.\366\031u|\251\216R+6/\362^\200\323b\001\365\374\231%\337\037\\\262\223\351\230\354\031=\260\234D\017\340\n\036y\n\177$\003\377i\231\233\323j<\227\241\361#i2\336t\033\355\354L\267\363z\352;\371\223\266K\352]A\320\024\346\224v\341\376\375\236\315\256\\\323\215\211$oz\001RK\212\314\346w\264q%\214B\001\331e-\331a\336\300[_\\<\007\335\211\016\026\224/\346+U>\277\240\260z\254\307\336$\342\236\303\344\275\227\233lv\313\323'nwjw\253\323'ns\212\311\375.,;\005\\\365\342\341\230x\022\323\244\253\237\241\254\260B?\325y@\034\207\305\227%V\325M.\326\214\265H:\306|\347\006/\251\220&\271L\246\355}R\276\313f\354W\251\025^\267\235N&W\354LJ\366\212~C\246\027\007\001~\022!\267\241\252\211~\313O\240D,\366y\336\204\220\232\002\305\014T\033\277\232\367\211\032\036\311\0233\342\271z\237\023\332\332e\265\265^.\350\346\034\306\002\037\245\001\261YM'\214\246`T\t\003\344\246\312}b\301\310E\347X\333\032T\244\342b\273\361y\020\324K0il_Gz\365JL~\030Z.\271\301\020=\254e(\267\362\200l1\255\324R\221'N\000p\304\221\361\352\212!\2458\332\205e\372G\"\340\232] xW""N3\273]0\023\376\210\035\013|m2_\274\267:nz\303\243T\322\274\230\030sN\026)\rD\304b\270\261\224OK\\\321\362\223&@\017\3317|\240\356\017#\233i\361\306\373;g\002&\003\356o%\261\0062\023\3752D\317\025\270\335\373\3274m\330\254\304\313\242\270\324nr\020\231\327\300s\337\2646\237\315[i\275\252\274.\316\024\255\215\235G\234#C\225He\306}j\354\354v\272\373\312\335\033;{K\035\316\321\013\225\231J\242z\261\336\273\336\215n\371\342\325\342\352F\327\276\342\365Rw\251o\243\353hi\254\274\245\321\364\276\261\363pi\250l\225_W~qn\376\260\336\027\364~\261r\330\271\362\240nmt\035+\375V\031\250\236\256Z\215\316\203\305?\313\303\345\311\352\236\332\237\353\264\272\0034\303\316\236b\244\321y\250\324\215\231\337\241o\357]J\321Vl\251\036\256\335\251\277^\177\356Di\367\226\234\245\324F\327\371\n\255y\2502\346\\\"l\240\272_\235\027?7\010pw\224\256\010\21421\240\375q\302c\365H}\206_O\226\007\235\363\367\350\254W\371\225\341kr=\262.\265\014_\030MjO\225\257(`\246a\367\224\354\362i\336)T\205\312\337h\234\240\267\276\362\276\362XeK\205\326\275\2778W\352(EJ?\243\341\236\017\177\226\256\226\336\320 \247\tN\272\010\031K\003\345\276\006m\377$5\232\240\243\373\235\366\230\232\275\345-\332W\371\201@\240\243\376h\375\007\347\031\235\325\277y\221fS\370\350\010\034&J\277V\272+4\314\216\017\327\213\335\305>A\360|\311K\236\024\376^%\020\372\255N\033_\032\006\261;\214\317\227]zy\225Pv\347.5\220\263\2270\253\321\311x\323\317{\316\244\343\026\035\314\237f3g@=\370+\316\201\177\325\267\320R\234\235GK\017\211\370D6\360|\202V\013z5\323\360v\325\323z4\201\231\355.Y\245\327\345\347\225\010\177\233\001e\243\3630""\021\301\316\375E\352\267\355\343\245\257\266\035,2\224\376X,\320^F\001-\373\213\317\235\243\341\212Uy\355\\\003\371\243A\337\024\027K\204 \307K\026\250\r\303\033\001\215s`\200\217B\257O>\270\312\213\376\330\371\325\266]\037\036\025\307JL\314\242\245\203\002\212f,\320\246U\214\266*\330q\213\326v\215h\325X\365\333\352\\\355kB\244\345\365\313\353Q!8\305I\"\331\334\326\360\036\354P\026X\373\240\236 z\335ID\321\351 \356\362\361\370W\333v:;\216\226\036\021\240\354\251\276\255\345\353\337;\263s\033;\367\026\317\225\"\316\261;\265\3735\313Ly\217\263G\000\354?UZ\032\263\223\341j\217smz=O\210\321@\tP\313\323l\221HS\017\301\270\252\"8'X\3358s\275\032\257\365\324bD`\372\031]\372\313\371\312\255\352D\355\005\301\370\037\316\014\310\320\006\201\371U:\356m\265CDXG\326\177v\236\377D\030\274A\224%Z9\010V:Z\277\202\305\200\300\020}8Z\232\252\364\023\371!\202\271\261\377\200\357\275\321#\\MV\315\246\031\017T\316Wg\004\022\336\002\n\031\371\351\233\212\037v;\347\356\324\246\327\257\003\002\367\365\2006\214\020\265\267\324\236\023\307\272\\=_\373m\275\357c\327W\333\366|X H\337\346\364\201\014Dk\335\265s\3651\347Q\302I\020\255^\025\374\317\027\025\365\2158\373o\325\272\325Y\225\266\312\210@\363\216+\325\341\217Ge\337\261\376A \364\336\342 c\033\217\361Wi\256\274\2432\254`\231\260\210J\257\025\277\021:\262j@\374f\355\273\332j}\013\3570\355\3079\246\211;\001SZ\264\302z\273""\272i\346\373\016\323\207\3168'H\364\252=\254_[\337\272\036\247\365*b3A(\266D];\t\374\301\375\210\"\320\342\016\325\317\255Gd\027\037\224\372\234#a\342\212\203\265\021\220}\002\253\301\312\201\312ju\013S\230&\272BS\271\310u4\225\033\304\215n8'oTywn\027\323D-oU\"j\202{\235\275\247@\350\234\216\203\316A\332\225\215S$\343m\364\365\227s\225\236\312,D\230\215\356\275\037\017\177\265\255\017\274<\356\334\002\027s\242r\320\275\245\335\345x\345(\301l\226\346\324\271\353\303\214\263;\\IVo\325\"\316]j5\357\314\3077\356\222t\300\314\355\356=,e\3129LS#|pN]u\256\322hY'\273\362\261Wa\006\355m\345\273\312\237\265\033\316\375\247\316Sb\016\370\2204\256>\256wo\034\037\251\365m\034\030\254\034\251F>> \340?\354\034:\357\234\377\276\246\251\325al\32301\326\033 \373\335\305\036g?\326\263\023b\304\033\347\354u\202n\"\347\177QQ\347ng7\210\304\352\006\343\360\026\310\224\273?,\203l3\324\321H\037\367\n\204\274/\215\226\nD\342\266WO\222\004l\355\022\312\272\035\360\201M%R\320\263\037\302\000\221\302\303\2453 \317\032\023\000\037\217\352c\353\"\247@\322x\313\334\266\257r\265\262*p=F\237\"\232\364q\347W\007\016C\350\335\350\351-\355tN\337\"\2628SK\324\373 \034\332t\354WK\177:\347\357\327O\221\010x\324y\372\214\004\304\322\2443@\214\246!\202\247E\224\363\236s\353\361\372\014\357Uq\306\360\317=\214D4\2778\001\355\351R\2462U;\355\334\233\005u\227\3716H*\216\226{+\275\3160\t\"X?>8R\376\267se\264>\214Fg\313\302II{pN\022dU\037\325\306\352[>l\341\315`\206|\256r\212\016\242\207\317\243\262@\033g\021\365\334\037rN\020o\251\236\255m\247\205\000\316Y\\8\002\350\267*6\t\\\267I\356\303~\025\0379G\351@\253\257k?\3275{\333W\274\013\366\305B\034\2412\t\263\203\225a\032\265{\277j\275\321s\270t\3169}\335\271N\253\346N\"\326\335PrP7\220\211\326\275TzE\242\013\t\250\330\333\255\220<7\350x\366\023\212b\337\032=\373\211\353\356?\346\034\005\035\357\251\375B\247E\345\311\3120u\351$\361\007\322\271s\344B\345yu\224$\325>\210\3267IF9\235sr6""\216\341Q\371\021\251\n\317\010\273zC$$u\243\354\001\221Ijy\202\200\301|\263K\330\312\24328\243H(P\335D/\351-m+3\210\014+\245\017\207\267VR*\215\265\261c'\255\374\333\035\037\316\000\236\217;\307i\321t\366\232\356\375\247\024/\037\"xL8\227\307\352\243\220\016\211\026\200\277u\271b\006\037\023$\217}4\333\2503\034\251\357%\276\371;i'\346\213\"\255\365\036\332\350$\002r\276r\307\271\361\260\276\272\276\233\224\002\372>\032\214\260\224D\"\321[\026\243\376dE\257\201\326\203\220\370\234\016:\2256<\220\304b\221\303m\307\316\267\347\204\3201\350\320A\341\210\357\337\256X\037g\2670=)\336\2436\375D\240\236;w&\327'\234\247D\207^;\257\377\374\370\325W\357\267<\372\232~=\372z\032\277\246\277~\36251\232\362\341\312\215\352\005\347\373\347\020\027\210,<\006Q\320\277\234\235\247\313L5\277/\235\004\3037\214\201jHZ\203(v\257\302\322\345M\322\001\210\316@\322\357\003\307\311\0234j\370r\005\270N\2429\275\302\306f\204e\354\352.v\007\3260\036\221\002\324\020R\277\255A\312\355\256r\324\031\024Z\021\021Q~\025\344\357\264s|\030\206\202\2503\001\352\013\250\261\213\247\000\323$k2{8N\254\345\327:\301\r1\211\001\242i\2034\306D\375Wg\206\010\366\323\215;c`\247\320\346|\217\244N(\025\341;Q\020\230\305\021\263\24234\262\363\277\235\177\307\314\374\211\r\241\276\257\354\326\263J\353\253'\362\0301\325\227\252[\253\251\332\252\267\005\323\241\021\022XX\215\236p\216\301\246!\300\257\010\330\252\022\022\006\234\201[\316\255\031\346\250\330\234\237+oX\355\230Xg\242v\2174\264\010\317\232\210\346\356\275\305nC\342\272\033\372\t\004\215\337\\\223F\243\353\204s\342\222h\251\356\323\351\362\2303@<\247\276{=\343\374\312RZ\027\321\2513\3459\332\231\036\222\310\033\256\316\322C\304zk)\t\036\000bo\314)!\030F\372\312=\316\031\220\260|\355\373\365\213\254\352\355-\0160x\221\002\220\206u\201\316\322\031gx\324%\220\231\t\023x\263!\322\322p\004[\257\252\307k9b\220='\313\027\253\207\235\333S\353\326F\357\231\362o\325\001\242>]\204lC\304\362{ \375\221`\2651\371x\243\3478)\224g+\337V\346\252_\223\332M\334\350`\2572*""\200Z]\007v11j\364\036j|\306\222]\253O\017\t+gY\005!.p\272\264P\036'\362q\277b5D\032\"\372\324{\262|^\270\362\360\007\206\245[\245\373\264G\327*;\252\244\307\221\310\006Iy\037\224@\210>\343\314\202\026\313O\211:*\245\372/\022\343{`i9T:N\360\270\265\222!-\376Y\375\306\372 t\354\241\3130 \321\030\335{\261=\020\215-b\235\262\276?\300\216\036\201^\357\307\234o\023\025\354n\230\2159~\272\374@\354ODL\320\342`\361Mi\236\304i\013\262\313\003\240<\363\257\003\254Y\031Y\3259NL\0203?Nt\364\370`\245\307\271\360\275\363=+\374\335\227\235\3130\347\210\204\306\032\303t\351N\331\206~\241hG\2462J\320\272TS\332!K$\023Z\246[\335P\310\257\344\024~e5\204\373&\370\211\206\274M\222XO\345i\265\317\355M\024\3139\375}\315\256\237\256[\336Q~(&!\346\230oM\225\372\274d\016\014\310\363J\344\377C\344\357\310\307\313Pl\036\026\257a\n;\230\177,\226g\344\360\"\245g\220\244\000\275\247\213\326\337\221\215\253\327\364lwB0\332-\35231\317~\240\3201\347\036\357\010\361\274q`\\oi\273s\362Zu\266\372G\275w}?\000\3547Q\366!\332@T\240i\232\023\032!\r\235f\363\303\026\201\020\320Lb\305\364k\007\321\330\223$\245m\255X\202\334\337\023\351g\030\324*\333\356\017\0268\314i\360^\226\362h\034\022N\304\374 6f\303Er\360\205\231\206\021\264\357\322\006\023\331\033 \271rc\027\300t{\271O\254&\026\250\204\226\310\211\034\\\250\255\352n\264\355\336\266\262\313\007\216\302r\341a[]""\305]\304\255\225\355\3049\013%\224N7L\034]vq/\t\333\2772\2055Z\330iX\225qF\202r\225\023\265-\200?uthw\371\303\\\021\246\271\342\026b_\267F4F\227\2405*Y\247\017-\2675\030y\272\377V\326+\347\004\244o\372\362\306\355;\033!h\276[\277\332v\2744\243\317\014\224l'\014\262\260w\361\342\276\203,\321C\204w?\200]\353\355\177\021\261\337\301P\010\266N\233\0132\370; X(\273\r\342\017\212O\224\276\273\270\33790T\031\207v\360p}\304y\372\202\220\003\350\362\255sl\244v\306\371\236\336\351`\177w~\3178\231lc\347\221\322\265\362\356J\274\332S\375\t`\317\243l\220\3005V\351\204\026\013\222\204]i\020\337\354pNG\352\335\244\336y>\352\034\206%\250\365\253\314\250\202\276\372\316y\367'\215HBC\255\333|\335\031\276\017\225CF\333\000\361\274\006\001L\030?d\257\247BJn\027\343\316\241s\":\217\327\347\210\227\0202\367\320.\356\"\356~\272<\n\373\300\241R7zD\261\205L/\235='\313\247\312\263\244q\261\032\007\223\326#\3474\251\017\240\1774\3726v\272\334!\264\217\326\201\315\316\016\330\252\010\226\316:gI\314s\356\220>\374\254\261\023\312\207\367\3340u\226$\366\227\227\253\337\263\326\374\314yFt\210Ef\021fN\224\336\221\340p\257v\224]\001$\207\244!\345\013\357\350\202\251\253Ol\262\356\331c8\226`3\220\274\300\255\237BN$5\214X\327_0\005\362\t\261\246\266\321u\016\003\220\212\216\335r\307\330#\322\374<\303\211s\000\215Hk\332\372\325\256\223m\346\252\346\265\277\370[\371\214\323\317Z\345\021bk\226\031\263!MHN\350\254vT\177$Q\361\024\276\177\3524d\300w8\033\266\236\314@\0173\317bS\201\345\204$\241F\347!\347\320 S\323k\244_B1>\342DI\224\"5\203T\263\327\244\n\274\331\362\030\032\301\343\257\247\276\006^\375\205M\206e\350\006i\2227\253WI,\020\214\272K\242P\232\311=\301\313p\365Hm\322yD\243$\030n\356\326\236\326\373\204\340^\3710_\374\216\350\311\341\312\260G\255\376]\023~\273\330\347\354\373W\375k\002<]\374wDa\356\271\3129\347*tng\216\215\232s$\007\246\234\324\357\374\360\223\372\211\206\375\345w\314\037\224*R\312;\247\230H\022\261y\271\2055+`\354\336\2626H\021\274\375k\314\031\243\376p\3454\224\001\344\020m""\355]\330\223v\266\332/+\207I\355\266\330\235H\222+\026\363\2672\224\375Y\272B\252rO%Z=\300\232.\313\330\333!+L8\373\317\224\177b\266\257'\366g\205\345\016\256yF\274\326\260\341\316\257\266\365\210\256\271\215\275@^C;\263\260m\274\022\350t\260g\321\327a\013T\013\333W\2160\t=\013\205\2319\341\335\322\327$E\217\226\336\223\334\231\240\341v\364\226\276)]uN\334\021\256\252U\267\343'\235\223\337\213\375\216&\250\255/\"\025\264\031\233\332\235\0057\277\t\362\3741\324\266\335\356\017\tg\357\005\263\370\376\362*\323\032\331\263\\\261[yj\350\260?\036P\203\234\240\351>r\256N\254\037\307\271\322$\207\200aQ\346\203\340\200\215\316c\360\300T:\234\241;\254\365\201H\034'\271\371*\3148\265}\265\261\372\256\365\031X\025Y\223\223\001\024\371\006\3659M\022b7Q\255lm\216V\254\307'\014$\252(\276=\201\006\232:l\305\345-Z{\207\264\310\216-\013\326\022\365\240\316\337\331s\2412\013\202\266\013\276\345\016\366\211:\347\357\300\324#\202\350\317\316\t\230\"\277\253\346Y)\021\244\010\262\257\322.\021\276n\210=\364\307\362\352\246-\261\315\336\226\242:C\332xW>\203\022R\363\364\256*\347\026\374\222\354r\211\202\004\034\254j/\327\001\010\256\374\204\303\330\252\214#\316q\000FG=\242\025pv\260t\222(v\270\252\020\371n\371\233\362\2602!\261>\300\004\2251,W\022\223`C\300[\355\324\211\322\032a\322\201\212\315~\006\010Ml_9_\271[\333\002\224\351\205\224\304Z\177\243\223(&\344\022Zt\330\tA\237I\325\362uv;\354,\375\300\326{a\033\254\361+\030v\235\371\316\201\2070\350\034!\252\325g\274UE=\235^\266k\373\364'3\016\030\334n\001\334?\340\210S^K\226\364\234\035\307\330\224\001I\321\351%\342 \316\242Gl\342\033+\357v\302\254\3334\374\347\300\200\"\356\205\363\225k\004\266\342\266\311C\373\236\205\217\373@1\205\003lt\357/\376\304""\342\240.Q}\304|D\344W\350\354\316f\017\351\364\372\2522=)\366\244\\\263`\317^\373\210*\206\375\261K\314G\027+\253\033z\024\202\016\025\243!6*\343\201a\260\330\351\201S\217\205\3059\314ra\227\000\252\254\352\024\274\023\225g\325+\325t\275o\303\025\273u\017X\017\031lI\360)\367\224\331\210\013\035\315\265\220\362\251\211\265j+\233\210t\305c\345\022?U\276\316\316f_\371\021\340\301\006\366\t\300\375F\330\350\335\332\263\372-g\222\375\326\376\217\036*\035\004b\366U\257;\267\020\305\322\005OK\177\231-0$\351\260\017\014\301 =G\004\277\\o\233sXM\260\270\275\324\247L\t\r\343\262i\210\005\232\226\ro\014\035\223\332\376\375\210z!\025\346;6\017;\2757\252\2005\342\210>\0306\207*\004\322\030\002\216\"DF|\035^\336.~\266\r\257\027\363\007\321o\331\016\360\207\270\344O`'$\334@h\014[\001=\237ec,\tM\247\"\020\235\"_\337'\321\351@1\353\234!\272QS\256\374\\\351De\213j\272\321E\362\014\234\210\r\266\226\016\027#\037;\276\372\371\353\177\243\367\277\277^\305\257\325\257\377\302\257\277\276\376\317\327<\231\220P\250m^lV\210\240}r\254l\302|\205\355\201F\257\r\331yQb\005\"\266\210\363\034\301\024W\313\253D\007w\221\340\201-\021K\3550\334\350-\330\014'\367X\271\243\374\220\355\003\375\340#\273\004y\037\213\236\345\356?\030E\204\344~\0173\021\342\262M\234\363\207`\225\250\234\252<\257>\252E\\\315\317\353\214\245\001\303\027}\250*\350\211\356l\354`W\231R@\356\327\007\327\207\327\0378\263\204\256\034\230C\022}D|\376\005\032\030*\004Ad?\364I\030\303\216\250\240\233\036\270Kz\317\224\177&\230\333\r\217\325\206x\302\367+\345\021\273\324A\204\351*\316\376v\355J-!\001@jS\351\320\234\036bU\312}\371\210\227 @\363\226\r\304\315\200\306\376\030\237\273\374\021\230yC\031\234\200\250M\373\010\317Q\017\\\241\372\374a,\205\272\306`\375\242\224\"\026s\247\372\237z|\375 \374\021\356n7TtD\236=\356\264u\372\264\377\303\376\217z~\375\2463G2?\250\270\227\353\221\230\376\246d\004\024v\"\213\367m\255\362\035\355\322\267PM\3513=\312UQd\221$\254\274\\\312\264\366\010\241Lc\262\376\207\354\344v+y\021~\267\202\376<\017&""\332b\\\344t\026Hz$4\0053{W>Y~\304g\327S\375\271\346\2224BK\232\323Q='!A\332;\"\206\001#\252\347\3413\206S\013\354\323C+@\376\014\325&M\3269v\211\2773\243\364\332R\002\356\34375\266\253\221d\004\323\r\"\364\020\373\003H\023;\201M\352\355\014)v\303p\261\321,\312\347\210\376\315Vr\325\275(b\333K9]=[\353\254oiP\247\037\234\343\027+o\252V\365O\022kz\020WG4e\243\227$r\016\215\200\271\347\214\230\2668\366\013#|[zJ\347x\005b\254s\016\216\340\336\343\260A\342\233\325\373\325\371\332\327T\344\371\320\026\263I\010Qc5\020\036\034\315\304\t_X\253\352d!\347Y\345v\3252u$\315\260r\345\241\331\304%\225o\200]\233N\007\241\231\322AX\321u\316\252\030+\343\231\212\324\273\225\024\372O\374Z\350\335\265Id\310\212\263\262\346\254\375\021\330[\233\352\256\262\261\021x\035a8\335\323eb(o\326v\325gXl\201\243\275G,\276\304\202\303\225\305*\002Q\273\367;=\027\234\013\354s9\314\261\217\177\nE\240wPD\tr=k$[F\331H\375\020B\203w\351\3712\241\"\245\206E\341]\342\254;\3046\\\022\377\317;\217\331\364\242\315\315\307K\013\204\350=\210+f\311Q\314\030l\253b/\242\220\267_\352[\352\306\300\001\233q\017\313\017\264\242\177A\361\2533\3151\201FG\352c\353\333""\340^$\026\251\367\245\261w\037 \272\227\370\0068\314u\t-\213\324\017\256o]\267\326\005\276%t\017\216\351\033\242\031OAXd\373\25138R\013#\316\303\367\266'\204\010\343F@\3005\227\204\301\364'\021\2135\343\217\244v~\020\357CP\331\256\0171\347\350Pe\332\271\375#\314\242\022k\252C\255_\325\217\013mS\266)K=\353 \021\216\343vBB\365\263\365\237\326g\\_\344\021\347\316\2243%\276H\222\027\331#\r1\243\027\356\271\006\373\266\304q\214\336C\312\357\243\004\261\362Q\366\222M;\323l\246\305\341\037(.\224\2045):\323]+c\2406b\211<\331M\3048\002\273\324u\366;\263\247y\220\240\376@\231\255\027\303$\207_\227x\211U\327C\344\014\336\001@a\364\375E\206\351+\010_+\215\222$\006?(\263\022\002\221\321\232\354\333~\t\206$\324\375\235v\257\307\271@\240\r\202\335K\242\3277\345a\rl\033=l\"\357\026\332|\260\267Ad\364<\t\367\207\016\203\324u\t\243\243\317\3566\006\244\235@\331\223,\375%*\375`3\300[7\210\250\207\3266#V\014H4\273<.\375\347\212:\200s\375\\]uQY\tj\3368\017\245\224\377\201xCcChR\370z\212S\254^\201\375\375\014\203Y\203]q\317\211o\375""\\\371\2636\254\264\177\242\304\225\021\347\032\330\211\322\271\316\225#r\366\327\331\222\333#\202\345B\345G\322\262\273\276\332\337\013e\351\004\307nn\034=]\236fs\324\376c\245g$\215Z\3123\311\001\026\275\245N\221c\017\231(/H\251\231\312#\3024\335A\315\267\267\312\n\375n\361c\232\007e{(\2178\027`W\200[s\274>SO;\263s\234\355\021\346\010\302;\265\325z\347\372\036\3479<\244\376\221\221\2252\3340O\033\335GT\206\014Qh\322\211\032*\274\366\367\212\204\251\021\226\342\030h\272\023\316\031\270pz8J\020H\314K\370A\334\\ \373\373\241\251m\257\364\265\366\343\310:\356\007\030\373\334~\345\030\355\n\272U\366\320~\006\366\202\345\367\374\320\306y\210\373=\210![E\034\352\002\333\277\003G;\304\341\357=\345\237\235\213p!5MJ\302\003z%\222\334?\255\341\215\336S\345\253N?+\0260\325~S\271Ir\312\321c\033\303\267j\007Ii\241\352\233\330\330\375\033\275\027*\321jo\255\327\211H\362\313O\033G\216\"h\346*\333\025\217\236(\275f\305\355,K@\2643H\204\271&O\307\032\210z\247]>\032*wV:\235K\346l{\372Y\241%\361e\300\031P\313\315\227\276\3272\316\000\207$\360PWD\216\375f\335x\3227\2162\216\020$\022\003F4\2367\242\3059\315\247\243F=r\3167\"\207r\023\206e\010c\2369\267\241\n^\273'\201\230\207\004\226+\035\225\3070q\021{a\003\000\311?=\032\025\273\215+\177\240v\201\260I\277\365q\354\014\241.\002*\036r*\225\013\205\300\332?\330\177,\362\025`N\025\262\322\310\321\254\034\037\351\211Z;\354\234\007+\346T\200)v\323\010\262u\224\037p\314mB\331\n\203?x\203cSg\030= R-U\227\353\202\"\354\242\001\031<\350\034\270R\275\202\324\004\222\330`qI\207;YV&\276\3712)\307\210\323:U\232-)o\364\375\222\245c\213\312\367\252\335F\325\303\314\266\026\177\207P\312\312 \274]\275\025\211.\3700^\354)\276\220@\240]\316\256S\316)\022\016\002k""\304\342\032\\\005r\334\246\327M8\t\203\253`%~Q\265\202+Gp\254\250\332+Qd\343\305\375\304\347\363\242\242\261\007\221A\243S\242=\362%\327\033\320\305\n\323\0316I-H\230\3745\222\210\270+\207u\340+\roH\243\314\340!\261\351\007P8\264\002\274X\302\301\206\3726\272\367~\372\337\311S\237\325\354K\376qL-\014\227\017\225=\211x\252h.\007KZ\274b\203\016-\350\205\004?\2342a\240\332\027\r\003\350Q\0042G\253\207I\200\035s\376\305Am;\021kC\\h\004\204D\034\371\354m\222@\357\207\316m\032\204\324\351\204\223H6D!a\021\231C\361a\234\213\227\367\223\2540T\265\004\327\211\367*\n\231\256\237W9o'$\014|\250\366Jb\327\331\210\206f*\010\023\006\316?9\266\233\264\303\357\305\354\265\207\203\232\005I\251\031\024+R\001\032\352\265\241M9Jf\024\257\211\233\246g\274\362\342wQ\246\\\266\376\212%@I*,\200\205\240\020\355s\256\"1\363\232\363\2047ML}p\321n\201\257vF\004\271>\316\010<\213\270\225\253\325Q\322\003F\210\342#\217j\247\0262~\340\010\320\273\353\035\3532\366I\266r%H%\356p\256\"6\373\017\2022gV\254X\034\027\300\271\000\325o\253\277\325\373\327\273\327O\255\317\256\377\341\274 -\214\263\351\316_\344\344\021\022\300\350\2248T\306\223\305\226'\204\032\247\375#5\244\253\273x\202Y\3453\032-_\275Y\273R\213\327\367\325\037\256\263\315\343\001\242`nTOU\347H\200'\245J\321,\211\265\"\205\362)-\354.\363\207o\250{\241\372\240v\232y\n\033\226\366\027Sp\323m\255\306I\000}\200I\352s:CdMB\005\235\275\3479\\~\213\204D\016+3\273\007Z\371wX\031\200\305\217\005_\233\033\rM\035$\020I\237,\253\370^\357\327`E\271>\316\031\311I'\311\271Dn5I\037\316\367\034\354$\216""\327A\016.\351\251*\333\344=\232\374\21784\022\227\234\363\267\235\333\242\341\261\363\202\345C\222~\210\364\0359I\250\177\n\002-0\241k\237\230\276#\2366\333\233\332(ODC%\236\212\315\024\033A\273\266w\237\002\322\r\367\227\304\342\2527\216\036\321\310\331\254\344i\370\345\337\027\324\201\351\367\023\312\333v\332$\233\2566\217\327\360\372\0208lKR>'\331\031\310S\351,\373\003\203I\350\343\204/V\025;\230fq\2140\007\314\357\374\020\001@\240\317N\316!\021-\373\277,\234\204u\n\016\277!\2166\376\360\270t\270<\014\013\2768l\236\226\372\214F\330\355tc\233\214M\346\006\254\177U9\202\223\314C6$\224XQ\200\204\230%\351{$`I\370\333\234\360\260]$\032\036\340\264\212f\332\341\301'\301\035\022\225N3\t\0031\277\314\361J\312\"\335\\\246\235x3F\301\377\264\177\353\0163\023\343\315r\316\336\250\256j\253\000\306\372U,\255\"+L\310\320\222\366\267X\371\251:\243\016\257_R\372Dp\351'\261\222\330Fy\202T\343|\315@YEExGY\352t\245\264\037\212\226v&\261\027\350\343^v\024\312\025\r\0016l\322[\004u\272\033>s\2671\230\017k\346\014\203\270\210>Ya\340\273J3\372\233IIz\241\251q\234\260'\270\374q\211\303\240R\234y\231\324\225\226b\212\272\177\23241v\326\210\335y\220$\276\353 \342\222\261@+\377\243\336\255\367\321\233\340X\354\204|\313&\204\207U\221\262\207 )2\262B\372\331\2521Dt1\037\336\3629A_\307o\315`\364\273FD\276RCA\256\302\344\204\302E\035\247t\022\261F\272DV\364\230\323\341O\023W\037\347$\266\255\342\251\200T9\305\371\373|D\205\"\241\220\3306o\221n\300\211\273\346 \247\304\365\342\013 9\316\271\353=\325\247\265S\265Y6l(\253&\003;\334\234\007y\337\017\366\312\302\037\342\330\371Q\274\216b\244\372\007\243\223\004\345\033\275\263\375\350\310\022e\201s\n\336\271\376\372~\334\347\321W>&\246\315]\215N\261\322 ?\2075\235\273t\020l\205\333Ar\206\to\207\277\352&'\250r\204\352@e\220\245LK\342\270\221*A\032\262\022e\207!\025\376V\341+D8\232\343=\254\334\243l\351\241/\037\255H\"=\324\273\2234\017K\277\221$\242\274-\303\354kaZ\314\024\34413\t\0325\006`\202\305j'\324\253\251\262\n\374M\224\316\227\177R\366I""\271Y\205\031\227-\371,b\243\375\256\364\036\276\033\204\034\336V\344\207\203\250\356r\370\177SJ\223\334\251\340\006\324\013\345\371\3119\306q`b\336; \271 \276\0004\216\250\037\252L\260Ua\247\030\255\325\005\021\260\323\362W\256!\350\221\271~wO\361\026i\224\177VnU\307j\035\265\207\365\253\365\327\244\351\367\034+E\235>\210\354\017j\244\247\034&u\020)P]\373Tk\276v#*\224\253\241\215l\"\007\350\253\t\014\330\372b\321\277\2075P\354\367\222\201K$\374|m\306\350[\230\372\017\325D\355<\362\324~u~\205\242 \2364O\274\341\260\321\262\370\226\230}\332\221\215&K%K\203'm\375\257\034\220\241,\311[\\\310eG\200\267\225\211\276\227I\375.\206j\235\023\002:\213 \305%\022\264a\251\3278p\206\035\312}\022>u\000vZ\246\0250\243\375&\216\350N\271Va\202\235\321\367\352\335fG\242\342\20671b\273><\347\350\220^\244^:\341\207\352\212\217\215N}o\303\001\204\226\302b.q\346\245\356\206\246\267&d\317\345\214|\034\274/P\366\366|\260<\301l|\321H\230m\026HS\342dD\216D\202sI\235\232\366\214\354\346\335T\237\351l\372\0142\013\033\276\330Bb\033\254h\310\273\034\n\346\332C\270x\246\362G\355h}n}\273\033\342\304p\340t\203|^$u`j\375\364:\203\311\352\306^\344\331&\312\347*\217\020E\370\343\372\325u\305\221\267K\366\344@y\2602\302\020\316\036\035\025]+q\206\333D\246}\307&No\365\277\352;\344\272\240\024\346\315\010\014\026\214p\223\027\022dr\000\020\006\330\335\375a\021\324]\264\1779@I\275\237\221\230%\366,\367\210q\305r.\376K\342A\225\302\330\020\364\305\345\010\253\265\357\230j6\227\334Z\177\004\275p\027R}\230HwQ\327\207%\325\360'(\177\316\220\n\253\374\202I\235/\317Uv\222*\251\203\354\225\335\212\335\203\227\253}H\260\205~\3314\033g\224\335t2\031\241\373\207\331^\303J\351\255\372\224\312x\332\375a\001A`M\027\030\360E/R\3159\362\307\021\0242\002\377\333\306\355\007\365\005\270K\3466n\263\225\360'\347'\376R\347\221\322\367\020V\216\300]\323 \320\217\026\273U\264\305\014JIp \342~\265\372W\375\031\"rH\036\0212\240i\n\373M\017\220\344\3661\254\"\255J\347\23537\220`l\257\367\351\264\375\303\210A\235\256_\251[\177""\373\005\350\243\245i%b\273O\307Up\233Nyc\254\004Vw}X-~[\374\231\224S\276\225H\335\262\2058\026\250J\014\254\035\337\002\314:\261!o\3056\321\327@\206\263\"\200{T\024\010\355\211\260\302.\t\275\001f\362c1\242\232\351\0303\035p\246\\S\337\326\242\244}\217\255oAJ\302Se\223\246\231_\255\330\234\217\370\266\266\272\261\037\212d\224x\324\250\\.E\303\037o\375\222\004\004\351\307\275\346Q}PLZp\377o'2\035e~\"\246\323+\025\313Mj\372W\244\341\342\3576o\276\354.v\023\035%\026\361\206=>\244\233U\027H\315\207\362\357f\220z\014\341\275\207\304\255\021/\367p\026'\314\304\027 \366V-I|\037\244\363\351\325\361N\374\3603\307\006\025\330\316\337{\3349\256\"\222\032\275\220\362oW\346\253\235L%i\344}$N\260\372\212\233\315\020\227\376\261\2539\303\227\257\233\032\366\306\325\206\312\337B\223\200\004\312d\202\341fMt\025\237\\\177K\242\326\020pF:z\237\211\256\t\374\202\210\251?\200\324\202~\366#\316\253G\242\001\375A\275\"6\2668\302$k\253\341\013\306\345\340\210~R\216|\245r\241\326i\023\364Z\264\334\016\305ID\323\311\035[\303\206\312\353\216*~\220\304\256\016R\316vV#\302\313o\221\232\361\202\355Pw\352\253\022\3071\254\354\363\260\265\367B\026\033\252,;\267\221\t\316\267\037\360J-\017p Sq\213;\332\363\352}\316i\335\323\325\360\340\210\350&\356\313i\2767i\306\037\274\016\337\223\222i8\214\257\241\230\234\334\237\303\t\2473\006\347\330\036h*9\324S\262CP\271\371\307X\302\256\234\252\374\2736R\217\256\357_O\362e;\3600:?\261\363M\346-\371\344$\240\341\322\004u\245\331\260\2767\341\200d\345\261\027b\306\351`\273\221K\276\017*s\036q\271\335\265\005\276\036\201\020\324\023x\365\240\236Z\327\027\214\tsCn\312\267;>\234'\265\242\343\273\277\363H3\306\210\035\364M\202\320\243\245Y\230D\340^+[\365\221\365\231uKzl\375\373\351\207\276\017\303\037\017|\365\355\316\017|C\tg\344\201\376wt~\330\301\367G\340\260\235\216Agp\304\031!\261\016\027\355\351-i\212.\274O\212[\247{a\023\233\373\211\002\362\255h@\241c\010Q\342\374\002\201\001R3p\301L\237\362\271\351\334-\206&\264\337n\254\261\347+\367\020\026\321W>\341\\\212\340\352\310\365\004d\031\302\314\355\3124\024\001\253po\343\344pxqV\204\235'\2223u\010\t\241a\347&\202\334Zo\"\202tG\323\271H\262q7\251\3303\316\275ig\232Dh\276\241\303\325\221\026\253\277\324\267\222,\365\320\231\343\014\223\360\365\352\357\316\277\220,\000C\312\222s\200m\211\372\336\"e/'e\033\327\037u\361\367\206\234\241\261zD\353\006\310p\220k\277\004l. \306B.x\352\276\342\\\301\\\273\367*+\372>eng\333\033\272sxI\303WT\221\274\324c\234\332\255\363?XA\342\300\201\206\257\250<\243b\303\241R\377X\325f\222\347\354}\010t\212n\325N\321\206\347\026\002m^\245\225M\254\357s&\331\226\254\263\365|+\202\301\265\233\266\002\032so\361}y\224%_u+\025\340n\260:\354\\\375q\375\036\364\255\253S\316\024GN\\\205\271\\t\265\177\223\374\223&\211\366.\355\013I\262}$\203\344y\227\212\335\265-\n\246\215\221u\307N\247\203\216\203m\036\036\362\341\004\223\nx\324\203C\201\t\352\351\254\211\022\022\255\311\005\007\363\312M;\310K\351d\333\024[+\302\354\265\376\266\363\357\302\207\321\017\253LjN\260\t\262\203\025d\367\026X6o\251\314""\207\346[`\271n\233W\324\000X'ja\347\221\304\372#I\300O\036\210\026\211\356\347\022\010\247\003V\025\317\335v\222n\316W3\236\226[\n9x\212(\201Oj\322\021U\255\027\311\036>\216\340\360\274\222K\t\272 \020tI4\013\3137\035\022\336)\326Q\350\361\010\335\223\224\006\261\002\343\246+\330\275\021\255\203\244\215HC\3372\312\0319\327\371^\240\036\222x\370\346 \271e\025A\251MU\020\204\366r\324\300y\004\203HT\304N\016\360\357EF\210\276\230\201\304\335\313$1\366\000\017^\324\254\232-\256\324\331\215\243\270;\326r\2431\314\035$\345>\334G\260\r\371B\022)q\032\356\301HC\207\260\366\252\253\016X@\216\250\037\022\031J;\360\270L\250\010\005}Y.\251d\212\203\333 \016*#\364y^3\363\000\"\340\215\216\355\037\316r\266\021\021p7e\353ju\202hQG\277\316\013\362^<\"VRc\375T\226[GR\177\244\301wJ\321\322\236\016\210\355?UfD\204~#\206\266]\332\321\001\263\226J\276\344K6`\207\036vC\274.\310\355\257X\324\220N`NC\311\2036\3743\336\231\nI\376\367\215\312y\276\301\010\304\010d\031q\343.\203\303\005\271\363\222\342 \030t\006\006{:\250\323\325dM\371\020Os\200\260L>\357\234\237XW\362\371[\347 \307I\353\253\t\005\010{\344r\267\307\225\275\264\224\375\0076\366\017\253{\n\344\376\227k\270<\316s\271![.\234\2238\273\235\270\244\"\341\\\376q}\030T=\352.xP'\344\360\236A\233\212\030\251[\001Kc\004\316\333\223\365\207\316\217\2779\277\201Z\231\214\215\207\3657\353\026\356\315d\013\3764|\362Je\345\024\023B{\016\257\027\323\227{1\364\267\333>\364\026\273\033\002\004\230\311\267\270^\354\026m\205\024\211 Go\010_\261\261y\177\343\2229\220=\240?n\254\270H\324\373\344\000\351\r\260\030\356\200fa\202\304C\220\355\366(S\366\007\276\265\341\215\334-\253<\215\026k\006\021\023j\014\200\355\376\260\305w\347\006\334s\357\201\256\007\001\270\274$\321\034E\242\301\235b\035\370`oi\037\351\215$\316\177\000\023\223~ \177\320L%\242\344:\037$U\274\007\261PQ&\r\223\345d\304\035\313\027[\013@\273\002\324']\334\r\256\025\223\006;*[bj9^T\247F\351\213Yy\352\177\277\305\2724mvB`G\212\004/\376?}\242\324\254"; PyObject *data = __Pyx_DecompressString(cstring, 25782, 1); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif #else /* compression: none (69712 bytes) */ const char* const bytes = ".127.0.0.16.0.06.8.0\n A collection of connection pools for each host in the cluster.\n Instances of this class should not be created directly, only\n using :meth:`.Cluster.connect()`.\n\n Queries and statements can be executed through ``Session`` instances\n using the :meth:`~.Session.execute()` and :meth:`~.Session.execute_async()`\n methods.\n\n Example usage::\n\n >>> session = cluster.connect()\n >>> session.set_keyspace(\"mykeyspace\")\n >>> session.execute(\"SELECT * FROM mycf\")\n\n \n A convenient combination of :meth:`.add_callback()` and\n :meth:`.add_errback()`.\n\n Example usage::\n\n >>> session = cluster.connect()\n >>> query = \"SELECT * FROM mycf\"\n >>> future = session.execute_async(query)\n\n >>> def log_results(results, level='debug'):\n ... for row in results:\n ... log.log(level, \"Result: %s\", row)\n\n >>> def log_error(exc, query):\n ... log.error(\"Query '%s' failed: %s\", query, exc)\n\n >>> future.add_callbacks(\n ... callback=log_results, callback_kwargs={'level': 'info'},\n ... errback=log_error, errback_args=(query,))\n\n Added pool for host %s to sessionAll connections for host %s are at capacity, moving to the next hostAll futures have completed for added host %s\n An asynchronous response delivery mechanism that is returned from calls\n to :meth:`.Session.execute_async()`.\n\n There are two ways for results to be delivered:\n - Synchronously, by calling :meth:`.result()`\n - Asynchronously, by attaching callback and errback functions via\n :meth:`.add_callback()`, :meth:`.add_errback()`, and\n :meth:`.add_callbacks()`.\n \n An attempt was made to use a user-defined type that does not exist.\n\n .. versionadded:: 2.1.0\n An internally scheduled tasked failed with an unhandled ex""ception:\n An iterator over the rows from a query result. Also supplies basic equality\n and indexing methods for backward-compatability. These methods materialize\n the entire result set (loading all pages), and should only be used if the\n total result size is understood. Warnings are emitted when paged results\n are materialized in this fashion.\n\n You can treat this as a normal iterator over rows::\n\n >>> from cassandra.query import SimpleStatement\n >>> statement = SimpleStatement(\"SELECT * FROM users\", fetch_size=10)\n >>> for user_row in session.execute(statement):\n ... process_user(user_row)\n\n Whenever there are no more rows in the current page, the next page will\n be fetched transparently. However, note that it *is* possible for\n an :class:`Exception` to be raised while fetching the next page, just\n like you might see on a normal call to ``session.execute()``.\n Another thread is already handling up status of node %s\n Attaches a callback function to be called when the final results arrive.\n\n By default, `fn` will be called with the results as the first and only\n argument. If `*args` or `**kwargs` are supplied, they will be passed\n through as additional positional or keyword arguments to `fn`.\n\n If an error is hit while executing the operation, a callback attached\n here will not be called. Use :meth:`.add_errback()` or :meth:`add_callbacks()`\n if you wish to handle that case.\n\n If the final result has already been seen when this method is called,\n the callback will be called immediately (before this method returns).\n\n Note: in the case that the result is not available when the callback is added,\n the callback is executed by IO event thread. This means that the callback\n should not block or attempt further synchronous requests, because no further\n IO will be processed until th""e callback returns.\n\n **Important**: if the callback you attach results in an exception being\n raised, **the exception will be ignored**, so please ensure your\n callback handles all error cases that you care about.\n\n Usage example::\n\n >>> session = cluster.connect(\"mykeyspace\")\n\n >>> def handle_results(rows, start_time, should_log=False):\n ... if should_log:\n ... log.info(\"Total time: %f\", time.time() - start_time)\n ... ...\n\n >>> future = session.execute_async(\"SELECT * FROM users\")\n >>> future.add_callback(handle_results, time.time(), should_log=True)\n\n Attempted to cancel paging with no active session. This is only for requests with ContinuousPagingOptions.Attempting to open new connection pools for host %sBatchStatement execution is only supported with protocol version 2 or higher (supported in Cassandra 2.0 and higher). Consider setting Cluster.protocol_version to 2 to support this operation.CALL DseClientTool.getAnalyticsGraphServer()Cannot add execution profiles when legacy parameters are set explicitly.Cannot determine LWT result with row factory Cannot downgrade protocol version below minimum supported version: Cannot execute graph queries using Cluster legacy parameters. Consider using Execution profiles: https://docs.datastax.com/en/developer/python-driver/latest/execution_profiles/#execution-profilesCannot set Cluster.default_retry_policy while using Configuration Profiles. Set this in a profile instead.Cannot set Cluster.load_balancing_policy while using Configuration Profiles. Set this in a profile instead.Cannot set Session.Cannot specify execution_profile while using legacy parameters.Cannot use %s when results have been iterated.Cassandra host %s removedClient request timeout. See Session.execute[_async](timeout)Cluster.__init__ called with contact_points specified, but load-balancing policies are no""t specified in some ExecutionProfiles. In the next major version, this will raise an error; please specify a load-balancing policy. (contact_points = {cp}, EPs without explicit LBPs = {eps})Cluster.__init__ called with contact_points specified, but no load_balancing_policy. In the next major version, this will raise an error; please specify a load-balancing policy. (contact_points = {cp}, lbp = {lbp})Cluster is already shut downCluster.set_core_connections_per_host() only has an effect when using protocol_version 1 or 2.Cluster.set_max_connections_per_host() only has an effect when using protocol_version 1 or 2.Cluster.set_max_requests_per_connection() only has an effect when using protocol_version 1 or 2.Cluster.set_meta_refresh_enabled is deprecated and will be removed in 4.0. Set Cluster.schema_metadata_enabled and Cluster.token_metadata_enabled instead.Cluster.set_min_requests_per_connection() only has an effect when using protocol_version 1 or 2.Clusters constructed with execution_profiles should not specify legacy parameters load_balancing_policy or default_retry_policy. Configure this in a profile instead.Connecting to cluster, contact points: %s; protocol version: %sConnection defunct by heartbeatConnection error when preparing statement on host %s: %sConnection for host %s is busy, moving to the next hostConnection pool could not be created, not marking node %s upConnection pools established for node %sContinuousPagingOptions.max_queue_size must be 2 or greaterControl connection createdControl connection failed to connect, shutting down Cluster:Could not resolve hostname \"{}\" with port {}Done preparing all known prepared statements against host %sDone preparing all queries for host %s, Done preparing queries for new host %rDowngrading core protocol version from %d to %d for %s. To avoid this, it is best practice to explicitly set Cluster(protocol_version) to the version supported by your cluster. https://docs.datastax.com/en/developer/python-driver/latest""/api/cassandra/cluster.html#cassandra.cluster.Cluster.protocol_versionError preparing query:Error preparing query for host %s:Error preparing query on all hosts:Error querying host %sError trying to prepare all statements on host %s: %rError trying to prepare all statements on host %sError trying to reconnect control connection: %rException refreshing schema in response to schema change:\n Execute the given query and return a :class:`~.ResponseFuture` object\n which callbacks may be attached to for asynchronous response\n delivery. You may also call :meth:`~.ResponseFuture.result()`\n on the :class:`.ResponseFuture` to synchronously block for results at\n any time.\n\n See :meth:`Session.execute` for parameter definitions.\n\n Example usage::\n\n >>> session = cluster.connect()\n >>> future = session.execute_async(\"SELECT * FROM mycf\")\n\n >>> def log_results(results):\n ... for row in results:\n ... log.info(\"Results: %s\", row)\n\n >>> def log_error(exc):\n >>> log.error(\"Operation failed: %s\", exc)\n\n >>> future.add_callbacks(log_results, log_error)\n\n Async execution with blocking wait for results::\n\n >>> future = session.execute_async(\"SELECT * FROM mycf\")\n >>> # do other stuff...\n\n >>> try:\n ... results = future.result()\n ... except Exception:\n ... log.exception(\"Operation failed:\")\n\n Execution profile for graph queries must derive from GraphExecutionProfile, and provide graph_optionsFailed querying analytics master (request might not be routed optimally). Make sure the session is connecting to a graph analytics datacenter.Failed setting keyspace for pool after keyspace changed during connect: %sFailed to create all new connection pools in the %ss timeout.Failed to create connection pool for new host %""s:Failed to prepare query for host %s: %rFailed to run task on executorFailed to set keyspace on all hosts: Failed to submit task to executorFound an invalid row for peer (%s). Ignoring host.Found multiple hosts with the same endpoint (%s). Excluding peer %sGot different query ID in server response (Got unexpected message: Got unexpected response type when preparing statement on host Got unexpected response when preparing statement on host %s: %rGot unexpected response when preparing statement on host Handling new host %r and notifying listenersHost has been marked down or removedHost %s error: %s.Host %s has been marked downHost %s may be up; will prepare queries and open connection poolHost %s was already marked upID mismatch while trying to reprepare (expected {expected}, got {got}). This prepared statement won't work anymore. This usually happens when you run a 'USE...' query after the statement was prepared.Ignoring schedule_unique for already-scheduled task: %rIgnoring scheduled task after shutdown: %r\n Internal\n Invalid execution_profile: Invalid peers query type: %sKeyspace Keyspace metadata was not refreshed. See log for details.LWT result should have exactly one row. This has %d.Legacy execution parameters will be removed in 4.0. Consider using execution profiles.New Cassandra host %r discoveredNo LWT were present in the BatchStatementNode list was not refreshed. See log for details.Node %s is reporting a schema disagreement: %sNot adding connection pool for new host %r because the load balancing policy has marked it as IGNOREDNot executing scheduled task due to Scheduler shutdownNot starting MonitorReporter thread for Insights; not supported by server version {v} on ControlConnection host {c}Now that host %s is up, cancelling the reconnection handlerOld host reconnector found for %s, cancellingPool is shutdown\n Prepares a query string, returning a :class:`~cassandra.query.PreparedStatement`\n instance which can be used as follows::""\n\n >>> session = cluster.connect(\"mykeyspace\")\n >>> query = \"INSERT INTO users (id, name, age) VALUES (?, ?, ?)\"\n >>> prepared = session.prepare(query)\n >>> session.execute(prepared, (user.id, user.name, user.age))\n\n Or you may bind values to the prepared statement ahead of time::\n\n >>> prepared = session.prepare(query)\n >>> bound_stmt = prepared.bind((user.id, user.name, user.age))\n >>> session.execute(bound_stmt)\n\n Of course, prepared statements may (and should) be reused::\n\n >>> prepared = session.prepare(query)\n >>> for user in users:\n ... bound = prepared.bind((user.id, user.name, user.age))\n ... session.execute(bound)\n\n Alternatively, if :attr:`~.Cluster.protocol_version` is 5 or higher\n (requires Cassandra 4.0+), the keyspace can be specified as a\n parameter. This will allow you to avoid specifying the keyspace in the\n query without specifying a keyspace in :meth:`~.Cluster.connect`. It\n even will let you prepare and use statements against a keyspace other\n than the one originally specified on connection:\n\n >>> analyticskeyspace_prepared = session.prepare(\n ... \"INSERT INTO user_activity id, last_activity VALUES (?, ?)\",\n ... keyspace=\"analyticskeyspace\") # note the different keyspace\n\n **Important**: PreparedStatements should be prepared only once.\n Preparing the same query more than once will likely affect performance.\n\n `custom_payload` is a key value map to be passed along with the prepare\n message. See :ref:`custom_payload`.\n Preparing all known prepared statements against host %sProfile {} already existsProtocolError returned from server while using explicitly set client protocol_version -ProtocolHandlerPython 3.7+ and Eventlet cause the `concurrent.fut""ures.ThreadPoolExecutor` to hang indefinitely. If you want to use the Eventlet reactor, you need to install the `futurist` package to allow the driver to use the GreenThreadPoolExecutor. See https://github.com/eventlet/eventlet/issues/508 for more details.\n Raised when an operation is attempted but all connections are\n busy, defunct, closed, or resulted in errors when used.\n \n Raised when :meth:`.ResponseFuture.start_fetching_next_page()` is called and\n there are no more pages. You can check :attr:`.ResponseFuture.has_more_pages`\n before calling to avoid this.\n\n .. versionadded:: 2.0.0\n Re-preparing unrecognized prepared statement against host %s: %sReconnecting during shutdownRefreshing schema in response to schema change. %sRemoved connection pool for %rRemoving host %sRequest timed out while waiting for schema agreement. See Session.execute[_async](timeout) and Cluster.max_schema_agreement_wait.ResponseFuture.add_callback (line 5094)ResponseFuture.add_callbacks (line 5161)>> from cassandra.cluster import Cluster\n >>> cluster = Cluster(['192.168.1.1', '192.168.1.2'])\n "">>> session = cluster.connect()\n >>> session.execute(\"CREATE KEYSPACE ...\")\n >>> ...\n >>> cluster.shutdown()\n\n ``Cluster`` and ``Session`` also provide context management functions\n which implicitly handle shutdown when leaving scope.\n The parameters must be a dictionary. Unnamed parameters are not allowed.Timed out trying to prepare all statements on host %s: %sTrace information was not available. The ResponseFuture is not done.Tried to add an ExecutionProfile with name {name}. {self} was explicitly configured with contact_points, but {ep} was not explicitly configured with a load_balancing_policy. In the next major version, trying to add an ExecutionProfile without an explicitly configured LBP to a cluster with explicitly configured contact_points will raise an exception; please specify a load-balancing policy in the ExecutionProfile.Tried to execute unknown prepared statement: id=%sUSE Unable to complete the operation against any hostsUnable to connect to any serversUnable to load a default connection classUnable to set column encryption policy for sessionUnexpected exception while handling result in ResponseFuture:Unexpected failure handling node %s being marked up:Unexpected failure while adding node %s, will not mark up:Unexpected failure while marking node %s up:User Aggregate metadata was not refreshed. See log for details.User Function metadata was not refreshed. See log for details.User Type metadata was not refreshed. See log for details.User Type serialization is only supported in native protocol version 3+ (%d in use). CQL encoding for simple statements will still work, but named tuples will be returned when reading type %s.%s.User type Using %s on paged results causes entire result set to be materialized.Using ssl_options without ssl_context is deprecated and will result in an error in the next major release. Please use ssl_context to prepare for that release.View metadata was not refreshed. See log for details.Wa""iting to acquire lock for handling up status of node %s>?\"):, : , : address_translator should not be a class, it should be an instance of that class[applied]auth_provider must be callable when protocol_version == 1auth_provider must implement the cassandra.auth.AuthProvider interface when protocol_version >= 2cassandra/cluster.pycontact_points, endpoint_factory, ssl_context, and ssl_options cannot be specified with a cloud configurationcontact_points should not be a string, it should be a sequence (e.g. list) of stringscontact_points should not contain None (it can resolve to localhost)[control connection] Aborting wait for schema match due to shutdown[control connection] Attempting to reconnect[control connection] Attempting to use preloaded results for schema agreement[control connection] Closing old connection %r, replacing with %r[control connection] Control connection host (%s) is considered down, starting reconnection[control connection] Control connection host (%s) is being removed. Reconnecting[control connection] Error connecting to %s:[control connection] Error refreshing schema[control connection] Error refreshing node list and token map[control connection] Established new connection %r, registering watchers and refreshing schema and topology[control connection] Finished fetching ring info[control connection] Found new host to connect to: %s[control connection] Opening new connection to %s[control connection] Rebuilding token map due to topology changes[control connection] Reconnection in progress during shutdown[control connection] Refreshing node list and token map using preloaded results[control connection] Refreshing node list without token map[control connection] Refreshing node list and token map[control connection] Removing host not found in peers metadata: %r[control connection] Schemas match[control connection] Schemas mismatched, trying again[control connection] Skipping schema refresh because schema metadata is disabled[control connection] T""imed out waiting for response during schema agreement check: %s[control connection] Waiting for schema agreement[control connection] error reconnectingconviction_policy_factory must be callable coordinator_host=custom_payload cannot be retrieved before ResponseFuture is finalizeddefault_retry_policy should not be a class, it should be an instance of that classdefault_serial_consistency_level must be either ConsistencyLevel.SERIAL or ConsistencyLevel.LOCAL_SERIAL.disable does not exist in keyspace does not exist or has not been discovered by the driver) does not match the keyspace the statement was prepared with (enableequality operatoreventlet.patcher exception=gcgevent.monkeyindex operatorinternal Enum for _peers_query{ip}:{port}isenabledkeyspace is required to refresh specific sub-entity {table, usertype, function, aggregate}load_balancing_policy should not be a class, it should be an instance of that classmax_requests must be 1-127 and greater than the min_requests for this host_distance (min_requests must be 0-126 and less than the max_requests for this host_distance (no host queried before timeout(no result yet)profile must be an instance of ExecutionProfilereconnection_policy should not be a class, it should be an instance of that class' request_id= result={ %s }serial_consistency_level must be either ConsistencyLevel.SERIAL or ConsistencyLevel.LOCAL_SERIAL.{table, usertype, function, aggregate} are mutually exclusive) than we had before (timestamp_generator must be callable using keyspace '%s'utf-8; valid profiles are: warnings cannot be retrieved before ResponseFuture is finalized while using Configuration Profiles. Set this in a profile instead.AF_UNSPECAGGREGATEAsyncoreConnectionAuthenticationFailedBYTESBatchMessageBatchStatementBoundStatementClusterCluster.__enter__Cluster.__exit__Cluster.__init__Cluster._cleanup_failed_on_up_handlingCluster._create_thread_pool_executorCluster._default_load_balancing_policyCluster._ensure_core_connectionsCluster._finaliz""e_addCluster._make_connection_factoryCluster._make_connection_kwargsCluster._new_sessionCluster._on_up_future_completedCluster._prepare_all_queriesCluster._prepare_all_queries..Cluster._send_chunksCluster._session_register_user_typesCluster._set_default_dbaas_consistencyCluster._start_reconnectorCluster._target_type_from_refresh_argsCluster._validate_refresh_schema..genexprCluster._validate_refresh_schemaCluster.add_execution_profileCluster.add_execution_profile..Cluster.add_hostCluster.add_preparedCluster.auth_providerCluster.connectCluster.connection_factoryCluster.default_retry_policyCluster.get_connection_holdersCluster.get_control_connection_hostCluster.get_core_connections_per_hostCluster.get_max_connections_per_hostCluster.get_max_requests_per_connectionCluster.get_min_requests_per_connectionCluster.listenersCluster.load_balancing_policyCluster.on_addCluster.on_add..future_completedCluster.on_downCluster.on_removeCluster.on_upCluster.protocol_downgradeCluster.refresh_keyspace_metadataCluster.refresh_materialized_view_metadataCluster.refresh_nodesCluster.refresh_schema_metadataCluster.refresh_table_metadataCluster.refresh_user_aggregate_metadataCluster.refresh_user_function_metadataCluster.refresh_user_type_metadataCluster.register_listenerCluster.register_user_typeCluster.remove_hostCluster.schema_metadata_enabledCluster.set_core_connections_per_hostCluster.set_max_connections_per_hostCluster.set_max_requests_per_connectionCluster.set_meta_refresh_enabledCluster.set_min_requests_per_connectionCluster.shutdownCluster.signal_connection_failureCluster.token_metadata_enabledCluster.unregister_listener_ConfigModeConnectionBusyConnectionExceptionConnectionHeartbeatConnectionShutdownConsistencyLevelContinuousPagingOptionsContinuousPagingOptions.PagingUnitContinuousPagingOptions.__init__ContinuousPagingOptions.page_unit_bytesContinuousPagingStateControlConnectionControlConnection.PeersQueryTypeControlConnection.__init__""ControlConnection._delay_for_event_typeControlConnection._get_and_set_reconnection_handlerControlConnection._get_peers_queryControlConnection._get_schema_mismatches..genexprControlConnection._get_schema_mismatchesControlConnection._handle_schema_changeControlConnection._handle_status_changeControlConnection._handle_topology_changeControlConnection._is_valid_peerControlConnection._reconnectControlConnection._reconnect_internalControlConnection._refresh_node_list_and_token_mapControlConnection._refresh_nodes_if_not_upControlConnection._refresh_schemaControlConnection._set_new_connectionControlConnection._signal_errorControlConnection._submitControlConnection._try_connectControlConnection._update_location_infoControlConnection.connectControlConnection.get_connectionsControlConnection.on_addControlConnection.on_downControlConnection.on_removeControlConnection.on_upControlConnection.reconnectControlConnection.refresh_node_list_and_token_mapControlConnection.refresh_schemaControlConnection.return_connectionControlConnection.shutdownControlConnection.wait_for_schema_agreement_ControlReconnectionHandler_ControlReconnectionHandler.__init___ControlReconnectionHandler.on_exception_ControlReconnectionHandler.on_reconnection_ControlReconnectionHandler.try_reconnectCoreDATASTAX_CLOUD_PRODUCT_TYPEDCAwareRoundRobinPolicyDEFAULT_GRAPH_LANGUAGEDEFAULT_GRAPH_PROTOCOLDEFAULT_MAX_CONNECTIONS_PER_LOCAL_HOSTDEFAULT_MAX_CONNECTIONS_PER_REMOTE_HOSTDEFAULT_MAX_REQUESTSDEFAULT_MIN_CONNECTIONS_PER_LOCAL_HOSTDEFAULT_MIN_CONNECTIONS_PER_REMOTE_HOSTDEFAULT_MIN_REQUESTSDOWNDSE_V2DefaultConnectionDefaultEndPointDefaultEndPointFactoryDefaultLoadBalancingPolicyDependencyExceptionDriverExceptionEXEC_PROFILE_DEFAULTEXEC_PROFILE_GRAPH_ANALYTICS_DEFAULTEXEC_PROFILE_GRAPH_DEFAULTEXEC_PROFILE_GRAPH_SYSTEM_DEFAULTEmptyEncoderEndPointErrorMessageEventEventletConnectionExecuteMessageExecutionProfileExecutionProfile.__init__ExponentialReconnectionPolicyFETCH_SIZE_UNSETFIRST_COMPLETEDFUNCTIONGRAPHSON_2_""0GRAPHSON_3_0_GRAPH_PAGING_MIN_DSE_VERSIONGeventConnectionGraphAnalyticsExecutionProfileGraphAnalyticsExecutionProfile.__init__GraphExecutionProfileGraphExecutionProfile.__init__GraphOptionsGraphProtocolGraphSON1SerializerGraphSON2SerializerGraphSON3Serializer_GraphSONContextRowFactoryGraphStatementGreenThreadPoolExecutorHostHostConnectionHostConnectionPoolHostDistance_HostReconnectionHandlerHostTargetingStatementIGNOREDIdentityTranslatorIsBootstrappingErrorMessageKEYSPACELEGACYLOCALLOCAL_ONELOCAL_QUORUMLibevConnectionLock_MINIMUM_NATIVE_ADDRESS_DSE_VERSIONMIN_SUPPORTEDMOVED_NODEMappingMetadataMetricsMonitorReporterMonotonicTimestampGeneratorNEW_NODE_NOT_SETNeverRetryPolicyNoConnectionsAvailableNoHostAvailableNoHostAvailable.__init__NoSpeculativeExecutionPlanNoSpeculativeExecutionPolicy_NodeInfoONEOperationTimedOutOverloadedErrorMessagePEERSPEERS_SCHEMAPROFILESPagingUnitPeersQueryTypePlainTextAuthProviderPrepareMessagePreparedQueryNotFoundPreparedStatementPriorityQueueProfileManagerProfileManager.__init__ProfileManager._profiles_without_explicit_lbps..genexprProfileManager._profiles_without_explicit_lbpsProfileManager.check_supportedProfileManager.defaultProfileManager.distanceProfileManager.distance..genexprProfileManager.on_addProfileManager.on_downProfileManager.on_removeProfileManager.on_upProfileManager.populateProtocolExceptionProtocolHandlerProtocolVersionProtocolVersionUnsupported__Pyx_PyDict_NextRefQueryExhaustedQueryMessageQueryTraceREMOTEREMOVED_NODERESULT_KIND_PREPAREDRESULT_KIND_ROWSRESULT_KIND_SCHEMA_CHANGERESULT_KIND_SET_KEYSPACERESULT_KIND_VOIDRETHROWRETRYRETRY_NEXT_HOSTRLockROWSReadTimeoutErrorMessage_ReconnectionHandlerResponseFutureResponseFuture.__init__ResponseFuture.__str__ResponseFuture._cancel_timerResponseFuture._execute_after_prepareResponseFuture._get_query_traceResponseFuture._handle_continuous_paging_first_responseResponseFuture._handle_retry_decision..exception_from_responseResponseFuture._handle_retry_decisionRe""sponseFuture._make_query_planResponseFuture._on_speculative_executeResponseFuture._on_timeoutResponseFuture._queryResponseFuture._reprepareResponseFuture._retryResponseFuture._retry_taskResponseFuture._set_final_exception..genexprResponseFuture._set_final_exceptionResponseFuture._set_final_result..genexprResponseFuture._set_final_resultResponseFuture._set_keyspace_completedResponseFuture._set_resultResponseFuture._start_timerResponseFuture._time_remainingResponseFuture.add_callbackResponseFuture.add_callbacksResponseFuture.add_errbackResponseFuture.clear_callbacksResponseFuture.custom_payloadResponseFuture.get_all_query_tracesResponseFuture.get_query_traceResponseFuture.get_query_trace_idsResponseFuture.has_more_pagesResponseFuture.resultResponseFuture.send_requestResponseFuture.start_fetching_next_pageResponseFuture.warningsResultMessageResultSetResultSet.__eq__ResultSet.__getitem__ResultSet.__init__ResultSet.__iter__ResultSet.__nonzero__ResultSet._enter_list_modeResultSet._fetch_allResultSet._set_current_rowsResultSet.allResultSet.cancel_continuous_pagingResultSet.current_rowsResultSet.fetch_next_pageResultSet.get_all_query_tracesResultSet.get_query_traceResultSet.has_more_pagesResultSet.nextResultSet.oneResultSet.paging_stateResultSet.was_appliedRetryPolicySCHEMA_CHANGE_SELECT_LOCAL_SELECT_LOCAL_NO_TOKENS_SELECT_LOCAL_NO_TOKENS_RPC_ADDRESS_SELECT_PEERS_SELECT_PEERS_NO_TOKENS_TEMPLATE_SELECT_PEERS_NO_TOKENS_V2_SELECT_PEERS_V2_SELECT_SCHEMA_LOCAL_SELECT_SCHEMA_PEERS_TEMPLATE_SELECT_SCHEMA_PEERS_V2SOCK_STREAMSTATUS_CHANGE_Scheduler_Scheduler.__init___Scheduler._insert_task_Scheduler._log_if_failed_Scheduler.run_Scheduler.schedule_Scheduler.schedule_unique_Scheduler.shutdownSchemaTargetTypeServerErrorSessionSession.__del__Session.__enter__Session.__exit__Session.__init__Session.__init__..genexprSession._check_graph_paging_availableSession._create_response_futureSession._maybe_get_execution_profileSession._maybe_set_graph_pagingSession._on_anal""ytics_master_resultSession._on_requestSession._resolve_execution_profile_optionsSession._set_keyspace_for_all_pools..pool_finished_setting_keyspaceSession._set_keyspace_for_all_poolsSession._target_analytics_masterSession._transform_paramsSession._validate_set_legacy_configSession.add_or_renew_poolSession.add_or_renew_pool..run_add_or_renew_pool..callbackSession.add_or_renew_pool..run_add_or_renew_poolSession.add_request_init_listenerSession.default_consistency_levelSession.default_serial_consistency_levelSession.default_timeoutSession.executeSession.execute_asyncSession.execute_concurrentSession.execute_concurrent_asyncSession.execute_concurrent_with_argsSession.execute_graphSession.execute_graph_asyncSession.execution_profile_clone_updateSession.get_execution_profileSession.get_pool_stateSession.get_pool_state..genexprSession.get_poolsSession.on_downSession.on_down..Session.on_removeSession.prepareSession.prepare_on_all_hostsSession.remove_poolSession.remove_request_init_listenerSession.row_factorySession.set_keyspaceSession.shutdownSession.submitSession.update_created_poolsSession.user_type_registeredSession.user_type_registered..encode..genexprSession.user_type_registered..encodeSimpleConvictionPolicySimpleGraphStatementSimpleStatementSniEndPointFactoryTABLETOPOLOGY_CHANGETYPEThreadThreadPoolExecutorTokenAwarePolicyTraceUnavailableTruncateErrorTwistedConnectionUNCOMMITTEDUPUnavailableErrorMessageUnresolvableContactPointsUnsupportedOperationUserTypeUserTypeDoesNotExistVersionWeakSetWeakValueDictionaryWriteTimeoutErrorMessage_acquireaddaddValueadd_callbackadd_callbacksadd_done_callbackadd_errbackadd_execution_profileadd_hostadd_or_renew_pooladd_or_return_hostadd_preparedadd_request_init_listeneraddraddressaddress_translator_addrinfo_or_noneaggregateagreedallall_hostsallow_beta_protocol_versionanyappendapplication_nameapplication_versionargsasyncio.coroutinesatexitattempted_hosts_attemp""tsattrattr_nameauth_exc_auth_providerauth_provider_auth_provider_callableauthenticatorbatch_typebinasciibindbind_metadatabind_paramsblock__bool__borrow_connectionbroadcast_addressbroadcast_portbroadcast_rpc_addressbroadcast_rpc_portccallbackcallback_argscallback_kwargs_callback_lockcallback_partial_callbackscancelcancel_continuous_paging_cancel_timercassandracassandra.authcassandra.clustercassandra.concurrentcassandra.connectioncassandra.cqltypescassandra.datastaxcassandra.datastax.graphcassandra.datastax.graph.querycassandra.datastax.insights.reportercassandra.datastax.insights.utilcassandra.encodercassandra.io.asyncorereactorcassandra.io.eventletreactorcassandra.io.geventreactorcassandra.io.libevreactorcassandra.io.twistedreactorcassandra.marshalcassandra.metadatacassandra.metricscassandra.policiescassandra.poolcassandra.protocolcassandra.querycassandra.timestampscassandra.utilcbcc_hostchainchange_type_check_graph_paging_availablecheck_hostnamecheck_supportedchunkscl__class_getitem___cleanup_failed_on_up_handlingclearclear_callbacks_clear_watcherclient_idclient_protocol_handlercline_in_tracebackcloneclosecloudcloud_configclscluster_clustercluster_nameclusters_clusters_for_shutdown_col_names_col_typescollectionscollections.abccolumn_encryption_policycolumn_metadatacolumn_namescolumn_typescompressionconcurrencyconcurrent.futures_config_modeconfigureconnconn_classconn_excconn_factoryconn_fnsconnectconnect_timeoutconnect_to_remote_hostsconnected_connectionconnectionconnection_classconnection_excconnection_factory_connection_reduce_fnconsistencyconsistency_level_consistency_level_explicitcontact_pointcontact_pointscontact_points_but_no_lbp_contact_points_explicitcontextcontinuous_paging_options_continuous_paging_options_continuous_paging_sessioncontinuous_paging_state_continuous_paging_statecontrol_conncontrol_conn_disposedcontrol_connectioncontrol_connection_timeoutconviction_policy_factorycoordinator_hostcopycore_connections_core_connections_per_hostcount_countcpcql_""encode_all_typescql_versioncreatecreate_from_snicreate_pyopenssl_context_create_response_future_create_thread_pool_executorcreate_timer_current_hostcurrent_keyspace_current_rowscurrent_rows_currently_handling_node_upcustom_payload_custom_payloadddaemondata_centerdatacenterdbaasdebugdecodedecode_messagedecoderdefault_default_consistency_leveldefault_consistency_leveldefault_fetch_sizedefault_lbp_factorydefault_lbp_profiles_default_load_balancing_policydefault_profiles_default_retry_policydefault_retry_policy_default_serial_consistency_leveldefault_serial_consistency_level_default_timeoutdefault_timeoutdefaultdictdefunct__del__delay_delay_for_event_typedelay_windowdelimiter_indexdict_factorydiscard_discard_cluster_shutdown_discount_down_eventsdistancedistances__doc__donedsclouddse_versiondse_workloaddse_workloadsdumpseelapsedenabledencodeencode_messageencoderendpointendpoint_factory_endpoint_map_for_insightsendpoints_resolved_ensure_core_connectionsensure_core_connections__enter___enter_list_modeepeps__eq__errbackerrback_argserrback_kwargs_errbackserrorerror_no_hostserrors_errorserrors_returnedevent_event_event_schedule_timesevent_typeeventleteventlet.patchereventsevict_udt_classexcexc_infoexceptionexception_from_responseexcluded_hostexcsexecute_execute_after_prepareexecute_asexecute_asyncexecute_concurrentexecute_concurrent_asyncexecute_concurrent_with_argsexecute_graphexecute_graph_asyncexecution_profileexecution_profile_clone_update_execution_profile_to_stringexecution_profilesexecutor_executorexecutor_threads__exit__expect_host_to_be_downexpectedexpiring_weakrefextendffactoryfail_on_error_fetch_allfetch_next_pagefetch_sizefield_namefield_namesfilter_final_exception_final_result_finalize_addfinished_futurefnforceforce_token_rebuildformatfound_hostsfrom_message__func__functionfunctoolsfuture_future_completedfuture_completedfuturesfutures_lockfutures_resultsfuturistgaierrorgenexprgetgetLoggerget_all_query_traces_get_and_set_reconnection_handlerget_and_set_reconnectio""n_handlerget_broadcast_addressget_broadcast_portget_broadcast_rpc_addressget_broadcast_rpc_portget_cloud_configget_connection_holdersget_connectionsget_control_connection_hostget_core_connections_per_hostget_execution_profileget_hostget_lower_supportedget_max_connections_per_hostget_max_requests_per_connectionget_min_requests_per_connectionget_options_map_get_peers_queryget_pool_stateget_pools_get_query_traceget_query_traceget_query_trace_ids_get_schema_mismatchesget_stategetaddrinfo__getitem__geventgevent.socketgotgraph_enginegraph_graphson2_row_factorygraph_graphson3_row_factorygraph_languagegraph_namegraph_object_row_factorygraph_optionsgraph_paging_graph_paging_availablegraph_parametersgraph_protocolgraph_sourcegroupbyh_handle_continuous_paging_first_response_handle_retry_decision_handle_schema_change_handle_status_change_handle_topology_changehas_continuous_paging_next_pageshas_more_pageshave_futurehexhexlifyholdershost_hosthost_distancehost_dse_versionhost_endpointhost_errorshost_idhost_idshost_release_versionhostsi_idle_heartbeatidle_heartbeat_intervalidle_heartbeat_timeoutimport_fnimport_resultinfo__init___initial_connect_futuresinitial_responseinitialize_reactor_insert_taskint64_packinterval_secipis_analytics_sourceis_batch_statementis_beta_protocol_erroris_closedis_control_connectionis_core_graph_is_coroutineis_currently_reconnectingis_defunctis_downis_eventlet_is_eventlet_monkey_patched_is_gevent_monkey_patchedis_host_additionis_idempotentis_monkey_patchedis_schema_agreedis_serialis_set_is_setupis_shutdown_is_shutdownis_up_is_valid_peeritems__iter__itertoolsjoinjsonkeykeyskeyspace_keyspacekeyspaceskindklassks_chunkks_metaks_metadataks_statementskwargskwargs_dictlast_errorlbp_list_modelisten_addresslisten_portlistener_listener_lock_listenerslisteners_load_balancerload_balancerload_balancing_policy_load_balancing_policy_load_balancing_policy_explicitlocal_addresslocal_querylocal_resultlocal_rowlocal_rowslocal_rpc_address_querylocal_rpc_address_resul""tlocal_successlocation_locklocklog_log_if_failedlogging__main___make_connection_factory_make_connection_kwargsmake_query_plan_make_query_planmappingmaster_futuremaster_query_futuremax_connections_max_connections_per_hostmax_pagesmax_pages_per_secondmax_queue_sizemax_requests_max_requests_per_connectionmax_schema_agreement_waitmax_trace_waitmax_waitmax_wait_permax_wait_secmax_wait_sec_permax_workers_maybe_get_execution_profile_maybe_set_graph_pagingmessagemessages__metaclass__metadatamethod_namemetrics_metricsmetrics_enabledmin_requests_min_requests_per_connection__module__modules_monitor_reportermonitor_reporting_enabledmonitor_reporting_interval__mro_entries__msgmurmur3nname__name__named_tuple_factorynamesnative_transport_addressnewnew_authenticatornew_continuous_paging_sessionnew_fnew_handlernew_keyspacenew_metadata_idnew_plannew_poolnew_schedule_new_sessionnew_versionnext__next__next_delaynext_executionnext_timeno_compactnodes__nonzero__not_donenownt_col_nameobjobj_weakrefobjectoldold_hostold_reconnectoron_add_on_analytics_master_resulton_connection_erroron_downon_exceptionon_ignoreon_messageon_other_erroron_read_timeouton_reconnectionon_remove_on_requeston_request_erroron_retry_on_speculative_execute_on_timeouton_unavailableon_up_on_up_future_completedon_write_timeoutoneopen_countoperatororphaned_request_idsorphaned_thresholdorphaned_threshold_reachedotherp_page_iterpage_unitpage_unit_bytespaging_state_paging_stateparametersparsed_rowspartialpartitionerpasswordpatcherpeerpeers_querypeers_query_typepeers_resultpeers_successpk_indexespolicypoolpool_finished_setting_keyspacepool_statepool_statespool_wait_timeout_poolspoppopulateportpreloaded_results__prepare__prepare_prepare_all_queriesprepare_messageprepare_on_all_hostsprepared_keyspaceprepared_statement_prepared_statement_lock_prepared_statementspreviousprevious_version_product_typeprofileprofile_manager_profile_managerprofile_nameprofiles_profiles_without_explicit_lbpspropertyprotect_nameprotocol_downgrade_proto""col_handlerprotocol_version_protocol_version_protocol_version_explicitproxy_proxy_execute_keyput_nowait__qualname__query_queryquery_clquery_futurequery_idquery_paramsquery_plan_query_retriesquery_stringquery_template_query_tracesqueue_queuerackraise_on_first_errorrandomraw_contact_pointsrerebuild_token_map_reconnectreconnect_reconnect_internal_reconnection_handlerreconnection_handler_reconnection_lockreconnection_policyreconnectorreducerefrefreshrefresh_keyspace_metadatarefresh_materialized_view_metadatarefresh_node_list_and_token_map_refresh_node_list_and_token_maprefresh_nodes_refresh_nodes_if_not_uprefresh_schema_refresh_schemarefresh_schema_and_set_resultrefresh_schema_metadatarefresh_table_metadatarefresh_user_aggregate_metadatarefresh_user_function_metadatarefresh_user_type_metadataregister_register_cluster_shutdownregister_listenerregister_timeoutregister_user_typeregister_watchersreleaserelease_versionremaining_callbacksremoveremove_hostremove_poolremove_request_init_listener__repr___repreparereprepare_on_up_req_idreq_idrequest_encoded_sizerequest_id_request_init_callbacksrequest_timeout_request_timeout_keyrequest_timer_requests_resolve_contact_points_to_string_map_resolve_execution_profile_optionsresponseresponse_futureresponsesresultresult_metaresult_metadataresult_metadata_idresultsresults_generator_retryretryretry_decisionretry_numretry_policy_retry_policy_retry_taskretry_typereturn_connectionreturn_whenreusereuse_connectionrfrfindrowrow_factory_row_factoryrpc_addressrunrun_add_or_renew_poolrun_atrun_in_executorrun_in_executor..new_frun_nowrvsscheduleschedule_unique_scheduled_tasksscheduler_schema_agreement_lockschema_agreement_waitschema_changeschema_change_eventschema_event_refresh_window_schema_event_refresh_window_schema_meta_enabledschema_meta_enabledschema_metadata_enabledschema_mismatchesschema_verschema_versionsel_localsel_peersselect_peers_queryselfself_weakrefsend_send_chunkssend_msgsend_requestserial_clserial_consistency_levelserialize""serialized_parametersserializersessionsession_id_session_register_user_typessessionssetset_core_connections_per_host_set_current_rows_set_default_dbaas_consistencyset_down_set_final_exception_set_final_resultset_keyspaceset_keyspace_blocking_set_keyspace_completedset_keyspace_event_set_keyspace_for_all_conns_set_keyspace_for_all_poolsset_location_infoset_max_connections_per_hostset_max_requests_per_connectionset_meta_refresh_enabledset_min_requests_per_connection__set_name___set_new_connection_set_resultset_source_analyticsset_upsetdefaultsettershared_resultsshould_rebuild_token_mapshutdown_shutdown_clusterssignalsignal_connection_failure_signal_errorskip_metasleepsni_hostsni_portsocketsockoptsspec_delayspec_exec_planspec_exec_policy_spec_execution_planspeculative_execution_planspeculative_execution_policyssl_contextssl_optionsstartstart_fetching_next_page_start_reconnectorstart_time_start_time_start_timerstartup_versionstatementstatement_keyspacestatementsstatements_and_parameters_statements_and_parametersstaticmethodstatus_changestatus_event_refresh_window_status_event_refresh_windowstop_stop_scheduler__str__stream_idstream_was_orphanedstrs_resolved_mapsubmit_submitsuccesssumsummarysupersupports_continuous_paging_statesystable_target_analytics_mastertarget_type_target_type_from_refresh_argstargeted_querytask__test__this_timethreadthreadingthrowtime_time_time_remainingtimeout_timeout_timertimestamptimestamp_generatorto_callto_exceptiontoken_map_token_meta_enabledtoken_meta_enabledtoken_metadata_enabledtokenstopology_changetopology_event_refresh_window_topology_event_refresh_windowtotal_timeouttpe_classtracetrace_idtracing_transform_params_try_asyncore_import_try_connect_try_eventlet_import_try_gevent_import_try_libev_importtry_reconnecttuple_factorytypetype_maptype_metaudt_nameunknownunregister_listenerupdateupdate_created_poolsupdate_custom_payload_update_location_infouse_client_timestampuser_typeuser_type_mapuser_type_registered_user_typesuser_typesusernameuserty""peuses_eventletuses_keyspace_flaguses_native_address_query_uses_peers_v2uses_twisteduuiduuid4vvalvalid_insights_version_validate_refresh_schema_validate_set_legacy_configvaluevaluesversionversion_infoversion_supports_insightsversionsviewwaitwait_for_all_poolswait_for_responsewait_for_responseswait_for_schema_agreementwait_futureswait_timewarn_warned_timeoutwarning_warningswarningswas_appliedwas_up_watch_callbackweakrefworkloadworkloadswrapsxsgremlin-groovy\2201\320\004\033\2301\330\010\013\2101\330\014\020\320\0200\260\001\3201E\300Q\200\001\330\004\007\320\007\"\240!\330\010\r\320\r1\260\021\330\010\020\320\020#\2401\340\010\020\220\005\220Q\200\001\330\004\005\330\010\r\320\r1\260\021\330\010\020\320\020#\2401\330\004\013\320\013\"\240!\330\010\020\220\006\220a\320\004;\2701\330)*\330\010\013\2101\330\014\017\210v\220Q\220a\330\014\033\320\033,\250A\250Q\330\014\033\320\033,\250A\250Q\340\014\021\320\021!\240\021\330\014\030\230\004\320\034-\250Q\250d\260/\300\030\310\021\330\014\017\210t\2204\220q\330\020\023\2206\230\021\230!\330\020\034\230D\240\001\340\020\023\2206\230\021\230!\330\020\034\230D\240\001\330\014\032\230,\240a\240v\250[\3208J\310!\330\014\032\230,\240a\240v\250[\3208J\310!\330\014\032\230/\250\032\3203F\300a\330\020\035\230]\250(\260$\260a\340\010\027\220|\2401\240L\260\017\270|\3101\340\010\026\220a\330\010\024\220A\340\010\031\230\021\330\010\013\210<\220q\330\014\027\220t\2301\230J\240a\330\014\031\230\034\240Q\240l\260/\300\034\310Q\330\014\030\230\n\240!\2401\330\014\033\2309\240A\240Q\330\014\020\220\t\230\031\320\"2\260!\340\014\032\230)\2404\240q\250\001\330\014\025\220Y\230d\240!\2401\340\014\023\2204\220y\240\t\250\031\260!\260:\270Q\330\014\017\210q\330\020\035\230Y\240d\250!\2501\330\020\027\220y\240\004\240A\240Q\330\020\024\320\024*\250!\2506\260\034\270Q\330\020\024\220K\230y\250\004\250A\250Q\330\020\024\320\024&\240i\250t\2601\260A\330\020\024\220O\2409\250D\260\001\260\021\330\020\024\320\024)\250\031\3202H\310\001\310\021\330""\020\024\320\024&\240i\320/B\300!\3001\340\020\024\320\024-\250Y\3206P\320PQ\320QR\330\020\024\320\024*\250)\3203J\310!\3101\330\020\023\2204\320\027.\250c\260\021\330\024\027\220t\2301\340\030\034\320\0345\260Z\270y\310\001\330\030\034\320\0342\260*\270I\300Q\360\n\000\0313\260,\270a\270v\300T\310\021\330?Q\320Qa\320ab\330\030!\320!<\270J\320FX\320XY\330\0345\260X\270T\300\033\310N\320Z[\330\030\033\2301\330\034\"\240,\250a\330 8\270\001\330 8\270\001\330\034 \320 9\270\031\320B\\\320\\]\320]`\320`a\320ab\330\034 \320 6\260i\320?V\320VW\320WZ\320Z[\320[\\\340\034 \320 9\270\032\3009\310A\330\034 \320 6\260j\300\t\310\021\340\020\024\320\024'\240y\260\004\260A\260Q\330\020\024\220O\2409\250D\260\001\260\021\330\020\024\320\024$\240I\250T\260\021\260!\330\020\024\320\024%\240Y\250d\260!\2601\340\020\023\220<\230t\2401\330\024\035\230Q\230h\240a\360\n\000\t$\320#7\260s\270$\270i\300y\320P]\320]`\320`a\330\010\014\210G\2201\330\014\017\210t\2204\220\177\240a\240q\330\020\023\2208\2301\330\024I\310\021\330\024\035\320\0357\260q\270\001\330\020\021\340\014\027\220t\2309\320$5\260W\270A\270Q\340\014\017\210y\230\003\2301\330\020\023\2208\2301\320\034c\320cm\320mp\320pt\320tu\320uv\330\020\021\340\014\027\220t\2301\230A\340\014\023\2204\220y\240\t\250\031\260!\2601\330\014\031\230\023\230D\240\001\240\021\330\014\023\2203\220d\230!\2301\330\014\017\210u\220C\220q\330\020\023\2206\230\021\320\032S\320ST\330\020\026\220d\230$\230i\240y\260\001\260\032\270<\300v\310W\320TZ\320Zh\320hi\330\020+\2501\340\020,\250D\3200F\300a\300v\310\\\320YZ\340\014\020\220\013\2303\230d\240!\2401\330\014\020\320\020%\240Y\320.D\300A\300Q\330\014\020\320\020\"\240)\320+>\270a\270q\330\014\020\320\020)\250\031\3202L\310A\310Q\330\014\020\320\020&\240i\320/F\300a\300q\330\014\020\320\020#\2403\240d\250!\2501\330\014\020\220\017\230s\240$\240a\240q\330\014\020\320\020 \240\003\2404\240q\250\001\330\014\020\320\020!\240\023\240D\250\001\250\021\340\014\025\220S\230\004\230A\230Z\240q\330\014\017""\210|\2304\230w\240d\250$\250a\330\020\031\230\021\230(\240!\340\010\014\210L\230\004\230I\240Y\250j\270\001\330\014\017\210x\220y\240\t\250\023\250J\260j\300\004\300H\310J\320V]\320]^\330\020+\2501\330\020\023\2206\230\021\320\032`\320`a\330\020\024\220I\230\\\250\021\250!\340\010\013\2106\220\021\220!\330\010\013\210<\220t\2301\330\014\017\210v\220Q\220a\330\014\020\220\t\230\031\320\"4\260A\260]\300!\2601\2301\200\001\330\004\032\230(\240!\2401\320\004\033\2301\330\010\013\2104\210q\330\014\r\340\010\013\2106\220\021\320\022B\300!\340\010\023\2204\320\027'\240y\260\001\260\021\330\010\013\2109\220C\220|\2401\330\014\020\320\020%\240Q\240a\330\014\017\210v\220Q\320\026@\300\001\340\010\014\320\014\034\230G\2401\240A\330\010\014\320\014\037\230w\240a\240v\250Q\340\010\013\2109\220C\220|\2401\330\014\017\210v\220Q\220a\330HI\330\014\020\220\016\230a\230v\240W\250A\330\014\r\340\010\027\220t\2301\330\010\032\230!\330\010\025\220Q\340\010\t\3600\000\t\027\220a\330\010\014\210K\220u\230A\230T\240\021\330\014\025\220W\320\034.\250a\250v\3205F\300a\330\014\017\210w\220g\230Q\330\020\036\230a\330\020\027\220t\2301\230A\330\020\026\320\026(\250\001\250\021\340\010\013\2104\210q\330\014\020\220\016\230a\230q\320\004\033\2301\360\010\000\t\r\210H\220D\230\001\330\014\025\220T\230\027\240\001\240\021\330\014\017\210w\220g\230Q\330\020\024\220K\230q\330\020\027\220q\330\014\017\210t\2209\230G\2405\250\004\250D\260\005\260S\270\002\270$\270m\3102\310T\320QR\330\020\024\220L\240\001\330\020\027\220q\330\010\013\2101\330\014\020\320\020%\240Q\240o\260Q\330\020F\300d\310!\330\010\017\210q\320\0041\260\021\360\036\000\t\014\320\013\034\230H\240D\250\017\260x\270t\300?\320RS\330\014\022\220*\230A\320\035<\270B\270a\340\010\013\2104\210q\330\014\017\320\017 \240\003\2404\240\177\260a\330\020\030\230\004\320\0341\260\024\3205O\310t\320ST\340\020\030\230\004\230A\340\014\017\320\017 \240\003\2404\240\177\260g\270T\300\024\300Q\330\020\030\230\004\230A\340\020\"\240$\240a\330%6\260c""\270\024\270_\310A\330'+\2501\340\020'\240t\2509\260I\270Y\300a\300z\320Q[\320[\\\330\020#\2404\240y\260\t\270\031\300!\300:\310Z\320WX\330\020\021\330\024%\240T\250\027\260\001\3201C\3003\300d\310!\340\020\023\2201\330\024\034\230N\250'\260\021\260,\270a\330\025\026\330\024\034\230N\250'\260\021\260,\270a\340\024\034\230D\240\001\340\010\017\210q\320\004\"\240!\330\010\013\2101\330\014\020\220\007\220q\340\010\014\210L\230\004\230A\330\014\024\220G\2301\230A\360\006\000\t\r\210K\220u\230A\230T\240\021\330\014\023\320\023(\250\001\320\004#\2401\360\n\000\t\020\210t\320\023#\320#8\270\001\270\021\320\0042\260!\360\016\000\t\014\2104\210t\320\023&\240o\260Q\260l\320BR\320R]\320]f\320fg\3306L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\320\004\035\320\0352\260!\360P\001\000\t\023\220.\240\001\240\026\240w\250i\260q\330\010\021\220\036\230q\240\006\240i\250v\260V\2708\3004\300q\330\010\t\330\014\022\220-\230q\330\014\027\220v\230W\240B\240d\250!\330\017\020\330\014\017\210z\230\021\230!\330\014\r\340\010\034\230L\250\016\260a\330\010\035\320\035.\250m\2701\330\014\024\220K\230x\320'7\260x\270}\310D\320PX\320Xc\320cj\320jk\330\014\020\320\020$\240H\320,>\270h\320F[\320[_\320_g\320gh\330\010\032\320\032,\250F\260!\340\010\014\210H\220M\240\021\240(\250+\260Q\340\010\013\2104\210x\220q\330\014\023\2206\230\021\330\014\r\330\020\024\320\024)\250\021\320*<\270O\3106\320QR\330\023\024\330\020\023\220:\230Q\230a\340\010\017\210q\320\004!\320!2\260+\270]\310!\360\020\000\t\017\210f\220D\230\t\320!4\260A\260T\270\021\270*\300D\320Hd\320dp\320pq\330\010\013\2104\210t\2201\330\014\017\210u\220A\320\0259\270\021\330\014\020\220\007\220q\230\006\230a\340\010\017\210v\220Q\320\0043\2601\360\034\000\t\014\2104\210z\230\021\230)\2401\330\014\022\220)\2301\230A\330\010\013\2104\210~\230S\240\013\2501\330\014\022\220*\230A\230Q\330\010\013\2105\220\003\2204\320\027'\240q\330\014\022\220*\230A\320\0358\270\007\270q\300\001\330\010\t\330\014\020\320\020*\250$\250a\330\014\023\2201\330""\010\013\2101\330\014\017\210x\220q\330\020\021\360\020\000\023\032\230\021\230%\320\037;\2701\270G\3005\310\006\310c\320QR\340\010\014\320\014\034\230I\240Q\240h\250a\330\010\017\320\017%\240Y\250a\250v\260T\270\031\300*\310A\340\010\014\210H\220F\230!\320\033.\250d\260)\270:\300Q\330\014\023\320\023)\250\026\250q\260\001\330\010\025\220Q\330\010\014\210K\220u\230A\230T\240\021\330\014\020\320\020/\250q\260\001\330\014\023\2207\230!\2307\320\"7\260q\330\010\013\210;\220l\240!\2409\250A\330\010\013\2101\330\014\022\320\022#\2401\240A\320\004\027\320\0273\2601\330#-\250Q\330!'\240r\250\024\250R\250t\2601\330\021\022\360\032\000\t!\320 6\260c\3209S\320ST\320Tg\320gh\330\010\030\230\016\240c\250\034\260Q\260o\300Q\330\010\r\210Q\320\016.\250e\2609\270A\320=T\320Tb\320bc\330=W\320Wh\320hi\330=>\340\010\014\210N\320\032/\250q\320\004#\320#4\3204S\320So\320op\360\030\000\t\020\210t\320\023'\240q\250\007\250|\2707\320BU\320U`\320`g\320gh\320\004#\320#4\260M\300\021\330\036:\270!\330\026)\250\033\260A\360F\001\000\t\032\320\031+\320+?\270q\330\010\013\2101\330\014\032\230!\320\0331\260\032\2707\300!\340\010\021\220\024\320\025-\250Q\330\014\023\220<\230w\320&6\260a\330\014\037\230~\250Q\330\010\016\320\016#\2404\240q\330\010\014\210L\230\001\230\021\330\010\016\210m\2301\330\010\017\210q\320\004\032\230!\360\022\000\t\014\2104\210}\230C\230u\240D\250\n\260\"\260A\330\014\020\220\n\230$\230h\240h\320.?\270}\310A\330\020\021\330\020\027\220q\230\004\230N\250*\260J\270b\300\001\340\014\r\340\010\013\2104\210}\230G\2401\330\014\r\330\020\024\220L\240\n\250$\250a\250t\2601\360\n\000\024\025\330\020\026\220a\330\020\032\230%\230q\330\020\024\320\024)\250\021\320*;\2701\270H\300D\310\001\330\020\021\340\014\023\2204\220x\230w\240d\250!\2504\250q\330\014\017\210u\220D\230\004\230D\240\001\360\014\000\026\032\230\034\240Q\330\024\030\230\014\320$9\270\024\270Q\270d\300!\330\024\027\220s\230!\2304\230|\320+B\300#\300T\310\034\320UV\330\030\034\230L\320(F\300a\340\020\024\320\024&""\240a\240t\250>\3209M\310Q\340\010\021\220\024\220Q\330\010\013\2104\210q\330\014\017\210t\2201\330\020\026\220c\230\021\230$\230n\250N\270$\320>R\320RS\330\020\032\230%\230q\340\020\035\230T\240\030\250\030\3201D\300A\330\020\027\220s\230!\230:\240^\3203C\3001\330\020\032\230&\240\001\340\010\014\320\014!\240\021\320\"3\2601\260H\270D\300\001\210\001\330\014\r\330\020\023\2204\320\027*\250#\250Q\330\024\037\230~\250Q\250f\260J\270a\360\006\000\025 \320\0371\260\021\260&\270\n\300!\330\014\023\320\023+\2501\330\020\033\320\033.\250a\250s\260!\260;\270i\300q\330\020\024\220H\320\0346\260a\260v\270Z\300q\330\020\027\220q\330\014\023\220=\240\001\330\020\023\2208\2301\230A\330\034\"\240)\2501\360\006\000\021\025\220H\320\0346\260a\330\024\032\230*\320$6\3206M\310Q\330\020\027\220q\340\014\027\220t\2307\240$\240a\240q\330\021\025\220Q\330\020\026\220h\230k\250\023\250D\260\001\330\024\030\230\006\230h\240a\330\024)\250\025\250a\330\024&\240a\340\024\025\360\010\000\025\035\320\0348\270\001\270\024\270[\310\001\330\024&\240e\2501\250D\260\010\270\001\330\024\027\220t\320\033-\250W\260C\260s\270!\330\030\033\2308\2401\320$r\320rs\330\030\034\230H\240H\250A\250V\2601\330\030 \240\t\250\021\330\030\034\230F\240(\250!\330\030\037\230q\330\024\030\230\006\230h\240a\330\020\024\220G\2301\230H\240A\340\014\017\210v\220Q\320\026;\2701\330\014\017\210q\330\020\030\230\t\240\021\340\014\023\2201\200\001\330\004\005\330\010\013\2104\210y\230\001\330\014\025\220Y\230a\330\013\014\360\006\000\005\013\210%\210q\320\004\036\320\0366\3206F\300a\360\034\000\t\014\2104\210\177\230c\240\031\250$\250d\3202D\300C\300q\330\014\022\320\022\"\240!\330\020\021\340\010\013\2104\210q\330\014\023\2204\320\027(\250\001\250\023\250A\250T\3201A\300\022\3003\300j\320PQ\200\001\330\004\005\330\010\013\2106\220\021\220!\330\030\031\330\010\027\320\027+\250<\3207G\300q\310\016\320VW\330\013\014\330\010\013\210:\220Q\220a\330\010\027\220x\230w\240a\240|\3203F\300a\340\010\027\320\027)\250\021\250!\320\0046""\260a\360\016\000\t\014\2104\210t\320\023&\240o\260Q\260l\320BR\320RZ\320Zc\320cm\320ms\320st\3306L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\320\004\035\320\0356\260j\300\001\330\0207\260q\330\020#\240;\250a\360R\001\000\t\020\210t\220>\240\021\240'\250\034\260W\320\250\021\330\010\013\2108\2203\220a\330\014\026\220d\230!\340\010\017\210t\2208\2307\240$\240a\240q\330\010\013\2104\210q\330\014\020\220\010\230\001\230\030\320!4\260A\260Q\330\014\023\2201\330\r\021\220\021\330\014\020\220\010\230\001\230\030\320!4\260A\260Q\330\014\023\2201\340\010\014\320\014\035\230Q\340\010\025\220Q\330\010\t\340\014\030\230\r\240T\320);\2701\270H\300A\330\014\020\220\017\230q\330\014\032\230$\320\0361\3201E\300T\320Ib\320bc\340\014\017\210s\220#\220Q\330\020\025\220W\230A\230T\240\036\250v\260\\\300\021\340\014\020\320\020(\250\n\260)\2701\270I\300\\\320QT\320TU\330\230\023\230A\330\014\023\2201\360\014\000\016\022\220\021\330\014\017\210t\2201\330\020\021\340\014\017\210t\2201\330\020\035\230T\240\021\340\014""\017\210q\330\020\023\2206\230\021\230!\340\020\037\320\0370\260\001\260\021\330\020\037\320\0370\260\001\260\021\330\020$\240D\320(?\270q\300\016\310n\320\\f\320fg\330\020\023\320\023%\240S\250\001\330\024\033\2301\340\014\017\210v\220Q\220a\330\014\024\220D\230\006\230e\2401\330\014\026\220a\330\014\021\320\021!\240\021\330\014 \240\001\330\014!\240\024\320%6\260a\260t\270?\310/\320YZ\340\014\022\220(\230\"\230A\330\020\036\230l\250!\2506\3201E\320EW\320WX\330\020\036\230l\250!\2506\260\024\3205L\320L^\320^_\330\020\021\330\024!\240\021\240$\240k\260\036\270r\300\021\330\024\"\240/\260\032\320;N\310a\330\030%\240]\260(\270!\330\020\027\320\027,\250A\330\024\027\220v\230Q\230a\330LM\330\024\036\230d\240&\250\005\250S\260\002\260!\330\024\025\330\027\030\330\024\027\220t\2301\330\030\033\2306\240\021\240!\330\030\037\230q\340\030\031\340\020$\240D\320(?\270q\300\016\310n\320\\f\320fg\330\020\023\320\023%\240S\250\001\330\024\033\2301\340\020\023\2206\230\021\230!\330\020\024\220F\230&\240\001\240\021\330\020\032\230$\230f\240E\250\023\250B\250a\340\014\017\210x\220q\230\001\330\030\"\240+\250Q\330\014\023\2201\210\001\330\014\023\2209\230B\230e\2405\250\013\2601\320\0049\270\021\360\n\000\t\023\220!\330\010\014\210H\220E\230\021\230$\230g\240U\250!\330\014\017\210u\220C\220~\240T\250\024\250Q\330\020\031\230\036\240q\250\006\250n\270A\270V\3007\310)\320ST\330,2\260$\260a\360\n\000\021\022\330\024!\240\026\240w\250a\250q\330\027\030\330\024\027\220z\240\021\320\"H\310\001\330\024\025\340\020\023\220;\230c\240\021\340\024\027\220v\230Q\230a\330\036$\240F\250(\260$\260a\260q\330\024\025\340\020\027\220w\230b\240\006\240a\340\010\014\210F\220*\230A\330\014\r\330\020\026\220g\230Q\330\023\024\330\020\023\220:\230Q\320\036D\300A\320\0049\270\036\300q\330\036)\250\024\320-?\320?S\320ST\330\0212\3202P\320PQ\330\010\014\210K\220q\340\010\014\210O\230<\240s\250'\260\021\330\010\014\320\014\036\230n\250C\250w\260h\270a\330\010\014\210K\220q\330\010\014\210I\220Q\330\010\014""\210K\220q\330\010\014\320\014\035\230Q\330\010\014\210L\230\001\330\010\014\320\014\"\240!\330\010\014\320\014\036\230d\240!\330\010\014\210O\230;\240c\250\024\250U\260!\330\010\014\210I\220Q\330\010\014\320\014$\320$?\270s\300$\300a\330\010\014\320\014\035\230Q\330\010\014\210J\220e\2301\330\010\014\210K\220q\330\010\014\210N\230!\330\010\014\210M\230\021\330\010\014\320\014\037\230q\330\010\014\210M\230\021\330\010\014\320\014(\250\001\210A\200A\3602\000\t\r\210G\2205\230\001\330\010\013\2104\210\177\230g\240Q\330\014\023\2209\230A\230V\2404\240q\340\014\022\220$\220a\200A\33045\330\010\014\210L\230\001\330\014\027\220q\230\016\240a\240v\250Q\250a\330'0\260\001\260\035\320>P\320PQ\330\030\034\230E\240\021\340\014\030\230\n\320\"5\260R\260z\300\030\310\025\310n\320\\]\330\014\020\220\t\230\034\240Q\330\020\023\2204\220q\330\024\027\220v\230Q\230a\330:@\300\001\200A\360J\001\000\t\023\220!\330\r\021\220\021\360\010\000\r\021\220\013\2307\240\"\240D\250\006\250a\330\014\017\210t\220?\240'\250\021\330\020\032\230!\330\010\013\2101\330\014\016\210a\210t\320\023$\240H\250A\330\010\017\210q\200A\360\030\000\t\016\320\r)\250\021\330\010\017\320\017+\2501\250F\260+\270]\310(\320RS\200A\330\010\027\220|\2401\240L\260\017\270|\3101\340\010\023\220;\230a\230q\330\010\013\210<\220q\330\014\030\230\014\240A\240\\\260\037\300\014\310M\320YZ\320Z[\330\014\017\210y\230\004\230A\230Q\330\020\030\230\001\230\031\240$\240a\320'9\270\024\270Q\270a\340\010\014\210G\2201\330\014\031\230\023\230D\240\001\240\021\330\014\017\210t\2201\330\020\021\330\014\027\220t\2309\320$5\260W\270A\270Q\330\014\023\2204\220y\240\t\250\031\260!\2601\330\014\017\210u\220D\230\004\230G\2407\250!\330\020\030\230\001\230\033\240D\250\001\250\021\340\010\013\2103\210a\210z\230\023\230A\330\014\017\210v\220Q\220a\330\014\023\2201\340\010\023\2202\220Q\200A\340\010\013\2101\330\014\023\320\023#\2401\330\r\016\330\014\023\320\023#\2401\330\r\016\330\014\023\320\023#\2401\330\r\016\330\014\023\320\023#\2401\330""\r\016\330\014\023\320\023#\2401\330\010\017\210q\200A\360\n\000\t\014\2101\330\014\020\320\020\"\240!\2401\340\010\013\2104\210q\330\014\r\340\010\013\210:\220Q\220j\240\001\330\014\017\210x\220v\230S\240\001\330\020\023\2204\220q\330\024\027\220t\320\033.\250j\270\003\2708\3001\330\030\034\320\0341\260\021\260/\300\021\330\034\035\360\006\000F\001M\001\310A\330 )\250\027\260\001\260\024\3205H\310\014\320TX\320X_\320_`\320`h\320hi\360\006\000\025\031\320\030+\320+>\270h\300a\330\024&\240h\250a\330\024\027\320\027'\240w\250a\330\030\034\320\034/\320/E\300Q\360\010\000\021\036\230T\240\027\250\001\250\021\330\020\023\220;\230c\240\021\340\024\030\230\r\240Q\340\020\024\320\024)\250\021\320*=\270Q\330\024\025\330(.\250a\330\r\027\220q\230\n\240!\330\014\017\210w\220a\220z\240\021\330\020\024\320\024)\250\021\250(\260-\270q\340\020\024\320\024)\250\021\250!\330\r\027\220q\230\n\240!\330\014\017\210v\220Q\220a\330\026\034\230A\340\014\020\220\010\230\001\230\030\240\021\330\014\020\220\r\230Q\340\014\020\320\020%\240Q\320&9\270\021\330\020\021\330.4\260A\200A\360\n\000\t\022\220\024\220\\\240\021\240!\330\010\013\2101\330\014\022\320\022$\240A\240Q\200A\340\010\014\320\014(\250\001\250\037\270\001\200A\330\010\023\2202\220Q\200A\330\010\013\2102\210S\220\001\330\014\020\220\001\220\021\3309:\330\010\014\320\014\035\230Q\230a\330\010\017\210t\220>\240\021\240!\200A\330\010\t\340\014\020\220\t\230\021\200A\330\010\014\320\014\037\320\0373\2601\260A\200A\330;<\330 3\2601\360\006\000\t\036\230Q\340\010\013\210:\220Q\220g\230Q\330\014\024\220O\2401\240A\330\r\027\220q\230\007\230q\330\014\024\220E\230\025\230a\230q\340\010\013\2104\210x\220~\240S\250\013\2601\330\014\017\320\017!\240\027\250\001\330\020\026\220j\240\001\240\021\340\014\017\210x\220s\230!\330\020\032\230$\230a\340\014\021\220\025\320\026,\250E\3201D\300G\310:\320UY\320YZ\330\014\030\230\005\320\035:\270%\320?Y\320Y`\320`j\320jn\320no\340\014\033\2305\240\016\250c\260\024\260X\270Q\330\014\032\230$\230a\330""\014$\240D\250\010\260\001\330\014\037\230q\330\014(\250\001\340\014 \240\004\320$A\300\021\300!\340\014\017\210x\220s\230!\330\020\032\320\032+\2501\340\014\021\220\025\320\026,\250E\3201D\300G\310:\320Uf\320fg\330\014\030\230\005\320\035:\270%\320?Y\320Y`\320`j\320j{\320{|\330\014(\320(9\270\021\340\014\033\2305\240\016\250c\3201B\300!\330\014\032\320\032+\2501\330\014$\320$5\260Q\330\014\037\320\0370\260\001\340\010\025\220U\230!\330\010\013\210;\220c\320\031*\250$\250d\3202E\300S\310\001\330\014\031\230\024\230Q\330\r\021\320\021$\240C\240q\330\014\031\230\021\340\010\025\220T\230\025\230a\330\010\013\2104\320\017\"\240#\240R\240t\2504\250q\330\014\030\230\004\230H\320$8\270\001\340\014\030\230\001\340\010\t\330\014\033\320\033<\270A\270T\300\021\340\010\013\320\013%\240T\250\021\330\014&\320&;\2701\320\270\034\300T\310\021\330\014\026\220l\240!\330\020\036\230d\240!\330\020\034\230N\250!\330\020+\2501\330\r\027\220q\230\007\230q\330\014!\240\025\240a\330\014\026\220n\240A\330\020\"\240+\250U\260)\2701\330\020\033\230<\240~\260Q\330\020\032\230$\230a\320\0371\260\021\330\020*\250!\330\020#\320#5\260Q\330\r\027\220q\230\007\230q\330\014\017\210t\320\023&\240b\250\001\330\020\026\320\026*\250!\330\024\025\360\006\000\r\"\240\025\240m\260?\320BU\320UV\320VZ\320Zs\320st\330\014\026\220l\240!\330\020\025\220]\240%\320'D\300A\330\020\033\230;\240a\330\r\027\220q\230\007\230q\340\014\026\220l\240!\2405\250\010\260\004\260K\270q\330#1\260\021\330#$\340\010\017\210{\230!\330\010\017\320\017%\240Q\240e\2501\330\010\017\320\017%\240Q\240a\330\010\017\320\017.\250d\260(\270!\340\010\031\320\031)\250\031\260!\2605\270\n\300#\300T\310\033\320T^\320^c\320cr\320rv\360\000\000w\001M\002\360\000\000M\002N\002\330\010\017\210~\230Q\330\014\022\220)\2307\240)\2508\2604\260q\330\014\037\320\0373\260=\300""\016\310l\320Z[\330\014\032\320\0321\260\033\270L\320Hc\320cd\330\014$\320$=\270U\300!\200A\340\010\013\2103\210b\220\007\220z\240\032\2501\330\014\017\210t\2201\330\020\026\220j\240\001\240\021\330\014\017\210s\220!\320\023@\300\002\300!\330\020\026\220j\240\001\240\021\200A\200A\330\010\014\320\014*\250*\3204R\320RS\320S[\320[\\\330SW\320Wi\320ij\330SW\320WX\330SW\320WX\330\010\014\320\014'\240{\260!\2601\330\010\014\320\014\036\230a\230t\320#>\270h\300a\200A\360`\001\000\t\014\2104\320\017!\240\022\2401\330\014\017\210x\220q\230\001\340@D\320DW\320Wa\320ab\340\010\014\210L\230\001\230\031\240!\240=\260\001\330\010\014\210K\220u\230A\230T\240\021\330\014\023\320\023(\250\001\250\032\260;\270a\330\010\020\320\020 \240\001\240\032\2501\200A\330\010\013\2104\210|\2303\230k\250\024\250T\260\026\260s\270!\330\014\023\2201\360\n\000\t\r\210I\320\025%\240X\250Q\250a\330\010\014\320\014\036\230a\230|\2501\330\010\014\210I\320\025%\240V\2501\250A\330\010\017\210q\200A\360\010\000\t\024\2204\320\027(\250\t\260\021\260!\330\010\013\2109\220C\220|\2401\330\014\023\2201\340\010\t\360`\001\000\t\020\210t\2207\230!\2301\200A\360\020\000\t\014\2104\320\017!\240\023\240A\330\014\022\320\022&\240a\330\020\021\340\010\013\210=\230\002\230\"\230C\230}\250B\250d\260!\330\013\030\230\003\2304\320\037<\270A\270Q\330\014\022\220*\230A\230Q\330\036\"\320\"?\270q\300\001\330\010\014\320\014)\250\021\320*;\2701\200A\360\030\000\t\014\2104\320\017!\240\023\240A\330\014\022\320\022&\240a\330\020\021\340\010\014\320\014&\240a\320'8\270\001\200A\360 \000\t\014\2104\320\017!\240\023\240A\330\014\022\320\022&\240a\330\020\021\340\010\016\210d\320\022-\250Q\250a\330\010\014\320\014'\240q\320(9\270\021\330\010\013\2104\210r\220\021\330\014\020\320\020)\250\021\200A\360\026\000\t\014\2104\320\017\037\230}\250H\3204I\310\036\320WX\330\014\022\220,\230a\320\037T\320TX\320Xh\320hi\340\010\035\230Z\240q\250\004\320,<\270H\300A\330\010\013\320\013\036\230e\2404\240t\250>\270\023\270D\300\r\310Q\310c\320Q""T\320TU\330\014\022\220,\230a\230q\340\010\013\2104\320\017\"\240$\240c\250\021\250$\250o\270S\300\001\330\014\022\220,\230a\320\037V\320VY\320Y\\\320\\]\320]a\320ab\340\010\016\210d\220-\230q\240\001\330\010\013\210:\220Q\220e\2301\330\014\023\2203\220a\220q\340\014\023\2203\220a\220q\200A\330\010\013\2104\320\017-\250R\250q\330\014\r\330\010\020\220\004\320\024*\250!\320+<\270D\300\001\330\010\014\210I\220Z\320\037/\250q\260\007\260t\320;N\310a\200A\340\010\013\2104\210~\230S\240\013\2501\330\014\022\220*\230A\230Q\330\010\014\320\014%\240Q\330\010\014\320\014\034\230K\240q\200A\340\010\013\2104\210~\230S\240\013\2501\330\014\022\220*\230A\230Q\330\010\014\320\014&\240a\330\010\014\320\014\034\230K\240q\200A\340\r\021\220\021\330\014\023\2204\220{\240%\240q\200A\360\014\000\t\014\2104\320\017\037\230q\330\014\020\320\020 \320 9\270\021\330\014\025\220T\320\031)\250\027\260\001\330\014\020\320\020!\240\026\240q\340\014\020\320\020!\240\021\200A\360\006\000\t\014\2104\210\177\320\036?\270q\300\004\300A\330\014\023\2201\340\010\014\210H\220D\230\010\240\t\250\032\2601\330\014\017\210t\220=\240\003\2401\330\020\027\220q\340\014\026\220g\230Q\230d\240!\330\014\017\210x\220r\230\021\330\020\027\220q\340\010\017\210q\200A\330\010\013\2104\320\017\037\230y\250\001\250\026\250s\260,\270a\330\014\r\340\010\023\2204\320\027+\250=\270\001\360\n\000\t\030\220t\320\0334\260A\260Q\340\010\026\320\026.\250a\330\014\022\220.\320 2\260$\260i\270t\3001\330\014\020\220\014\230J\240d\250!\330\014\030\230\001\340\010\032\230$\320\036?\270q\300\001\330\010\013\2101\330\014\017\210v\220Q\320\026G\300q\330\014\033\2307\240!\340\010\013\2106\220\021\320\0226\260a\330\010\023\2206\230\021\200A\360\014\000\016\022\220\021\330\014\020\220\013\2304\230q\240\001\200A\330\010\013\2104\210q\330\014\020\320\020\"\240!\2401\340\014\020\320\020%\240Q\320&9\270\021\330\020=\270Q\200A\330\010\013\2104\210q\330\014\027\220{\240!\320#4\260D\3208P\320PQ\320QY\320YZ\340\010\023\220;\230a\230x\240t\2501""\330\010\023\220;\230a\230\177\250d\260!\330\010\023\220;\230a\230|\2504\250q\330\010\023\220;\230a\230\177\250d\260!\330\010\023\220;\230a\230\177\250d\260!\330\010\023\220;\230a\230\177\250d\260!\330\010\023\220;\230a\320\0373\2604\260q\330\010\023\220;\230a\320\0370\260\004\260A\330\010\023\220;\230a\320\037>\270d\300!\330\010\023\220;\230a\230~\250T\260\021\340\010\017\210q\200A\330\010\013\2104\210q\330\014\023\2204\220q\230\004\230A\330\010\014\210N\230$\230a\230t\2401\330\010\017\210q\200A\330\010\013\2104\210q\330\014\r\330\010\013\2104\210q\330\014\022\220,\230a\320\037P\320PR\320RS\330\010\013\2104\320\017\037\230q\330\014\017\210x\220q\320\030b\320bc\330\010\014\210K\220q\330\010\014\210N\230!\200A\330\010\013\2104\210q\360\006\000\r\016\340\010\013\2104\210z\230\027\240\001\330\014\020\220\t\230\031\240!\330\010\013\320\013\035\230W\240A\330\014\020\220\010\320\030-\250Q\360\006\000\t\r\210H\220G\2301\230D\240\016\320.@\300\001\200A\340\010\013\2104\210q\330\014\020\320\020\"\240!\330\014\r\340\010\t\330\014\020\320\020+\2505\260\001\330\017\020\330\014\017\210t\320\023%\240R\240q\330\020\026\220i\230q\240\001\340\021\025\220X\230Q\230a\330\020\026\220i\230q\240\001\330\014\020\320\020+\2501\340\010\014\320\014\036\230a\200A\360\010\000\t\014\2104\210q\330\014\r\340\010\013\2106\220\021\320\022O\310q\330\r\021\220\021\330\014\017\210t\2201\330\020\023\2206\230\021\320\032U\320UV\330\020\021\340\014\017\210t\2201\330\020\023\2206\230\021\320\032;\2701\330\020\021\340\014\020\320\020/\250q\330\010\013\2106\220\021\320\022=\270Q\340\010\026\220a\330\010\025\220Q\330\010\t\330\014\017\210u\220A\320\025Y\320YZ\340\014\032\230$\320\036?\270q\300\001\330\014\017\210q\330\020\023\2206\230\021\320\032Y\320YZ\330\020\033\2307\240!\340\014\017\210t\320\023#\2409\250A\250V\2603\260l\300!\330\020\024\320\024)\250\021\250!\330\020\023\2206\230\021\320\032F\300a\340\014\020\220\013\2305\240\001\240\024\240Q\330\020\027\220|\2401\240A\340\014\017\210v\220Q\320\026R\320R""S\330\014\020\320\020 \240\006\240a\240q\340\014\017\210v\220Q\320\026M\310Q\330\014\020\320\020#\2406\250\021\250!\340\014\017\210v\220Q\320\026M\310Q\330\014\033\2304\230q\330\014\036\230a\330\014\027\220w\230a\230t\320#=\270V\3009\320L]\320]^\330\014\020\220\013\2305\240\001\240\024\240Q\330\020\031\230\027\320 2\260!\2606\3209J\310!\330\020\023\2207\230'\240\021\330\024\"\240!\330\024\032\320\032,\250A\250Q\330\024\033\2304\230q\240\001\330\017\020\330\014\017\210z\230\021\320\032R\320RS\330\014\020\220\n\230!\330\020\026\220g\230Q\340\014\020\320\020/\250q\260\001\340\021\025\220Q\330\020\024\320\0243\2601\330\014\r\340\014\017\210t\2201\330\025\031\230\021\330\024\030\230\007\230q\330\024\030\320\0307\260q\360\006\000\t\020\210q\200A\330\010\013\2104\210q\330\014\r\340\010\013\2106\220\021\320\022&\240a\330\010\014\210I\220Q\330\010\014\320\014\034\230J\240a\240q\330\010\014\210K\220u\230A\230T\240\021\330\014\023\220:\230Q\230a\330\010\014\210L\230\004\230A\330\014\024\220J\230a\230q\330\010\014\320\014\037\230z\250\021\250!\340\010\037\230t\320#D\300A\300Q\330\010\013\2101\330\014 \240\007\240q\200A\330\010\013\2104\210q\330\014\022\220/\240\021\360\000\000#A\002\360\000\000A\002B\002\330\010\026\220o\320%9\270\021\270!\330\010\013\210<\220r\230\037\250\001\330\014\022\220/\240\021\330\020[\320[j\320jk\340\010\013\2108\2201\220A\360\004\000Z\002^\002\360\000\000^\002q\002\360\000\000q\002~\002\360\000\000~\002\177\002\330\010\014\320\014 \240\001\200A\330\010\t\330\014\023\2204\220q\230\004\230A\330\017\020\330\014\017\210t\2204\320\027'\240q\330\020\023\2204\220t\2301\330\024\030\320\030)\250\021\330\020\021\340\010\013\2104\210t\320\023#\2401\330\014\020\320\020 \240\001\330\014\020\220\016\230d\240!\2404\240q\360\014\000\r\024\2204\220u\230A\340\010\017\210t\2201\220D\230\001\200A\330\010\013\2104\210q\360\006\000\r\016\340\010\013\320\013\034\230D\240\004\240G\2501\250F\260'\270\021\330\014\r\360\006\000\t\r\210M\230\021\200A\330\010\013\2104\210q\330""\014\r\340\010\014\210H\220A\220T\230\021\200A\360\006\000\t\014\2104\210q\330\014\r\330\010\t\330\014\025\220T\230\031\240'\250\021\250#\250W\260H\270A\330\014\022\320\022$\240A\240Q\330\017\020\330\014\017\210z\230\021\230!\200A\330./\360\010\000\t\014\2104\210q\330\014\r\340\r\021\220\021\330\014\025\220T\230\021\360\010\000\r\020\210t\320\023*\250$\250d\3202B\300)\3101\310F\320RU\320Ua\320ab\330\020\034\230A\330\020\024\220K\230u\240A\240T\250\021\330\024\"\240'\250\037\270\001\330\024!\240\033\250D\260\001\260\021\330\024\027\220q\330\030%\240Z\250q\260\016\270b\300\001\330\020\023\2201\330\024\025\340\014\020\220\t\230\021\330\014\020\220\004\220G\2304\230t\320#;\2703\270d\320B\\\320\\]\330\020\021\340\010\013\2108\2201\320\0244\260A\340\010\014\320\014\034\230H\240A\240Q\330\010\014\320\014\037\230x\240q\250\001\330\010\014\210K\220u\230A\230T\240\021\330\014\023\2208\2301\230A\340\010\014\210L\230\004\230A\330\014\024\220H\230A\230Q\340\010\014\320\014\037\230q\240\006\240a\200A\330\010\013\2104\210q\330\014\r\340\010\014\320\014!\240\024\240Y\250a\330\010\014\320\014 \240\001\240\024\320%9\270\021\340\010\014\210I\220Y\230i\240t\250<\260\177\300c\310\027\320PQ\200A\360\006\000\t\014\2104\210q\340\014\020\220\016\230a\230t\2401\360\n\000\r\021\220\016\230d\240!\2404\240\177\3206F\300a\300t\3108\320S^\320^b\320bc\200A\330\010\013\2104\210q\330\014\020\220\007\220w\230a\200A\340\010\013\2104\210t\2201\330\014\023\2204\220x\230y\250\007\250q\260\005\260X\270Q\200A\360\024\000\t\014\2104\210t\2201\330\014\022\220.\240\001\340\010\014\320\014\035\230Q\330\010\014\210H\320\024$\240D\250\001\330\010\014\210G\2206\230\021\330\010\014\320\014\035\230Q\330\010\014\320\014 \240\001\330\010\014\210M\230\021\330\010\014\210M\230\021\200A\330\010\013\2104\210t\2201\330\014\025\220T\230\025\230c\240\022\2401\330\014\020\320\020!\240\024\240Q\240a\330\014\020\220\007\220{\240\"\240H\250D\260\001\260\024\260Z\270q\340\014\017\210v\220Q\320\026D\300A\200A\360\034\000\t\014""\2104\210t\2207\230'\240\021\330\014\022\220/\240\021\240!\330\010\017\210t\2201\200A\330\010\013\2104\210t\320\023)\250\023\250D\260\004\260A\330\014\r\340\010\013\2106\220\021\320\022M\310Q\330\010\025\220Q\330\010\t\330\014\031\230\024\320\0350\260\001\260\024\260Q\330\014\031\230\024\230Q\230d\320\"7\260w\270a\330\014\017\210\177\320\0361\260\021\260$\260a\340\020\031\230\021\330\020\024\220E\230\025\230a\230s\240#\240Q\240m\2601\330\024\032\230'\240\021\240*\250A\250R\250r\260\022\2601\330\024\030\230\r\240Q\240l\260&\270\010\300\001\340\020\024\220J\320\036/\250w\260a\260|\3001\330\024\027\220y\240\007\240q\330\030\"\320\"8\270\001\270\021\360\006\000\025%\240D\250\001\250\021\330\024\035\230Q\330\024\030\230\005\230U\240!\2403\240c\250\021\320*:\270!\330\030\036\230g\240Q\240m\2601\260B\260b\270\002\270!\330\024\030\230\r\240Q\240l\260&\270\001\340\014\017\210v\220Q\320\026V\320VW\330\010\017\320\017$\240A\330\014\017\210x\220q\320\030U\320U[\320[\\\330\010\020\320\020%\240V\250;\260a\330\014\017\210x\220q\320\030Q\320QW\320WX\330\017\020\330\014\017\210z\230\021\320\032O\310q\340\014\017\210q\330\020\032\230&\240\001\320\004\034\230A\360\020\000\t\014\2104\210t\320\023&\320&F\300a\300q\330\014\022\220/\240\021\240!\320\004A\300\021\360\014\000\t\014\2104\210t\320\023&\240o\260Q\260l\320BR\320RZ\320Zc\320cm\320ms\320st\3306L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\320\004A\300\021\360\020\000\t\014\2104\210t\320\023&\240o\260Q\260l\320BR\320R]\320]f\320fp\320py\320yz\3306L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\200A\360\n\000\t\014\2104\210u\220C\220t\2304\230q\330\014\020\320\0200\260\001\200A\360\014\000\t\023\220!\330\r\021\220\021\360\010\000\r\021\220\n\230'\240\022\2404\240v\250Q\330\014\017\210t\2201\330\020\032\230!\330\010\013\2101\330\014\016\210a\210t\320\023'\240x\250q\330\010\017\210q\200A\330\010\013\2104\210x\220~\240S\250\013\2601\330\014\022\220*\230A\320\035{\320{|\330\010\017\210q\220\006\220d\230\"\230K\240q\330\010\014""\210H\320\024$\240K\250q\200A\360\014\000\t\024\2204\220x\320\037/\250q\330\010\t\330\014\023\2208\2301\230A\330\017\020\330\014\022\220!\320\023/\250q\260\004\260D\270\006\270h\300e\3101\330\014\022\220*\230A\230Q\330\020,\250A\250W\260D\270\005\270Q\270a\200A\330\010\013\2104\210x\220s\230!\330\014\031\230\024\320\0352\260/\300\021\300$\300a\330\014\017\210{\230#\230Q\330\020\023\2204\320\027(\250\003\2505\260\003\2604\3207H\310\002\310!\330\024\030\230\n\240$\240h\250h\3206G\300}\320TU\320Ua\320ae\320ef\330\024\025\330\014\017\210t\320\023$\240G\2501\330\020\024\220J\230d\240(\250(\3202C\300=\320PQ\320QU\320Ug\320gk\320kl\200A\340\010\013\2104\210y\230\003\2301\330\014\023\2201\330\010\020\220\004\220M\240\022\2404\240z\260\022\2604\260u\270A\200A\330\010\013\2104\210z\230\021\230,\240a\330\014\022\220*\230A\230Q\360\006\000\t\026\220Q\330\010\013\210=\320\030(\250\003\250=\270\001\330\014\031\320\031,\250A\330\r\032\320\032*\250#\250]\270!\340\014\r\330\020\033\2304\230q\330\020\036\230m\250;\260g\270Q\270l\310-\320Wh\320hi\340\014\031\320\031,\250A\250Q\340\010 \240\n\250*\260A\260Q\330\010\017\210q\220\004\220F\230!\320\0331\260\027\270\001\270\021\200A\360\n\000\t\014\2105\220\004\220D\230\t\240\034\250Q\250a\330\014\017\210u\220A\320\0252\260!\330\014\020\220\n\230!\2301\200A\330\010\013\2106\220\021\220!\330\010\t\330\014\020\320\020$\240A\240T\320)=\270Q\330\017\020\340\014\027\220t\2309\320$8\270\r\300Q\340\021\025\220Q\360\006\000\021\024\2204\220q\330\024\030\320\030.\250g\260Q\360\n\000\021\025\320\024-\320-H\310\001\330\024\032\230$\230i\240|\2601\330\024\030\230\001\330\024 \240\001\330\020\024\320\024*\250&\260\001\330\017\020\330\014\017\210v\220Q\320\026A\300\031\310!\330\014\r\200A\360\n\000\t\014\2106\220\021\320\022G\300q\340\010\t\330\014\r\330\020\035\230T\240\031\320*=\270Q\270d\300+\320Mc\320cd\330\020\023\2204\220q\330\024\036\230f\240A\330\024\032\230/\250\021\250!\330\020\021\330\014\023\320\0231\260\021\330\020\024\220I\320\0350\260""\001\260\024\260[\300\001\300\021\330\014\023\320\023(\250\001\360\010\000\021\024\2204\220t\2309\320$@\300\004\300A\300Q\330\024\030\230\t\320!4\260A\260T\270\033\300D\310\t\320QR\340\024\025\340\010\013\2106\220\021\220!\340\022\023\360\014\000\t\030\220w\230d\240!\2406\250\027\260\001\3201A\300\027\310\006\310a\310q\330\010\t\330\014\026\320\026(\250\001\330\020#\2407\250!\320+<\270N\310!\330\020!\240\027\250\001\320):\270.\310\001\330\020!\240\027\250\001\320):\270.\310\001\330\017 \240\004\240A\340\014\030\230\004\320\034-\250Q\250d\260/\300\030\310\021\330\014\030\230\004\320\034.\250d\3202L\310D\320PQ\330\014\032\230,\240a\240v\250[\3208J\320JZ\320Z[\330\014\032\230,\240a\240v\250[\3208J\320JZ\320Z[\330\014\r\210_\320\034,\250O\320;K\310:\320Uh\320hi\330\020\035\230]\250(\260$\260k\300\036\310q\340\014\017\210t\2201\330\020\026\220a\340\014\017\210t\2201\340\020\024\320\024&\240a\330\020\034\230D\320 1\260\021\260$\260o\300X\310Q\330\020\036\230l\250!\2506\260\033\320P\320PQ\330\014\020\320\020 \240\001\240\034\320-?\320?O\320Of\320fg\330\017\020\330\014\026\220f\230A\330\014\r\340\010\017\210q\200A\330\010\021\220\031\230!\2306\240\031\250!\330\010\014\210J\220a\200A\340\010\014\320\014\037\320\0376\260d\270!\2701\200A\330\010\t\330\014\020\320\020 \320 ;\2707\300!\330\017\020\330\014\022\220/\240\021\240!\200A\340\r\021\220\021\330\014\020\220\013\2307\240!\2401\200A\330\010\013\2107\220(\230)\2401\330\014\020\220\013\2304\320\037/\250y\270\007\270q\330\020\023\2204\220w\230a\330\024\033\320\0330\3200@\300\001\330\014\023\320\0231\3201A\300\021\200A\330\010\027\320\027(\250\001\330\010\013\320\013\034\320\0347\260s\270!\330\014\033\320\0332\260&\270\004\320\270a\360\006\000\025\031\230\010\240\007\240q\250\004\250M\3209J\310&\320P\\\320\\]\330\024\025\340\024\027\220w\230a\230z\250\021\330\030\034\320\0341\260\021\260(\270-\300q\340\030\034\320\0341\260\021\260!\330\024\025\340\020\024\320\024+\2501\250G\260:\270Q\330\021\033\2301\230J\240a\330\020\023\2204\220z\240\027\250\001\330\024\030\230\t\320!5\260Q\330\020\023\2204\220z\240\021\240*\250A\330\024\030\230\014\240H\250A\250Q\330\020\025\220W\230A\230T\240\032\320+@\300\001\330\020\030\230\004\230N\320*;\2701\330\024\030\230\010\240\004\240F\250*\260J\270d\300!\330\020\024\320\024+\2501\250G\260:\270Q\330\021\033\2301\230J\240a\330\020\023\2207\230!\230:\240Q\330\024\030\320\030-\250Q\250h\260m\3001\340\024\030\320\030-\250Q\250a\360\006\000\021\027\320\0263\2603\260a\330\020\026\320\026)\250\021\250%\250q\330\020\024\220N\240!\330\020\024\220L\240\010\250\001\250\021""\330\020\024\320\024)\250\021\250!\330\010\017\210}\230A\340\014\017\210z\230\021\230!\330\014\020\320\020%\240Q\240a\200A\340\010\014\210C\210w\220e\2301\330\020\024\320\024$\240J\250a\250q\330\014\022\220*\230A\230Q\360\010\000\t\r\320\014(\250\001\320)M\310Q\200A\330\010\014\210D\220\001\330\010\013\2102\210T\220\021\220*\230C\230t\2401\330\014\017\210v\220Q\320\026j\320jk\340\014\020\220\n\230!\340\014\020\320\0200\260\001\3201E\300Q\200A\360\006\000\t\025\220D\320\030.\250d\260!\260<\270q\330\010\016\210d\220&\230\005\230Q\330\010\013\2104\210s\220!\330\014\030\230\n\240\"\240A\330\014\024\220J\230b\240\001\340\014\024\220F\230#\230R\230q\330\014\030\230\004\230B\230a\330\010\014\320\014\"\240!\240>\260\021\330\010\017\210q\200A\330\010\014\210D\220\006\220j\240\004\240A\330\014\016\210a\320\017!\240\030\250\021\200A\330\010\014\210E\220\024\220Y\230g\240Q\330\014\r\320\r#\320#3\2601\200A\330\010\014\210E\220\024\220Y\230g\240Q\330\014\r\320\r#\2406\250\021\250!\200A\330\010\014\210E\220\024\220Y\230g\240Q\330\014\r\320\r#\2407\250!\2501\200A\330\010\014\210E\220\024\220Y\230g\240Q\330\014\r\320\r#\2408\2501\250A\200A\330\010\014\210E\220\024\220Y\230g\240Q\330\014\r\320\r#\2409\250A\250Y\260a\200A\330\010\014\210E\220\024\220Y\230g\240Q\330\014\r\320\r#\240:\250Q\250a\200A\330\010\022\220!\330\010\014\210E\220\025\220a\220t\2301\330\014\023\2207\230!\2301\230J\240a\330\010\017\210w\220a\220t\2301\330\010\017\210q\200A\330\010\020\220\004\220F\230%\230q\240\006\240f\250A\330\010\013\2105\220\007\220t\2301\330\014\020\220\r\230Q\230g\240Q\340\014\017\210v\220Q\320\026Q\320QR\200A\330\010\014\210G\2201\220F\230/\250\021\330\010\017\210q\220\006\220g\230Q\200A\330 !\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\"#\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021""\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\330\021\022\360\016\000\t\014\320\013\034\230G\2401\330\014\020\320\020$\240A\340\010\013\2106\220\027\230\001\330\014\020\220\t\230\021\330\014\017\210\177\230g\240Y\250c\3201B\300#\300\\\320QT\320TU\330\020\026\220j\240\001\240\021\360\006\000\r\034\320\033-\250T\260\032\2701\270D\320@S\320ST\330\014\034\320\034/\250t\260:\270Q\270d\320BU\320UV\330\014\033\2307\320\"3\2601\260G\320;T\320Ta\320ad\320de\340\014\032\230,\240a\330\014\033\320\033-\250Q\330\014\020\220\016\230c\240\025\240d\250,\260a\330\024\030\230\014\240A\330\020 \320 5\260Q\260l\300+\310\\\320YZ\340\014\037\320\0371\260\021\260,\270k\310\034\320UV\330\014\035\230Q\330\020 \320 0\260\001\260\021\330\020\024\220K\230|\2501\360\006\000\t\014\210?\230'\240\021\330\014\017\210\177\230c\240\021\330\020\024\320\0240\260\001\330\020!\240\021\240!\340\020\024\320\0240\260\001\340\014\017\210z\230\021\320\032*\250!\330\020\026\220i\230q\240\001\340\014\017\210u\220C\220q\330\020\026\220j\240\001\240\021\330\014\020\320\020\"\240!\340\010\014\210H\220A\340\010\013\320\013$\240G\2501\330\014\020\320\020,\250A\340\010\014\320\014 \320 1\260\023\3204J\310!\3105\320PT\320TU\330\010\014\320\014\035\230Z\240q\250\001\340\010\035\230Q\330\010\014\210F\220!\2203\220d\230&\240\004\320$4\260C\260t\270:\300Q\300d\310!\330\014\036\230g\240Q\240f\250J\260a\260t\270=\310\004\310A\340\010\014\320\014\"\240!\2403\240d\250&\260\004\3204D\300C\300z\320QR\320RV\320VW\330\010\014\320\014*\250!\2504\250q\260\005\260]\300'\310\021\310#\310R\310z\320Y^\320^`\320`a\330+/\250v\260T\270\021\340\010\034\320\034A\300\021\300!\330\010\014\320\014\037\230w\240a\240t\2501\250E\260\021\330\r\016\330\020\021\220\037\240\001\240\024\240V\2504\250t\2608\2703\270c\300\023\300G\3101\330\020\024\220F\320\032+\2507\260#\260S\270\003\2707\300!\360\010\000\t\r\320\014'\240w\250a\330\014\r""\210U\220!\220=\240\007\240q\250\003\2504\250u\260F\270$\270d\300(\310!\330\r\021\220\025\220i\320\0370\260\006\260c\270\023\270F\300'\310\021\360\006\000\t\014\210?\230%\230t\2404\240q\340\014\022\320\022+\2501\250D\260\001\340\010\014\210O\2301\340\010\013\320\013\034\230G\2401\330\014\020\320\020$\240A\330\014\020\320\020.\250a\330\010\014\320\014+\2501\340\010\014\210N\230!\340\010\014\320\014\035\230Q\340\010\013\320\013!\240\027\250\001\330\014\017\210z\230\021\320\0321\260\021\330\020\026\220i\230q\240\001\330\014\020\320\020)\250\021\340\014\020\320\020*\320*=\270Q\340\010\013\320\013\037\230w\240a\330\014\017\210z\230\021\320\032/\250q\330\020\026\220i\230q\240\001\330\014\020\320\020'\240q\340\010\013\320\013 \240\007\240q\330\014\017\210z\230\021\320\0320\260\001\330\020\026\220i\230q\240\001\330\014\020\320\020(\250\001\340\010\013\320\013%\240W\250A\330\014\017\210t\2208\2301\230A\330\020\026\220j\240\001\240\021\330\014\020\320\020-\250Q\340\010\013\320\013\036\230g\240Q\330\014\017\210z\230\021\320\032.\250a\330\020\026\220i\230q\240\001\330\014\020\320\020&\240a\340\010\013\320\013\037\230w\240a\330\014\017\210t\2208\2301\230A\330\020\026\220j\240\001\240\021\330\014\020\320\020'\240q\340\014\020\320\020'\320'B\300!\340\010\014\320\014\037\230~\250Q\330\010\014\320\014\034\230I\240Q\320&>\320>N\310a\330\014\020\220\001\330\014\020\220\001\330\014\034\230G\2401\330\014\030\230\007\230q\360\010\000\t\014\320\013!\240\023\240A\330\014\017\210q\330\020\026\220j\240\001\240\021\360\006\000\r\021\320\020 \240\013\2501\330\014\020\220\001\220\021\330()\360\006\000\r\030\220t\320\033+\2501\330\014\017\210q\330\020\030\230\007\230q\240\001\330\020\024\320\024$\240K\250q\340\014\022\320\022,\250A\250T\3201A\300\030\310\021\330\014\024\220K\230q\320 <\320\270a\320?U\320UV\340\010\013\2104\320\017)\250\024\250T\260\024\260Q\330\014""\017\210t\220>\240\023\240K\250q\330\020'\240t\320+;\320;[\320[\\\330\020\023\2201\330\024\027\220x\230q\330\030\031\360\016\000\033\"\240\021\240#\320%5\260T\270\021\340\020\023\320\023)\250\023\250A\330\024\027\220x\230q\330\030\031\360\n\000\033\"\240\021\240#\320%5\260T\270\021\340\010\014\320\014\037\230q\340\010\013\210<\220t\2304\230q\330\014\020\220\001\220\021\360\010\000\022\023\340\010\014\210O\2301\330\010\014\210O\2301\330\010\014\210L\230\001\330\010\014\210O\2301\330\010\014\320\014)\250\021\330\010\014\320\014*\250!\330\010\014\320\014'\240q\330\010\014\320\014&\240a\330\010\014\320\014+\2501\330\010\014\320\014-\250Q\330\010\014\320\014+\2501\330\010\014\320\014\037\230q\330\010\014\320\014$\240A\330\010\014\320\014\037\230q\330\010\014\320\014)\250\021\330\010\014\320\014*\250!\340\010\014\320\014\035\230Q\330\010\014\320\014\036\230d\240!\360\010\000\t\r\210L\230\007\230q\330\010\014\210L\230\010\240\001\330\010\014\320\014\"\240!\330\010\014\320\014$\320$7\260q\330\010\014\320\014(\250\004\250A\340\010\014\210O\230;\240a\240q\340\010\014\210A\330\014\030\230\010\240\001\330\014\030\230\t\240\021\360\006\000\t\r\210A\330\014\030\230\010\240\001\330\014\030\230\t\240\021\360\006\000\t\r\210A\330\014\030\230\010\240\001\330\014\030\230\t\240\021\360\006\000\t\r\210A\330\014\030\230\010\240\001\330\014\030\230\t\240\021\360\006\000\t\r\210L\230\004\320\0349\270\021\270,\300a\330\010\014\210M\230\032\2401\240D\250\001\340\010\014\210I\220U\230!\340\010\013\2104\210q\330\014\021\320\021*\250!\330\014\020\220\013\2307\240!\2407\250&\260\001\260\021\340\010\014\320\014\"\320\"3\2601\330\014\022\220$\220a\330\014\020\320\020.\250d\260!\330\014\020\220\001\330\014%\240Q\340\010\013\210:\220S\230\001\330\014\020\220\r\230T\240\026\240q\330\010\013\320\013\034\230G\2401\330\014\020\320\020$\240A\330\010\013\320\013\037\230w\240a\330\014\020\320\020'\240q\200A\360$\000\t\r\320\014$\240G\2502\250T\260\026\260q\200A\360\014\000\t\r\320\014$\240G\2502\250T\260""\026\260q\200A\340\010\014\210H\220A\220Q\200A\330\010\014\320\014\034\230H\240A\240Q\330\010\014\320\014\037\230x\240q\250\001\330\010\014\210K\220u\230A\230T\240\021\330\014\023\220<\230q\240\001\340\010\014\320\014\037\230q\240\006\320&7\260q\200A\360\n\000\t\r\210H\220A\220\\\240\034\250Q\250a\200A\330\010\014\210I\220Q\200A\330\010\034\230I\240Q\240g\250X\260Q\330\010\014\320\014\"\240'\250\026\250q\260\001\200A\330\010\022\220'\230\021\230&\240\004\240I\250Z\260t\2701\330\010\014\320\014)\250\021\250!\330\010\014\210I\220T\230\021\230!\330\010\017\210q\200A\330\010\014\210J\220a\330\010\013\2104\210t\2207\230'\240\021\360\022\000\r\020\210t\2204\220q\330\020\024\220J\230d\240(\250(\3202C\300=\320PQ\320QW\320W[\320[\\\330\020\021\340\014\017\210t\320\023$\240G\2501\330\020\023\2204\320\027(\250\003\2501\330\024\030\230\014\240A\330\024\025\330\014\020\220\r\230Q\230o\250Q\330\014\020\220\r\230Q\200A\330\010\014\210J\220e\230>\250\021\330\010\014\320\014#\2401\330\010\014\210J\220e\2301\330\010\014\210M\230\021\340\010\016\210i\220q\230\006\230e\2401\330\010\014\210J\220a\330\010\014\210F\220!\200A\330\010\014\210J\220l\240$\240l\260&\270\001\330\014\020\220\n\230)\2408\2506\260\021\330\020\027\320\027,\250A\250Z\260z\300\021\200A\360\n\000\t\r\210K\220u\230A\230T\240\021\330\014\020\220\010\230\005\230Q\230g\240W\250G\2601\330\020\024\320\024,\250A\200A\360\010\000\022\023\330\021\022\360\006\000\t\r\210L\230\007\230v\240Q\240a\330\010\014\210O\2301\330\010\014\210L\230\001\340\010\014\320\014,\250A\330\010\014\320\014.\250a\330\010\014\320\014,\250A\330\010\014\320\014$\240A\330\010\014\320\014#\2401\340\010\014\210I\220U\230!\330\010\014\320\014&\240d\250!\340\010\014\320\014%\240Q\330\010\014\320\014\"\240%\240q\340\010\014\320\014%\240Q\200A\330\010\014\210M\230\021\230(\240$\240f\250E\260\021\260&\270\006\270a\200A\330\010\020\220\004\220N\240!\2401\330\010\013\2104\210u\220A\330\014\021\220\031\230!\2309\240J\250i\260q\330\010\017\210q\200A\330\010\014""\210N\230!\330\010\013\2104\210z\230\027\240\001\330\014\020\220\t\230\036\240y\260\001\260\024\260U\270#\270R\270t\3001\340\r\021\220\021\330\014\020\320\020$\240A\360\n\000\r\027\220e\2301\330\027\030\360\006\000\t\r\210G\2204\220q\360\006\000\t\r\320\014 \240\001\330\014\034\230A\200A\330\010\014\210N\230!\330\010\013\2104\210z\230\027\240\001\330\014\020\220\t\230\036\240y\260\001\260\024\260U\270#\270R\270t\3001\340\r\021\220\021\330\014\020\320\020!\240\021\360\n\000\r\027\220e\2301\330\027\030\360\010\000\t\r\210G\2204\220q\360\006\000\t\r\320\014 \240\001\330\014\034\230A\200A\360\032\000\t\014\320\013\034\230N\320*:\270'\300\025\300a\330\020!\240\035\250g\260Q\330\014\r\340\010\030\320\030)\250\021\340\010\030\230\001\330\010\013\210=\230\001\340\014\023\220=\240\013\2507\260!\2601\330\014\017\210u\220C\220t\2308\2409\250A\330\020\036\230d\240(\250)\260:\270Q\270a\330\020\023\220;\230n\250C\250q\330\024$\240A\340\010\013\2101\330\014\035\230]\250!\330\014\032\230!\340\014\017\210}\320\034,\250C\250|\2701\330\020!\240\034\250Q\330\020\036\230a\360\006\000\021\"\240\035\250a\330\020\036\230a\360\006\000\t\014\210=\320\030(\250\003\2501\330\014\031\320\031+\2501\330\010\013\320\013\034\230M\250\023\250A\330\014\035\230_\250A\200A\340\010\t\360\014\000\t\025\220N\240!\330\010\013\210;\220d\230+\240X\250[\270\001\330\014\020\320\020#\2401\330\014\024\220K\230s\240+\250Q\330\014\020\220\007\220q\230\007\230}\250A\330\r\030\230\003\230;\240a\330\014\020\320\020%\240Q\320&=\270Q\270a\340\014\017\210t\220:\230W\240A\330\020\024\220I\230Z\240q\330\014\020\320\020\"\240!\2401\340\010\014\210H\220A\220X\320\0354\260A\260Q\200A\360\030\000\t\026\220Q\330\010\014\210H\220D\230\010\240\t\250\032\2601\330\014\027\220t\320\033,\250I\260Q\260a\330\014\023\2204\220w\230d\240!\2401\330\014\025\220Q\330\014\017\210t\2205\230\003\2304\230q\360\010\000\021\024\2209\230C\230|\2509\260D\270\004\270G\3004\300v\310Q\330\024\035\230T\320!3\2601\260F\270!\330\021\032\230#\230T\240\021""\340\020\023\2209\230C\230|\2501\330\024\035\230T\240\034\250Q\250a\340\024\030\320\030)\250\021\330\014\017\210q\330\020\027\220t\2301\230A\330\010\017\210q\200A\330\010\014\320\014\035\230Q\230a\330\010\017\210t\220?\240#\240Q\200A\330\010\021\220\024\320\025-\250Q\250d\260+\270Q\330\010\017\210w\220a\220t\320\033,\250J\260d\270+\300T\320I\\\320\\d\320de\200A\340\010\013\210:\220Q\220e\2301\330\014\023\2201\340\014\017\210v\220Q\320\026J\310!\330\014\023\2201\200A\330\010\013\210:\220Q\220h\230a\330\014\020\320\020!\240\021\240+\250\\\270\021\330\014\r\330\010\t\330\014\020\220\001\220\021\330\014\020\320\020!\240\021\330\017\020\330\014\020\320\020!\240\021\240+\250\\\270\021\200A\360\n\000\t\022\220\024\320\025-\250Q\250j\270\001\330\010\017\210t\320\023$\240H\250A\250Z\260t\320;N\310h\320VW\200A\330\r\021\220\021\330\014\020\320\020%\240Q\240l\260!\200A\360\010\000\t\026\220T\320\031,\250A\330\010\023\220:\230]\320*:\270!\330\010\017\210t\2209\230I\240Q\240m\260>\300\021\200A\330\010\014\320\014\035\230T\240\021\240!\330\010\014\210N\230!\200A\330\010\r\210W\220A\220T\230\030\240\031\250$\320.G\300v\310\\\320YZ\330\010\025\220T\230\027\240\001\240\026\320'8\270\003\2701\330\010\013\210;\220c\230\021\340\014\020\220\r\230Q\200A\360\014\000\016\022\220\021\330\014\022\220$\220a\330\014\020\320\020)\250\021\330\014\023\2201\200A\360\016\000\t\017\210a\330\010\013\2104\210q\330\014\r\330\020\026\220d\230.\250\001\250\021\330\023\024\330\020\026\220d\230!\2304\230q\240\004\240A\340\010\017\210q\200A\330\r\021\220\021\330\014\020\220\016\230a\330\014\020\220\r\230Q\200A\360\010\000\016\022\220\021\330\014\022\220$\220a\330\014\020\220\017\230q\340\010\013\2101\330\014\017\210v\220Q\320\026[\320[`\320`a\330\014\017\210v\220Q\200A\330\010\013\210;\220c\230\024\230]\250%\250z\270\034\300S\310\n\320RS\330\014\020\220\n\230!\200A\330\010\021\320\021&\240d\250/\270\023\270N\310$\310a\330\010\017\210q\330\022\026\220h\230d\240*\250H\260D\3208K\3104\310q\200A\360\014\000""\t\n\330\014\026\220d\230(\240)\250:\260Q\260a\330\017\020\330\014\022\320\022&\240a\330\020Y\320YZ\340\010\t\330\014\030\230\007\230{\250!\2501\330\017\020\330\014\022\320\022&\240a\330\020@\300\013\3101\340\010\026\220i\230q\340\010\t\360\014\000\t\r\210H\220H\230A\230Y\240a\200A\330\010\026\220e\2301\230A\330\010\016\210g\220U\230!\2301\330\010\017\210t\2209\230I\240Y\250a\250v\260Q\330\010\013\210<\220s\230!\330\014\024\220D\320\030.\250a\320/@\300\004\300A\330\014\017\210u\220C\220q\340\020\024\220I\230Z\320'7\260q\270\007\270t\3001\340\020\024\220I\230Z\320'7\260q\270\007\270t\3009\310H\320TU\330\r\031\230\023\230A\360\n\000\r\020\210u\220G\2301\340\020\024\220I\230X\240Q\240f\320,=\270Q\200A\330\010\026\220e\2301\230A\330\010\016\210g\220U\230!\2301\330\010\017\210t\2209\230I\240Y\250a\250v\260Q\330\010\013\210<\220s\230+\240S\250\014\260C\260q\330\014\017\210t\320\0233\2603\260a\330\020\030\230\004\320\0342\260!\3203F\300d\310!\330\020\024\220I\230Z\320'7\260q\270\007\270t\320C^\320^_\330\r\031\230\023\230A\330\014\020\220\t\230\032\320#3\2601\260C\260t\2709\300N\320RS\200A\330\010\016\210f\220J\230a\330\010\013\2101\330\014\017\210x\220q\330\020\021\330\020\031\230\021\200A\330\010\016\210m\2301\330\010\036\230d\320\":\270!\2701\330;F\300f\310F\320RS\330;J\310&\320PX\320X^\320^_\330\010\033\230?\250!\330\010\033\230=\250\001\340\010\r\210T\220\021\330\010\020\320\020%\240Q\330\010\033\230>\250\021\250)\2604\260~\300V\3108\320SW\320Wd\320de\200A\330\010\017\210q\200A\330\026(\250\001\330\026'\240q\360.\000\t\r\210M\230\021\230+\320%7\3207G\300s\310!\330\010\014\210L\230\001\230\032\320#4\260O\3003\300a\200A\330\010\014\320\014\037\230q\330\010\014\320\014\034\230O\2501\330\010\014\320\014\034\230O\2501\330\010\014\320\014\036\230a\230q\330\010\014\210N\230!\330\010\014\210N\230!\200A\360\010\000\t\020\210q\220\005\220Z\230t\2409\250D\260\001\200\001\330\004\007\320\007\032\230'\240\023\240A\330\010\017\210q\330\004\005\330\017\020\330\010\017\210x\220x\320""\0371\260\021\260!\340\013\014\330\010\017\210q\200A\330\010\017\210t\320\023&\320&:\270!\200A\360\032\000\t\020\210t\2201\200A\360\016\000\t\020\210t\2201\220A\200A\330\010\017\210t\2201\220D\230\001\200A\340\010\017\210t\2201\220I\320\0357\260q\270\005\270T\300\023\300D\310\001\310\033\320TU\330\024\027\220t\2301\230O\2504\250s\260$\260a\260x\270q\330\025\036\230g\240T\250\023\250C\250t\2601\260A\200A\360\036\000\t\020\210t\2201\200A\360\016\000\t\020\210t\2201\200A\360\034\000\t\020\210t\2201\200A\360\022\000\t\020\210t\2201\200A\340\010\017\210t\2201\330\010\013\2105\220\004\220D\230\n\240#\240T\250\032\2601\330\020\024\320\024+\2503\250a\330\014\017\210v\220Q\220a\330@A\340\014\020\220\n\230!\200A\330\010\t\330\014\017\210t\2201\330\020\021\340\014\r\330\020\021\330\024\034\230C\230w\240d\250'\260\024\260Q\260f\270F\300(\310!\330\024\027\220t\2301\330\030\033\2301\330\034\037\230v\240Q\240a\330\030\031\330\024\027\220w\230c\240\024\240U\250!\330\030\034\320\034-\250X\260Q\260a\330\030\034\230F\240)\2501\330\030!\240\024\240Q\240a\330\030!\240\024\240Z\250w\260a\260u\270H\300A\330\030\036\320\0360\260\001\260\024\260Q\340\030\034\230G\240;\250b\260\010\270\003\2701\330\030\031\330\023\030\230\001\360\006\000\r\021\220\006\220a\220q\200A\360\020\000\016\022\220\021\330\014\017\210t\2201\330\020\021\340\020\024\220O\2401\340\010\013\2104\210q\330\014\020\320\020 \240\005\240Q\340\010\014\210J\220i\230q\340\010\014\320\014\037\230y\250\001\340\010\014\210K\220u\230A\230T\240\021\330\014\023\2209\230A\340\010\014\210I\220Y\230a\340\010!\240\021\240!\200A\360\n\000\016\022\220\021\330\014\017\210t\2201\330\020\021\340\020\024\220O\2401\360\n\000\t\r\210J\220d\230!\330\014\022\220'\230\021\330\010\024\220A\220T\230\021\340\010\013\2104\210q\330\014\020\320\020\"\240%\240q\340\010\014\210H\220E\230\021\230$\230g\240W\250A\330\014\020\220\t\230\021\200A\340\r\021\220\021\330\014\017\210t\2201\330\020\024\320\024*\250'\260\021\340\r\021\220\021\330\014\017\210t\2201\330""\020\021\340\020\024\320\024$\240A\340\014\017\210v\220Q\220a\330\014\017\210t\2201\330\020\024\220L\240\006\240a\330\020\024\220O\2401\200A\330\r\021\220\021\330\014\017\210t\2201\330\020\021\360\010\000\r\020\210t\220=\240\004\240D\250\014\260A\330\020\027\220t\2309\240I\250Y\260a\260t\270<\300q\360\006\000\021\024\2201\330\024\030\230\t\320!;\2701\330\030\036\230d\240,\250m\320;L\310A\330\024\025\360\010\000\t\r\210J\220a\200A\330\010\t\330\014\017\210t\2204\220y\240\001\330\020\027\220t\2309\240I\250W\260B\260h\270a\330\017\020\340\010\017\210q\200A\330\010\017\210t\2207\230'\240\021\200A\330\010\017\210t\2207\230$\230a\230v\240Q\330\010\013\2101\330\014\017\210v\220Q\320\0268\270\001\330\014\023\2204\220w\230a\230t\2401\340\014\023\2201\200A\360\n\000\t\020\210t\2209\230A\230Q\200A\330\010\017\210t\320\0230\260\001\260\021\200A\360\n\000\t\020\210t\320\023#\2401\200A\360\020\000\t\020\210t\320\023#\2401\200A\360\022\000\t\020\210t\220?\240'\250\021\200A\340\010\017\210t\320\023#\2408\2501\200A\360\014\000\t\020\210t\220?\240#\240Q\200A\360\024\000\t\020\210t\320\023-\250Q\250a\200A\360\022\000\t\020\210t\320\023&\240a\200A\360\024\000\t\020\210t\320\023&\240a\200A\360\024\000\t\020\210t\320\023.\250a\250q\200A\330\010\017\210t\220;\230c\320!8\270\013\3001\200A\330\010\021\220\021\360\006\000\t\020\210u\220A\330\014\r\200A\330\010\t\330\014\017\210v\220Q\220a\330\017\020\360\006\000\t\r\210O\2301\330\010\014\210G\220;\230b\240\003\2403\240a\330\010\014\210E\220\021\200A\330\010\017\210v\220Z\230q\240\004\320$;\2704\320?U\320UV\320VW\220A\330\030'\240w\250a\250q\330\030*\250$\250a\200A\330\010\t\330\014\022\220-\230w\240b\250\001\250\021\330\014\023\2203\220a\220r\230\021\230!\330\014\036\230d\240&\250\001\250\021\330\014\017\320\017\037\230r\240\021\330\020\027\220t\2302\230Q\330\014\035\320\0353\2601\260L\300\010\310\001\330\014\030\230\016\240l\260/\320AQ\320QR\320RV\320Va\320ab\330\017\020\330\014\017\210v\220Q\220a\330^g\320gh\340\010\014\210G\2201\220L\240""\001\320\004B\320BS\360\000\000T\001B\002\360\000\000B\002C\002\360\034\000\t\016\320\r)\250\021\330\010\017\320\017'\240q\250\006\320.I\310\035\320Vl\320lm\320\004*\320*B\320B^\320^_\330\010\013\2104\210y\230\001\330\014\023\2201\340\010\021\220\024\320\025/\250q\260\001\3300B\300!\3300:\270!\340\010\013\2104\210t\320\023)\250\024\250T\260\021\330\014\017\210v\220Q\220a\330\014\023\2201\340\010\013\2104\210q\330\014\017\210v\220Q\220a\330\014\023\2201\340\010\014\210I\220Y\230h\240a\240|\2604\260}\300A\340\010\017\210q\320\004C\3001\360\020\000\t\014\2104\210t\320\023&\240o\260Q\260l\320BR\320R^\320^g\320gq\320q{\320{|\3306L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\320\004<\320\270\021\330\020!\240\037\3200A\300\034\310Q\310d\320RS\330\017\020\360\n\000\t\r\320\014$\240A\240Q\340\010\033\2301\330\010\013\2101\330\014\037\230t\320#5\260Q\260l\300.\320Pa\320ab\340\010\031\320\031*\250.\3208H\310\001\330\010\013\2101\330\014\032\230!\320\0331\260\032\2707\300!\330\010\026\220a\320\027/\250z\270\021\270#\270Q\320>O\320O`\320`b\320bc\340\010\021\220\024\320\025-\250Q\250g\260[\300\006\300f\310G\320Sb\320bc\330.6\260j\320@R\320RS\340\010\016\210h\320\026&\240a\330\010\016\320\016#\2404\240q\340\010\013\320\013\034\230N\320*?\270q\330\020\032\230!\320\033,\320,D\300A\330\014\020\320\020)\250\021\250!\340\014\022\220-\230q\330\010\017\210q\320\004-\250Z\260q\330#-\250Q\330\0213\3203H\310\001\330\021\022\340\010\013\320\013!\240\023\240A\330\014\020\320\0203\2601\330\014\020\320\020)\320)<\270A\340\014\020\320\0203\2601\330\014\020\320\020)\250\021\340\010\013\320\013\035\230S\240\001\330\014\020\320\020/\250q\330\014\020\320\020%\320%5\260Q\340\014\020\320\020/\250q\330\014\020\320\020%\240Q\340\010\014\320\014\034\230M\250\023\250K\260q\340\010\014\320\014%\240W\250E\260\021\330\020\024\320\024$\240J\250a\250q\330\014\022\220*\230A\230Q\360\006\000\t\r\320\014(\250\001\340\010\014\320\014\037\230q\330\010\014\210O\2301\330\010\014\320\014,\320,I\310\023\320Lh\320hi\330\010\014\320\014)\250\021\320\004-\250Z\260q\330#-\250Q\330\021'\240q\330\021?\270q\360\030\000\t\030\220}\240C\320'7\260q\330\010\r\210Q\320\016%\240U\250)\2601\3204K\310>\320YZ\3304N\320N_\320_`\3304N\310a\330\010\014\320\014\035\230^\2503\250l\270!\270=\310\001\330;J\310!\240Z\250t\3203H\310\001\220\021\270\001\200\001\360\n\000\005\006\330\010\014\320\014\"\240!\330\013\014\320\004&\240a\360\032\000\t\014\2104\210t\320\023&\240o\260Q\3206L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\320\004>\270a\360\014\000\t\014\2104\210t\320\023&\240o\260Q\260l\320BR\320RY\320Yb\320bl\320lq\320qr""\3306L\320Lg\320gm\320mn\330\014\022\220/\240\021\240!\200\001\330\004\005\330\010\036\230a\330\010$\240A\330\010+\2501\330\010.\250a\360\006\000\005\010\200u\210C\210q\330\010\017\320\017\037\230q\240\001\340\004\013\210:\220Q\200\001\330\004\005\330\010\r\320\r.\250a\330\010\020\320\020 \240\001\330\004\013\320\013\"\240!\330\010\020\220\006\220a\320\004.\250a\330\010\t\330\014\017\210t\2201\330\020\024\320\0245\260Q\260d\270.\320H\\\320\\]\330\020\027\220q\330\017\020\340\017\020\330\014\017\210v\220Q\320\026W\320W`\320`a\330\014\020\220\016\230a\330\010\017\210q\320\004\036\230a\360\n\000\t\020\210t\320\023#\320#3\2601\260A\200\001\330\004\032\230$\230a\230q\320\004\026\220o\240Q\360\026\000\016\022\220\021\330\014\017\210t\2201\330\020\026\220o\240Q\240a\340\014\017\210t\2204\220q\330\020\023\2206\230\021\230!\330\032\036\320\036/\250t\2601\330\020\024\320\024%\320%8\270\001\330\020*\250!\2501\330\020\024\220L\240\004\240A\330\024\032\230&\240\004\240I\250Q\250j\270\007\270q\330\024\027\220q\330\030\034\230G\2401\330\030\034\230L\250\004\250A\330\034$\240G\2501\250A\340\020\024\320\024$\240I\250Q\330\024\033\2306\240\021\240'\250\024\250Y\260j\300\001\330\020\024\320\024*\250)\2601\330\024\033\2306\240\021\240'\250\024\250Y\260j\300\001\360\006\000\021\022\330\024\030\320\030+\2508\2601\360\006\000\025\031\230\014\240D\250\001\330\030\034\230D\240\t\250\031\260!\2601\330\030\033\2302\230T\240\024\320%5\260Y\270a\270s\300#\300\\\320QR\330\034\035\230Y\240a\340\024\027\220v\230Q\230a\330\027\030\330\024\027\220z\240\021\240!\340\024\030\230\t\240\021\330\024\025\340\020\024\320\024$\320$4\260A\340\020\023\2204\220q\330\024\030\320\030+\320+>\270a\330\030\034\230A\330\030\034\230A\330\030 \240\004\240A\340\020\024\220M\240\021\340\010\022\220$\220m\2401\240A\330\010\013\2101\330\014\030\230\001\230\027\240\001\340\010\014\320\014+\2501\250A\340\010\017\210q\220q\200\001\340\004\n\210&\220\n\230!\330\004\007\200q\330\010\013\2106\220\021\320\0224\260I\270Q\320\004'""\240q\330\010\014\210K\220q\330\010\014\210I\220Q\330\010\014\210L\230\001\340\010\014\210I\220U\230!\330\010\014\210J\220a\330\010\014\320\014 \240\007\240q\330\010\014\210L\230\007\230q\330\010\014\320\014'\240q\330\010\014\320\014!\240\024\240X\250Q\340\010\014\210K\220w\230a\360\006\000\t\r\320\014+\2501\330\010\014\210H\220A\330\014\025\220T\320\031+\2501\250F\3202C\3001\330\014\017\210q\330\020\024\320\024-\250T\260\021\260!\340\010\022\220,\230a\230t\320#>\270l\310!\330\010\016\210g\220Z\230t\320#3\2601\330\014\026\220l\240!\2407\250+\260\\\300\021\340\010\013\320\013\033\2301\330\014\022\220!\330\014\017\210t\2201\330\020\027\320\027.\250b\260\004\260A\330\014\022\220/\240\021\240%\240q\250\001\250\031\260$\260e\2701\340\010\014\210N\230$\230f\240A\330\010\014\320\014'\240t\320+I\310\021\340\010\013\2104\210x\320\0271\260\027\270\001\330\014\r\330\020\024\320\024/\250t\2601\330\024\027\220q\230\004\230M\250\022\2501\330\025\026\330\0251\260\024\260X\270Q\330\023\024\330\020\023\2205\230\001\230\021\340\010\013\2104\210x\220q\330\014\026\220d\230(\320\">\270a\330\014&\240h\250d\3202K\3101\310G\320ST\330\014\017\210q\330\020\024\320\024)\250\037\270\001\330\024!\240\024\240X\250Q\330\024\034\230A\360\006\000\021\024\2201\330\024\027\220v\230Q\230a\340:A\300\021\300\"\300G\320K]\320]_\320_`\340\010\013\2106\220\021\320\022G\300w\310a\310t\320S[\320[\\\330OS\320ST\200\001\330\004\007\320\007 \240\001\330\010\r\320\r/\250q\330\010\020\320\020!\240\021\340\010\020\220\005\220Q\200\001\330\005\t\210\030\220\021\340\004\007\200q\330\010\017\210q\330\005\024\220G\2309\240A\330\004\007\200q\330\010\014\210G\2201\220A\330\004\014\210C\210s\220/\240\021\200\001\360\014\000\005\006\330\010\017\210v\220\\\240\021\240/\260\021\330\"(\250\014\260F\270!\330\013\021\220\021\330\010\013\2106\220\021\220!\330 '\240q\250\017\260q\330\010\017\210q\210\001\330\014\037\230w\240a\240q\330\014\017\210q\330\020\026\220a\220t\2309\240A\340\014\017\210t\2201\330\020\030\230\001\230\021""\210\001\330\014\017\210w\220a\220z\240\021\330\020\027\220x\230}\250A\340\020\027\220q\200\001\330\004\007\320\007\027\220w\230c\240\021\330\010\017\210q\330\013\014\330\004\013\2106\220\030\230\023\230F\240'\250\021\210\001\330\021\022\330\020\027\220x\230q\240\001\340\020\021\330\024#\2407\250!\2506\260\027\270\001\330\020\027\220}\240A\330\024#\2407\250!\2501\340\020\023\2201\330\024\025\340\014\017\210v\220Q\320\026F\300a\340\014\020\220\007\220q\230\002\230$\230e\320#3\2603\260j\300\001\300\023\300A\330\020\023\2206\230\021\320\032X\320X^\320^g\320gh\330\020\021\340\014\017\210t\2203\220a\220q\330\020\023\2208\2301\320\034\\\320\\]\330\020\021\340\014\020\220\016\230a\230q\200\001\330\004\007\200x\210w\220a\330\010\017\320\017\037\230q\320 7\260q\330\004\013\320\013\"\240!g"; PyObject *data = NULL; CYTHON_UNUSED_VAR(__Pyx_DecompressString); #endif PyObject **stringtab = __pyx_mstate->__pyx_string_tab; Py_ssize_t pos = 0; for (int i = 0; i < 1618; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); if (likely(string) && i >= 255) PyUnicode_InternInPlace(&string); if (unlikely(!string)) { Py_XDECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } stringtab[i] = string; pos += bytes_length; } for (int i = 1618; i < 1872; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); stringtab[i] = string; pos += bytes_length; if (unlikely(!string)) { Py_XDECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } } Py_XDECREF(data); for (Py_ssize_t i = 0; i < 1872; i++) { if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = stringtab + 1618; for (Py_ssize_t i=0; i<254; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); } #else Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } } #endif } { PyObject **numbertab = __pyx_mstate->__pyx_number_tab; double const c_constants[] = {0.1,0.2,1.0,2.0,5.0,0.01,10.0,30.0,600.0}; for (int i = 0; i < 9; i++) { numbertab[i] = PyFloat_FromDouble(c_constants[i]); if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) } } { PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 9; int8_t const cint_constants_1[] = {0,-1,1,2,3,4,5,7,8,10,30,100,126,127}; int16_t const cint_constants_2[] = {1000,5000,9042}; for (int i = 0; i < 17; i++) { numbertab[i] = PyLong_FromLong((i < 14 ? cint_constants_1[i - 0] : cint_constants_2[i - 14])); if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_number_tab; for (Py_ssize_t i=0; i<26; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #if PY_VERSION_HEX < 0x030E0000 if (_Py_IsOwnedByCurrentThread(table[i]) && Py_REFCNT(table[i]) == 1) #else if (PyUnstable_Object_IsUniquelyReferenced(table[i])) #endif { Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); } #else Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } } #endif return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_codeobjects ### */ typedef struct { unsigned int argcount : 6; unsigned int num_posonly_args : 1; unsigned int num_kwonly_args : 1; unsigned int nlocals : 6; unsigned int flags : 10; unsigned int first_line : 13; } __Pyx_PyCode_New_function_description; /* NewCodeObj.proto */ static PyObject* __Pyx_PyCode_New( const __Pyx_PyCode_New_function_description descr, PyObject * const *varnames, PyObject *filename, PyObject *funcname, PyObject *line_table, PyObject *tuple_dedup_map ); static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 228}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_new_f, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_T_WHA_AQ_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 511}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_profile_name, __pyx_mstate->__pyx_n_u_profile}; __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__13, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 515}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_n}; __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 520}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591__14, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1546}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_h}; __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2037}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_exc, __pyx_mstate->__pyx_n_u_f}; __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_future_completed_2, __pyx_mstate->__pyx_kp_b_iso88591_xq_7_6_A_7_1_1_vQ_Fa_q_e_33j_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2163}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_e}; __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2327}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Qa_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2597}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_f}; __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 2600}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_f}; __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3351}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_errors}; __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_kp_b_iso88591_A_waq_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3324}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_new_pool, __pyx_mstate->__pyx_n_u_auth_exc, __pyx_mstate->__pyx_n_u_conn_exc, __pyx_mstate->__pyx_n_u_previous, __pyx_mstate->__pyx_n_u_set_keyspace_event, __pyx_mstate->__pyx_n_u_errors_returned, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_callback}; __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_run_add_or_renew_pool, __pyx_mstate->__pyx_kp_b_iso88591_4_Q_QfJa_1_1_as_iq_H_6avZq_q_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3422}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_f}; __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_lambda, __pyx_mstate->__pyx_kp_b_iso88591_Zt3H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3451}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_host_errors}; __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_pool_finished_setting_keyspace, __pyx_mstate->__pyx_kp_b_iso88591_waq_q_at9A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 3483}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_field_name}; __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3482}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_kp_b_iso88591_9Be5_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 3496}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_pool}; __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 4159}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_version, __pyx_mstate->__pyx_n_u_nodes}; __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 4941}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR), 4963}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_kp_b_iso88591_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4974}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_response}; __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_exception_from_response, __pyx_mstate->__pyx_kp_b_iso88591_waz_x_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 115}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_gevent}; __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_is_gevent_monkey_patched, __pyx_mstate->__pyx_kp_b_iso88591_wc_q_6_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 121}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_GeventConnection}; __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_try_gevent_import, __pyx_mstate->__pyx_kp_b_iso88591_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 128}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_eventlet}; __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_is_eventlet_monkey_patched, __pyx_mstate->__pyx_kp_b_iso88591_A_q_xx_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 138}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_EventletConnection}; __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_try_eventlet_import, __pyx_mstate->__pyx_kp_b_iso88591_1_1_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 145}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_LibevConnection, __pyx_mstate->__pyx_n_u_e}; __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_try_libev_import, __pyx_mstate->__pyx_kp_b_iso88591_a_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 152}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_AsyncoreConnection, __pyx_mstate->__pyx_n_u_e}; __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_try_asyncore_import, __pyx_mstate->__pyx_kp_b_iso88591_1_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 159}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_val, __pyx_mstate->__pyx_n_u_import_fn, __pyx_mstate->__pyx_n_u_rv, __pyx_mstate->__pyx_n_u_excs, __pyx_mstate->__pyx_n_u_import_result, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_connection_reduce_fn, __pyx_mstate->__pyx_kp_b_iso88591_q_q_G9A_q_G1A_Cs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 211}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_errors}; __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_6_Ja, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 216}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_future_completed, __pyx_mstate->__pyx_kp_b_iso88591_q_6_4IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 223}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_f, __pyx_mstate->__pyx_n_u_new_f, __pyx_mstate->__pyx_n_u_new_f}; __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_run_in_executor, __pyx_mstate->__pyx_kp_b_iso88591_U_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 245}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cluster}; __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_register_cluster_shutdown, __pyx_mstate->__pyx_kp_b_iso88591_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 249}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cluster}; __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_discard_cluster_shutdown, __pyx_mstate->__pyx_kp_b_iso88591_1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 253}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_clusters, __pyx_mstate->__pyx_n_u_cluster}; __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_shutdown_clusters, __pyx_mstate->__pyx_kp_b_iso88591_U_1_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 262}; PyObject* const varnames[] = {0}; __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_lbp_factory, __pyx_mstate->__pyx_kp_b_iso88591_xwa_q_7q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 297}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_page_unit, __pyx_mstate->__pyx_n_u_max_pages, __pyx_mstate->__pyx_n_u_max_pages_per_second, __pyx_mstate->__pyx_n_u_max_queue_size}; __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_7_WWX_M_M_A_A_AQ_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 305}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_page_unit_bytes, __pyx_mstate->__pyx_kp_b_iso88591_A_t_c_8_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 309}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_contact_point, __pyx_mstate->__pyx_n_u_port}; __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_addrinfo_or_none, __pyx_mstate->__pyx_kp_b_iso88591_v_F_6_q_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 324}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_default_profiles}; __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execution_profile_to_string, __pyx_mstate->__pyx_kp_b_iso88591_a_A_1_a_uCq_q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 409}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_n_u_retry_policy, __pyx_mstate->__pyx_n_u_consistency_level, __pyx_mstate->__pyx_n_u_serial_consistency_level, __pyx_mstate->__pyx_n_u_request_timeout, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_n_u_speculative_execution_policy, __pyx_mstate->__pyx_n_u_continuous_paging_options}; __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Zq_Q_33H_A_31_A_31_S_q_5Q_q_Q_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 455}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_n_u_retry_policy, __pyx_mstate->__pyx_n_u_consistency_level, __pyx_mstate->__pyx_n_u_serial_consistency_level, __pyx_mstate->__pyx_n_u_request_timeout, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_n_u_graph_options, __pyx_mstate->__pyx_n_u_continuous_paging_options}; __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_Zq_Q_q_q_C_7q_Q_U_14K_YZ4NN___4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 480}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_n_u_retry_policy, __pyx_mstate->__pyx_n_u_consistency_level, __pyx_mstate->__pyx_n_u_serial_consistency_level, __pyx_mstate->__pyx_n_u_request_timeout, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_n_u_graph_options}; __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_31_Q_r_Rt1_6c9SSTTggh_c_QoQ_Q_e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 507}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 510}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_names, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_profiles_without_explicit_lbps, __pyx_mstate->__pyx_kp_b_iso88591_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 519}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_distances, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_distance, __pyx_mstate->__pyx_kp_b_iso88591_A_8_1_xs, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 525}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cluster, __pyx_mstate->__pyx_n_u_hosts, __pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_populate, __pyx_mstate->__pyx_kp_b_iso88591_A_E_YgQ_9AYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 529}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_check_supported, __pyx_mstate->__pyx_kp_b_iso88591_A_E_YgQ_31, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 533}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_up, __pyx_mstate->__pyx_kp_b_iso88591_A_E_YgQ_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 537}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_down, __pyx_mstate->__pyx_kp_b_iso88591_A_E_YgQ_81A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 541}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_add, __pyx_mstate->__pyx_kp_b_iso88591_A_E_YgQ_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 545}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_p}; __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_remove, __pyx_mstate->__pyx_kp_b_iso88591_A_E_YgQ_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 549}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default, __pyx_mstate->__pyx_kp_b_iso88591_A_t9AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 688}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_auth_provider_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 703}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_value}; __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_auth_provider_2, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_5_t_Rq_iq_XQa_iq_1_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 722}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 739}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_lbp}; __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_kp_b_iso88591_A_4_S_1_AQ_a_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 746}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_load_balancing_policy, __pyx_mstate->__pyx_kp_b_iso88591_A_t_81, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 758}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_retry_policy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 767}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_policy}; __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_retry_policy_2, __pyx_mstate->__pyx_kp_b_iso88591_A_4_S_1_AQ_Q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1053}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_schema_metadata_enabled, __pyx_mstate->__pyx_kp_b_iso88591_A_t_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1064}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_enabled}; __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_schema_metadata_enabled, __pyx_mstate->__pyx_kp_b_iso88591_A_7t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1068}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_token_metadata_enabled, __pyx_mstate->__pyx_kp_b_iso88591_A_t_a_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1080}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_enabled}; __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_token_metadata_enabled, __pyx_mstate->__pyx_kp_b_iso88591_A_6d_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {42, 0, 0, 63, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1114}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_contact_points, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_compression, __pyx_mstate->__pyx_n_u_auth_provider_2, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_n_u_reconnection_policy, __pyx_mstate->__pyx_n_u_default_retry_policy_2, __pyx_mstate->__pyx_n_u_conviction_policy_factory, __pyx_mstate->__pyx_n_u_metrics_enabled, __pyx_mstate->__pyx_n_u_connection_class, __pyx_mstate->__pyx_n_u_ssl_options, __pyx_mstate->__pyx_n_u_sockopts, __pyx_mstate->__pyx_n_u_cql_version, __pyx_mstate->__pyx_n_u_protocol_version, __pyx_mstate->__pyx_n_u_executor_threads, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait, __pyx_mstate->__pyx_n_u_control_connection_timeout, __pyx_mstate->__pyx_n_u_idle_heartbeat_interval, __pyx_mstate->__pyx_n_u_schema_event_refresh_window, __pyx_mstate->__pyx_n_u_topology_event_refresh_window, __pyx_mstate->__pyx_n_u_connect_timeout, __pyx_mstate->__pyx_n_u_schema_metadata_enabled, __pyx_mstate->__pyx_n_u_token_metadata_enabled, __pyx_mstate->__pyx_n_u_address_translator, __pyx_mstate->__pyx_n_u_status_event_refresh_window, __pyx_mstate->__pyx_n_u_prepare_on_all_hosts, __pyx_mstate->__pyx_n_u_reprepare_on_up, __pyx_mstate->__pyx_n_u_execution_profiles, __pyx_mstate->__pyx_n_u_allow_beta_protocol_version, __pyx_mstate->__pyx_n_u_timestamp_generator, __pyx_mstate->__pyx_n_u_idle_heartbeat_timeout, __pyx_mstate->__pyx_n_u_no_compact, __pyx_mstate->__pyx_n_u_ssl_context, __pyx_mstate->__pyx_n_u_endpoint_factory, __pyx_mstate->__pyx_n_u_application_name, __pyx_mstate->__pyx_n_u_application_version, __pyx_mstate->__pyx_n_u_monitor_reporting_enabled, __pyx_mstate->__pyx_n_u_monitor_reporting_interval, __pyx_mstate->__pyx_n_u_client_id, __pyx_mstate->__pyx_n_u_cloud, __pyx_mstate->__pyx_n_u_column_encryption_policy, __pyx_mstate->__pyx_n_u_uses_twisted, __pyx_mstate->__pyx_n_u_uses_eventlet, __pyx_mstate->__pyx_n_u_cloud_config, __pyx_mstate->__pyx_n_u_raw_contact_points, __pyx_mstate->__pyx_n_u_cp, __pyx_mstate->__pyx_n_u_strs_resolved_map, __pyx_mstate->__pyx_n_u_profiles, __pyx_mstate->__pyx_n_u_lbp, __pyx_mstate->__pyx_n_u_default_lbp_profiles, __pyx_mstate->__pyx_n_u_Metrics, __pyx_mstate->__pyx_n_u_host_id, __pyx_mstate->__pyx_n_u_cp, __pyx_mstate->__pyx_n_u_cp, __pyx_mstate->__pyx_n_u_ep, __pyx_mstate->__pyx_n_u_xs, __pyx_mstate->__pyx_n_u_ip, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_value, __pyx_mstate->__pyx_n_u_ip, __pyx_mstate->__pyx_n_u_port}; __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_G1_A_6_gYc1B_QTTU_j_T_1D_SST_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 1414}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_tpe_class, __pyx_mstate->__pyx_n_u_EventletConnection, __pyx_mstate->__pyx_n_u_is_eventlet, __pyx_mstate->__pyx_n_u_GreenThreadPoolExecutor}; __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_create_thread_pool_executor, __pyx_mstate->__pyx_kp_b_iso88591_A_A_3m1Cs_D_Cq_9_j_y_1_q_Q_y_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1450}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_user_type, __pyx_mstate->__pyx_n_u_klass, __pyx_mstate->__pyx_n_u_session}; __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_register_user_type, __pyx_mstate->__pyx_kp_b_iso88591_A_4_1_xq_DDWWaab_L_KuAT_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1508}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_profile, __pyx_mstate->__pyx_n_u_pool_wait_timeout, __pyx_mstate->__pyx_n_u_contact_points_but_no_lbp, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u__8, __pyx_mstate->__pyx_n_u_not_done}; __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_execution_profile, __pyx_mstate->__pyx_kp_b_iso88591_31_4z_1_1A_4_S_1_AQ_5_4_q_A_8_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1556}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance}; __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_min_requests_per_connection, __pyx_mstate->__pyx_kp_b_iso88591_A_t_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1559}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance, __pyx_mstate->__pyx_n_u_min_requests}; __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_min_requests_per_connection, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_a_C_Bd_4_AQ_AQ_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1577}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance}; __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_max_requests_per_connection, __pyx_mstate->__pyx_kp_b_iso88591_A_t_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1580}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance, __pyx_mstate->__pyx_n_u_max_requests}; __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_max_requests_per_connection, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_a_C_Bd_4_AQ_AQ_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1598}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance}; __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_core_connections_per_host, __pyx_mstate->__pyx_kp_b_iso88591_A_t_aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1610}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance, __pyx_mstate->__pyx_n_u_core_connections, __pyx_mstate->__pyx_n_u_old}; __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_core_connections_per_host, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_a_d_Qa_q_9_4r, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1635}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance}; __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_max_connections_per_host, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1647}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_distance, __pyx_mstate->__pyx_n_u_max_connections}; __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_max_connections_per_host, __pyx_mstate->__pyx_kp_b_iso88591_A_4_A_a_a_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 1665}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_connection_factory, __pyx_mstate->__pyx_kp_b_iso88591_A_Qj_t_HAZt_NhVW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 1673}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_make_connection_factory, __pyx_mstate->__pyx_kp_b_iso88591_A_Qd_Q_wat_Jd_TI_dde, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1677}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_kwargs_dict}; __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_make_connection_kwargs, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_4D8PPQQYYZ_axt1_a_d_a_4q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1694}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host_endpoint, __pyx_mstate->__pyx_n_u_previous_version, __pyx_mstate->__pyx_n_u_new_version}; __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_protocol_downgrade, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_A_A_B_o_9_r_jjk_81A_Z_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1707}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_wait_for_all_pools, __pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_new, __pyx_mstate->__pyx_n_u_listener, __pyx_mstate->__pyx_n_u_h, __pyx_mstate->__pyx_n_u_session}; __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_connect, __pyx_mstate->__pyx_kp_b_iso88591_oQ_t1_oQa_t4q_6_t1_8_1_L_A_IQj, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1774}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_profile}; __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_default_dbaas_consistency, __pyx_mstate->__pyx_kp_b_iso88591_A_7_1_4_y_q_4wa_00_11A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1781}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_holders, __pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_connection_holders, __pyx_mstate->__pyx_kp_b_iso88591_A_E_at1_7_1Ja_wat1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1788}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_session}; __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_shutdown, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_O1_4q_Q_Jiq_y_KuAT_9A_IYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1816}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 1819}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args}; __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1822}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_session}; __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_new_session, __pyx_mstate->__pyx_kp_b_iso88591_A_IZt1_IT_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1828}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_type_map, __pyx_mstate->__pyx_n_u_udt_name, __pyx_mstate->__pyx_n_u_klass}; __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_session_register_user_types, __pyx_mstate->__pyx_kp_b_iso88591_A_Jl_l_86_AZz, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1833}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_session}; __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_cleanup_failed_on_up_handling, __pyx_mstate->__pyx_kp_b_iso88591_A_HAQ_xq_KuAT_q_q_7q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1841}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_results, __pyx_mstate->__pyx_n_u_lock_2, __pyx_mstate->__pyx_n_u_finished_future, __pyx_mstate->__pyx_n_u_exc, __pyx_mstate->__pyx_n_u_listener, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_f}; __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_up_future_completed, __pyx_mstate->__pyx_kp_b_iso88591_A_81A_wa_gQ_waq_q_q_e83j_A_6_J_P, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1878}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_have_future, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_reconnector, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_futures_lock, __pyx_mstate->__pyx_n_u_futures_results, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_up, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_6_Oq_t1_6_UUV_t1_6_1_q_6_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1950}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_is_host_addition, __pyx_mstate->__pyx_n_u_schedule, __pyx_mstate->__pyx_n_u_conn_factory, __pyx_mstate->__pyx_n_u_reconnector, __pyx_mstate->__pyx_n_u_old_reconnector}; __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_start_reconnector, __pyx_mstate->__pyx_kp_b_iso88591_A_4_y_s_a_4_t_4AQ_a_2_it1_Jd_q_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1974}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_is_host_addition, __pyx_mstate->__pyx_n_u_expect_host_to_be_down, __pyx_mstate->__pyx_n_u_was_up, __pyx_mstate->__pyx_n_u_connected, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_pool_states, __pyx_mstate->__pyx_n_u_pool_state, __pyx_mstate->__pyx_n_u_listener}; __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_down, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_T_t_d2B_1FRUUaab_A_KuAT_D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2013}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_refresh_nodes, __pyx_mstate->__pyx_n_u_distance, __pyx_mstate->__pyx_n_u_futures_lock, __pyx_mstate->__pyx_n_u_futures_results, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_future_completed_2, __pyx_mstate->__pyx_n_u_future_completed_2, __pyx_mstate->__pyx_n_u_have_future, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_add, __pyx_mstate->__pyx_kp_b_iso88591_1_4q_6_B_4_y_9C_1_Qa_vQ_G1A_wav, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2072}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_set_up, __pyx_mstate->__pyx_n_u_listener, __pyx_mstate->__pyx_n_u_session}; __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_finalize_add, __pyx_mstate->__pyx_kp_b_iso88591_1_q_L_A_G1A_KuAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2083}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_listener, __pyx_mstate->__pyx_n_u_reconnection_handler_2}; __pyx_mstate_global->__pyx_codeobj_tab[94] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_remove, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_6_a_IQ_Jaq_KuAT_Qa_L_A_Jaq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[94])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2100}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_connection_exc, __pyx_mstate->__pyx_n_u_is_host_addition, __pyx_mstate->__pyx_n_u_expect_host_to_be_down, __pyx_mstate->__pyx_n_u_is_down}; __pyx_mstate_global->__pyx_codeobj_tab[95] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_signal_connection_failure, __pyx_mstate->__pyx_kp_b_iso88591_PPQ_0_1_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[95])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2106}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_datacenter, __pyx_mstate->__pyx_n_u_rack, __pyx_mstate->__pyx_n_u_signal, __pyx_mstate->__pyx_n_u_refresh_nodes, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_new}; __pyx_mstate_global->__pyx_codeobj_tab[96] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_host, __pyx_mstate->__pyx_kp_b_iso88591_2_fD_4AT_DHddppq_4t1_uA_9_q_a_v, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[96])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2121}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[97] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_remove_host, __pyx_mstate->__pyx_kp_b_iso88591_A_5_D_Qa_uA_2_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[97])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2130}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_listener}; __pyx_mstate_global->__pyx_codeobj_tab[98] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_register_listener, __pyx_mstate->__pyx_kp_b_iso88591_A_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[98])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2139}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_listener}; __pyx_mstate_global->__pyx_codeobj_tab[99] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_unregister_listener, __pyx_mstate->__pyx_kp_b_iso88591_A_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[99])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2144}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[100] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_listeners_2, __pyx_mstate->__pyx_kp_b_iso88591_A_4_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[100])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2149}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_pool}; __pyx_mstate_global->__pyx_codeobj_tab[101] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_ensure_core_connections, __pyx_mstate->__pyx_kp_b_iso88591_A_KuAT_QgWG1_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[101])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2158}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_usertype, __pyx_mstate->__pyx_n_u_function, __pyx_mstate->__pyx_n_u_aggregate, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[102] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_validate_refresh_schema, __pyx_mstate->__pyx_kp_b_iso88591_A_3b_z_1_t1_j_s_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[102])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2166}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_usertype, __pyx_mstate->__pyx_n_u_function, __pyx_mstate->__pyx_n_u_aggregate}; __pyx_mstate_global->__pyx_codeobj_tab[103] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_target_type_from_refresh_args, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_1_1_1_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[103])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2180}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_endpoint}; __pyx_mstate_global->__pyx_codeobj_tab[104] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_control_connection_host, __pyx_mstate->__pyx_kp_b_iso88591_A_T_A_t9IQm, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[104])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2188}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[105] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_schema_metadata, __pyx_mstate->__pyx_kp_b_iso88591_a_4t_oQ6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[105])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2204}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[106] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_keyspace_metadata, __pyx_mstate->__pyx_kp_b_iso88591_2_4t_oQlBRR_ffg6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[106])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2215}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_table, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[107] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_table_metadata, __pyx_mstate->__pyx_kp_b_iso88591_6a_4t_oQlBRRZZccmmsst6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[107])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2226}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_view, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[108] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_materialized_view_metada, __pyx_mstate->__pyx_kp_b_iso88591_A_4t_oQlBRRZZccmmsst6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[108])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2236}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_user_type, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[109] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_user_type_metadata, __pyx_mstate->__pyx_kp_b_iso88591_a_4t_oQlBRRYYbbllqqr6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[109])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2246}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_function, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[110] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_user_function_metadata, __pyx_mstate->__pyx_kp_b_iso88591_A_4t_oQlBRR_ffppyyz6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[110])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2258}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_aggregate, __pyx_mstate->__pyx_n_u_max_schema_agreement_wait}; __pyx_mstate_global->__pyx_codeobj_tab[111] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_user_aggregate_metadata, __pyx_mstate->__pyx_kp_b_iso88591_C1_4t_oQlBRR_ggqq_6LLggmmn, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[111])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2270}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_force_token_rebuild}; __pyx_mstate_global->__pyx_codeobj_tab[112] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_nodes, __pyx_mstate->__pyx_kp_b_iso88591_A_4t_Faq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[112])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2281}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_enabled}; __pyx_mstate_global->__pyx_codeobj_tab[113] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_meta_refresh_enabled, __pyx_mstate->__pyx_kp_b_iso88591_A_AQ_q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[113])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2298}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_chunks, __pyx_mstate->__pyx_n_u_set_keyspace, __pyx_mstate->__pyx_n_u_ks_chunk, __pyx_mstate->__pyx_n_u_messages, __pyx_mstate->__pyx_n_u_responses, __pyx_mstate->__pyx_n_u_success, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_s}; __pyx_mstate_global->__pyx_codeobj_tab[114] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_send_chunks, __pyx_mstate->__pyx_kp_b_iso88591_A45_L_q_avQa_0_PPQ_E_5Rz_n_Q_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[114])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2311}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_statements, __pyx_mstate->__pyx_n_u_chunks, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_ks_statements, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[115] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_prepare_all_queries, __pyx_mstate->__pyx_kp_b_iso88591_A_4t_D_A_6_MQ_Q_0_Q_Qd_7wa_1_a_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[115])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2349}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query_id, __pyx_mstate->__pyx_n_u_prepared_statement}; __pyx_mstate_global->__pyx_codeobj_tab[116] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_prepared, __pyx_mstate->__pyx_kp_b_iso88591_A_Ql, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[116])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2380}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[117] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_kp_b_iso88591_A_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[117])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2395}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rf}; __pyx_mstate_global->__pyx_codeobj_tab[118] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_kp_b_iso88591_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[118])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2401}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[119] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_timeout_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[119])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2417}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timeout}; __pyx_mstate_global->__pyx_codeobj_tab[120] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_timeout_2, __pyx_mstate->__pyx_kp_b_iso88591_A_A_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[120])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2423}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[121] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_consistency_level_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[121])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2439}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cl}; __pyx_mstate_global->__pyx_codeobj_tab[122] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_consistency_level_2, __pyx_mstate->__pyx_kp_b_iso88591_A_AQ_Fa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[122])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2451}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[123] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_serial_consistency_level_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_5, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[123])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2462}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cl}; __pyx_mstate_global->__pyx_codeobj_tab[124] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_default_serial_consistency_level_2, __pyx_mstate->__pyx_kp_b_iso88591_A_Cwe1_Jaq_AQ_MQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[124])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2575}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cluster, __pyx_mstate->__pyx_n_u_hosts, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_msg, __pyx_mstate->__pyx_n_u_cc_host, __pyx_mstate->__pyx_n_u_valid_insights_version, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_h}; __pyx_mstate_global->__pyx_codeobj_tab[125] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_q_Kq_IQ_L_IU_Ja_q_L_q_q_XQ_Kwa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[125])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2635}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_n_u_custom_payload, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_paging_state, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_execute_as}; __pyx_mstate_global->__pyx_codeobj_tab[126] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute, __pyx_mstate->__pyx_kp_b_iso88591_6j_7q_aR_t_W_LIUhhvv_H_H_O_O_P, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[126])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {10, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2680}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_n_u_custom_payload, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_paging_state, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_execute_as, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[127] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_async, __pyx_mstate->__pyx_kp_b_iso88591_4M_AF_q_1_1_7_Q_w_6a_Q_4q_L_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[127])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2729}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_statements_and_parameters, __pyx_mstate->__pyx_n_u_concurrency, __pyx_mstate->__pyx_n_u_raise_on_first_error, __pyx_mstate->__pyx_n_u_results_generator, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_execute_concurrent}; __pyx_mstate_global->__pyx_codeobj_tab[128] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_concurrent, __pyx_mstate->__pyx_kp_b_iso88591_MMh_i_T_T_U_r_C_Pffyyz, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[128])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 2789}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_statement, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_execute_concurrent_with_args}; __pyx_mstate_global->__pyx_codeobj_tab[129] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_concurrent_with_args, __pyx_mstate->__pyx_kp_b_iso88591_A_1F_RS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[129])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2804}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_statements_and_parameters, __pyx_mstate->__pyx_n_u_concurrency, __pyx_mstate->__pyx_n_u_raise_on_first_error, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_execute_concurrent_async}; __pyx_mstate_global->__pyx_codeobj_tab[130] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_concurrent_async, __pyx_mstate->__pyx_kp_b_iso88591_BBS_T_B_B_C_q_I_Vllm, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[130])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2821}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_execute_as}; __pyx_mstate_global->__pyx_codeobj_tab[131] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_graph, __pyx_mstate->__pyx_kp_b_iso88591_44SSoop_t_q_7BUU_ggh, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[131])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2835}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_execute_as, __pyx_mstate->__pyx_n_u_graph_parameters, __pyx_mstate->__pyx_n_u_custom_payload, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[132] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_graph_async, __pyx_mstate->__pyx_kp_b_iso88591_YYuuv_4x_S_1_Ba_4z_D_q_4wa_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[132])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2891}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_graph_paging}; __pyx_mstate_global->__pyx_codeobj_tab[133] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_maybe_set_graph_paging, __pyx_mstate->__pyx_kp_b_iso88591_A_7s_2_ZZ_6a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[133])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2898}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_version}; __pyx_mstate_global->__pyx_codeobj_tab[134] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_check_graph_paging_available, __pyx_mstate->__pyx_kp_b_iso88591_A_4_q_A_1_HD_1_t_1_q_gQd_xr_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[134])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2914}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_graph_options, __pyx_mstate->__pyx_n_u_is_core_graph, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_ks_metadata, __pyx_mstate->__pyx_n_u_graph_protocol, __pyx_mstate->__pyx_n_u_row_factory}; __pyx_mstate_global->__pyx_codeobj_tab[135] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_resolve_execution_profile_optio, __pyx_mstate->__pyx_kp_b_iso88591_A_N_a_gQ_7_1_uCt89A_d_Qa_nCq_A_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[135])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2960}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_graph_options, __pyx_mstate->__pyx_n_u_serializer, __pyx_mstate->__pyx_n_u_context, __pyx_mstate->__pyx_n_u_serialized_parameters}; __pyx_mstate_global->__pyx_codeobj_tab[136] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_transform_params, __pyx_mstate->__pyx_kp_b_iso88591_A_4z_a_AQ_Q_A_4q_m_gQl_Whhi_AQ_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[136])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2979}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_master_query_future, __pyx_mstate->__pyx_n_u_cb, __pyx_mstate->__pyx_n_u_args}; __pyx_mstate_global->__pyx_codeobj_tab[137] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_target_analytics_master, __pyx_mstate->__pyx_kp_b_iso88591_A_m1_d_1_FfFRS_J_PXX___T_Q_4_V8S, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[137])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 2991}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_master_future, __pyx_mstate->__pyx_n_u_query_future, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_addr, __pyx_mstate->__pyx_n_u_delimiter_index, __pyx_mstate->__pyx_n_u_targeted_query}; __pyx_mstate_global->__pyx_codeobj_tab[138] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_analytics_master_result, __pyx_mstate->__pyx_kp_b_iso88591_A_wb_3ar_d_r_t2Q_31L_l_AQQRRVVaa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[138])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {9, 0, 0, 26, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3006}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_parameters, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_n_u_custom_payload, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_execution_profile, __pyx_mstate->__pyx_n_u_paging_state, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_prepared_statement, __pyx_mstate->__pyx_n_u_cl, __pyx_mstate->__pyx_n_u_serial_cl, __pyx_mstate->__pyx_n_u_retry_policy, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_n_u_load_balancing_policy, __pyx_mstate->__pyx_n_u_spec_exec_policy, __pyx_mstate->__pyx_n_u_continuous_paging_options, __pyx_mstate->__pyx_n_u_fetch_size, __pyx_mstate->__pyx_n_u_start_time, __pyx_mstate->__pyx_n_u_timestamp, __pyx_mstate->__pyx_n_u_supports_continuous_paging_state, __pyx_mstate->__pyx_n_u_continuous_paging_state, __pyx_mstate->__pyx_n_u_query_string, __pyx_mstate->__pyx_n_u_statement_keyspace, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_spec_exec_plan}; __pyx_mstate_global->__pyx_codeobj_tab[139] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_create_response_future, __pyx_mstate->__pyx_kp_b_iso88591_A_31_Q_QgQ_O1A_q_q_E_aq_4x_S_1_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[139])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3113}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_profiles, __pyx_mstate->__pyx_n_u_eps, __pyx_mstate->__pyx_n_u_ep}; __pyx_mstate_global->__pyx_codeobj_tab[140] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_execution_profile, __pyx_mstate->__pyx_kp_b_iso88591_A_4x_q_81A_q_D_he1_AQ_AWD_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[140])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3127}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ep}; __pyx_mstate_global->__pyx_codeobj_tab[141] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_maybe_get_execution_profile, __pyx_mstate->__pyx_kp_b_iso88591_A_vZq_4_UUVVW, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[141])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 3130}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ep, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_clone, __pyx_mstate->__pyx_n_u_attr, __pyx_mstate->__pyx_n_u_value}; __pyx_mstate_global->__pyx_codeobj_tab[142] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execution_profile_clone_update, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_6aq_F_6_q_1G6_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[142])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 3145}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[143] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_request_init_listener, __pyx_mstate->__pyx_kp_b_iso88591_A_G2T_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[143])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 3165}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[144] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_remove_request_init_listener, __pyx_mstate->__pyx_kp_b_iso88591_A_G2T_q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[144])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3173}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_response_future, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[145] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_request, __pyx_mstate->__pyx_kp_b_iso88591_A_D_j_A_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[145])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3177}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_custom_payload, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_prepared_keyspace, __pyx_mstate->__pyx_n_u_prepared_statement, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[146] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_prepare_2, __pyx_mstate->__pyx_kp_b_iso88591_2_P_wiq_q_ivV84q_q_vWBd_z_L_a_m, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[146])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3243}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_excluded_host, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_request_id_2}; __pyx_mstate_global->__pyx_codeobj_tab[147] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_prepare_on_all_hosts, __pyx_mstate->__pyx_kp_b_iso88591_9_HE_gU_uC_T_Q_q_nAV7_ST_2_a_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[147])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3277}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_pool}; __pyx_mstate_global->__pyx_codeobj_tab[148] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_shutdown, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_O1_Jd_AT_4q_q_HE_gWA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[148])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3301}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[149] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_enter, __pyx_mstate->__pyx_kp_b_iso88591_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[149])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 3304}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args}; __pyx_mstate_global->__pyx_codeobj_tab[150] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_exit, __pyx_mstate->__pyx_kp_b_iso88591_A_IQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[150])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3307}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[151] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_del, __pyx_mstate->__pyx_kp_b_iso88591_A_3, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[151])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3316}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_is_host_addition, __pyx_mstate->__pyx_n_u_distance, __pyx_mstate->__pyx_n_u_run_add_or_renew_pool, __pyx_mstate->__pyx_n_u_run_add_or_renew_pool}; __pyx_mstate_global->__pyx_codeobj_tab[152] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_or_renew_pool, __pyx_mstate->__pyx_kp_b_iso88591_A_4_9C_1_1_t7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[152])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3374}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_pool}; __pyx_mstate_global->__pyx_codeobj_tab[153] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_remove_pool, __pyx_mstate->__pyx_kp_b_iso88591_A_t7_avQ_1_vQ_8_4wat1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[153])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3382}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_futures, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_distance, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[154] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_update_created_pools, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_HD_1_t_IQa_4wd_1_Q_t5_4q_9C, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[154])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3415}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[155] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_down, __pyx_mstate->__pyx_kp_b_iso88591_A_1_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[155])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3424}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[156] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_remove, __pyx_mstate->__pyx_kp_b_iso88591_A_HAQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[156])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3428}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace}; __pyx_mstate_global->__pyx_codeobj_tab[157] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_keyspace, __pyx_mstate->__pyx_kp_b_iso88591_A_HA_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[157])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3435}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_remaining_callbacks, __pyx_mstate->__pyx_n_u_errors, __pyx_mstate->__pyx_n_u_pool_finished_setting_keyspace, __pyx_mstate->__pyx_n_u_pool_finished_setting_keyspace, __pyx_mstate->__pyx_n_u_pool}; __pyx_mstate_global->__pyx_codeobj_tab[158] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_keyspace_for_all_pools, __pyx_mstate->__pyx_kp_b_iso88591_A_A_Qd_4q_AQ_HE_gWA_AZq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[158])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3462}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_keyspace, __pyx_mstate->__pyx_n_u_user_type, __pyx_mstate->__pyx_n_u_klass, __pyx_mstate->__pyx_n_u_ks_meta, __pyx_mstate->__pyx_n_u_type_meta, __pyx_mstate->__pyx_n_u_field_names, __pyx_mstate->__pyx_n_u_encode, __pyx_mstate->__pyx_n_u_encode}; __pyx_mstate_global->__pyx_codeobj_tab[159] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_user_type_registered, __pyx_mstate->__pyx_kp_b_iso88591_A_d_Qa_a_YYZ_1_a_1_iq_HHAYa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[159])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 3490}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[160] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_submit, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_4xy_q_XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[160])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3495}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[161] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_pool_state, __pyx_mstate->__pyx_kp_b_iso88591_A_2Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[161])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3498}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[162] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_pools, __pyx_mstate->__pyx_kp_b_iso88591_A_t7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[162])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3501}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_attr_name, __pyx_mstate->__pyx_n_u_value}; __pyx_mstate_global->__pyx_codeobj_tab[163] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_validate_set_legacy_config, __pyx_mstate->__pyx_kp_b_iso88591_A_4x_S_1_A_q_d_Kq_H_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[163])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 3522}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_control_connection, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[164] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_IQgXQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[164])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3526}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[165] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_try_reconnect, __pyx_mstate->__pyx_kp_b_iso88591_A_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[165])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3529}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2}; __pyx_mstate_global->__pyx_codeobj_tab[166] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_reconnection, __pyx_mstate->__pyx_kp_b_iso88591_A_31A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[166])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3532}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exc, __pyx_mstate->__pyx_n_u_next_delay}; __pyx_mstate_global->__pyx_codeobj_tab[167] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_exception, __pyx_mstate->__pyx_kp_b_iso88591_A_Qe1_1_vQ_J_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[167])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 3541}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_obj_weakref, __pyx_mstate->__pyx_n_u_method_name, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_obj}; __pyx_mstate_global->__pyx_codeobj_tab[168] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_watch_callback, __pyx_mstate->__pyx_kp_b_iso88591_Q_t3a_1E_Rxq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[168])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3552}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_conn, __pyx_mstate->__pyx_n_u_expiring_weakref}; __pyx_mstate_global->__pyx_codeobj_tab[169] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_clear_watcher, __pyx_mstate->__pyx_kp_b_iso88591__15, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[169])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {8, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3605}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_cluster, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_schema_event_refresh_window, __pyx_mstate->__pyx_n_u_topology_event_refresh_window, __pyx_mstate->__pyx_n_u_status_event_refresh_window, __pyx_mstate->__pyx_n_u_schema_meta_enabled_2, __pyx_mstate->__pyx_n_u_token_meta_enabled_2}; __pyx_mstate_global->__pyx_codeobj_tab[170] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_L_vQa_O1_L_A_a_A_A_1_IU_d_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[170])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3631}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[171] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_connect, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_Ya_9_IYit_c_PQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[171])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3640}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_conn, __pyx_mstate->__pyx_n_u_old}; __pyx_mstate_global->__pyx_codeobj_tab[172] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_new_connection, __pyx_mstate->__pyx_kp_b_iso88591_A_a_q_1_vQ_a_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[172])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3652}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_errors, __pyx_mstate->__pyx_n_u_lbp, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[173] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_reconnect_internal, __pyx_mstate->__pyx_kp_b_iso88591_A_9N_HC_q_t_as_4_Q_81_LFR_I_7q_e, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[173])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3683}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_e, __pyx_mstate->__pyx_n_u_self_weakref, __pyx_mstate->__pyx_n_u_sel_peers, __pyx_mstate->__pyx_n_u_sel_local, __pyx_mstate->__pyx_n_u_peers_query, __pyx_mstate->__pyx_n_u_local_query, __pyx_mstate->__pyx_n_u_peers_success, __pyx_mstate->__pyx_n_u_peers_result, __pyx_mstate->__pyx_n_u_local_success, __pyx_mstate->__pyx_n_u_local_result, __pyx_mstate->__pyx_n_u_shared_results}; __pyx_mstate_global->__pyx_codeobj_tab[174] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_try_connect, __pyx_mstate->__pyx_kp_b_iso88591_A_6_Gq_T_Qd_Mccd_4q_fA_1_I_0_4t9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[174])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3751}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[175] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_reconnect_2, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_HAT, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[175])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3757}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_schedule}; __pyx_mstate_global->__pyx_codeobj_tab[176] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_reconnect, __pyx_mstate->__pyx_kp_b_iso88591_A_6_AT_Q_t9_8_Q_Q_4q_gQ_H_i_1_vQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[176])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3783}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_new_handler, __pyx_mstate->__pyx_n_u_old}; __pyx_mstate_global->__pyx_codeobj_tab[177] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_and_set_reconnection_handle, __pyx_mstate->__pyx_kp_b_iso88591_A_a_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[177])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 3794}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[178] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_submit_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t4y_t9IWBha_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[178])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3802}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[179] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_shutdown, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_t1_A_vQa_t1_L_a_O1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[179])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 3819}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_force, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[180] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_schema, __pyx_mstate->__pyx_kp_b_iso88591_Q_t1_t_1D_fIQ_vQ_Fiq_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[180])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 3830}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_preloaded_results, __pyx_mstate->__pyx_n_u_schema_agreement_wait, __pyx_mstate->__pyx_n_u_force, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_agreed}; __pyx_mstate_global->__pyx_codeobj_tab[181] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_schema_2, __pyx_mstate->__pyx_kp_b_iso88591_BB___4y_1_q_0B_0_4t_T_vQa_1_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[181])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3850}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_force_token_rebuild}; __pyx_mstate_global->__pyx_codeobj_tab[182] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_node_list_and_token_map, __pyx_mstate->__pyx_kp_b_iso88591_a_t1_5Qd_H_q_vQ_WW_a_a_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[182])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 29, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3862}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_preloaded_results, __pyx_mstate->__pyx_n_u_force_token_rebuild, __pyx_mstate->__pyx_n_u_peers_result, __pyx_mstate->__pyx_n_u_local_result, __pyx_mstate->__pyx_n_u_cl, __pyx_mstate->__pyx_n_u_sel_peers, __pyx_mstate->__pyx_n_u_sel_local, __pyx_mstate->__pyx_n_u_peers_query, __pyx_mstate->__pyx_n_u_local_query, __pyx_mstate->__pyx_n_u_partitioner, __pyx_mstate->__pyx_n_u_token_map, __pyx_mstate->__pyx_n_u_found_hosts, __pyx_mstate->__pyx_n_u_local_rows, __pyx_mstate->__pyx_n_u_local_row, __pyx_mstate->__pyx_n_u_cluster_name, __pyx_mstate->__pyx_n_u_tokens, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_datacenter, __pyx_mstate->__pyx_n_u_rack, __pyx_mstate->__pyx_n_u_local_rpc_address_query, __pyx_mstate->__pyx_n_u_success, __pyx_mstate->__pyx_n_u_local_rpc_address_result, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_should_rebuild_token_map, __pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u__8, __pyx_mstate->__pyx_n_u_old_host}; __pyx_mstate_global->__pyx_codeobj_tab[183] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_node_list_and_token_map_2, __pyx_mstate->__pyx_kp_b_iso88591_1_1_vQa_AQ_AQ_Qd_t4q_6_D_6_D_av, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[183])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3996}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_row}; __pyx_mstate_global->__pyx_codeobj_tab[184] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_is_valid_peer, __pyx_mstate->__pyx_kp_b_iso88591_A_t1I_7q_T_D_TU_t1O4s_axq_gT_Ct1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[184])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4002}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_datacenter, __pyx_mstate->__pyx_n_u_rack}; __pyx_mstate_global->__pyx_codeobj_tab[185] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_update_location_info, __pyx_mstate->__pyx_kp_b_iso88591_A_4_3k_T_s_1_I_XQa_a_1_I_V1A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[185])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4014}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_event_type, __pyx_mstate->__pyx_n_u_delay_window, __pyx_mstate->__pyx_n_u_next_time, __pyx_mstate->__pyx_n_u_now, __pyx_mstate->__pyx_n_u_this_time, __pyx_mstate->__pyx_n_u_delay}; __pyx_mstate_global->__pyx_codeobj_tab[186] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_delay_for_event_type, __pyx_mstate->__pyx_kp_b_iso88591_A_D_d_q_d_Q_4s_A_Jb_F_Rq_Ba_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[186])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4028}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[187] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_nodes_if_not_up, __pyx_mstate->__pyx_kp_b_iso88591_A_4uCt4q_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[187])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4036}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_event, __pyx_mstate->__pyx_n_u_change_type, __pyx_mstate->__pyx_n_u_addr, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_delay}; __pyx_mstate_global->__pyx_codeobj_tab[188] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_handle_topology_change, __pyx_mstate->__pyx_kp_b_iso88591_A_e1A_gU_1_t9IYavQ_s_S_Cq_t_33a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[188])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4047}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_event, __pyx_mstate->__pyx_n_u_change_type, __pyx_mstate->__pyx_n_u_addr, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_delay}; __pyx_mstate_global->__pyx_codeobj_tab[189] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_handle_status_change, __pyx_mstate->__pyx_kp_b_iso88591_A_e1A_gU_1_t9IYavQ_s_D_a_A_uCq_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[189])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4067}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_event, __pyx_mstate->__pyx_n_u_delay}; __pyx_mstate_global->__pyx_codeobj_tab[190] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_handle_schema_change, __pyx_mstate->__pyx_kp_b_iso88591_A_4_Rq_D_IZ_q_t_Na, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[190])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4073}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_preloaded_results, __pyx_mstate->__pyx_n_u_wait_time, __pyx_mstate->__pyx_n_u_total_timeout, __pyx_mstate->__pyx_n_u_peers_result, __pyx_mstate->__pyx_n_u_local_result, __pyx_mstate->__pyx_n_u_schema_mismatches, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_n_u_elapsed, __pyx_mstate->__pyx_n_u_cl, __pyx_mstate->__pyx_n_u_select_peers_query, __pyx_mstate->__pyx_n_u_peers_query, __pyx_mstate->__pyx_n_u_local_query, __pyx_mstate->__pyx_n_u_timeout}; __pyx_mstate_global->__pyx_codeobj_tab[191] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_wait_for_schema_agreement, __pyx_mstate->__pyx_kp_b_iso88591_99QQR_Zwj_IQ_A_1_t1_t1_T_q_6_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[191])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4137}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_peers_result, __pyx_mstate->__pyx_n_u_local_result, __pyx_mstate->__pyx_n_u_local_address, __pyx_mstate->__pyx_n_u_versions, __pyx_mstate->__pyx_n_u_local_row, __pyx_mstate->__pyx_n_u_row, __pyx_mstate->__pyx_n_u_schema_ver, __pyx_mstate->__pyx_n_u_endpoint, __pyx_mstate->__pyx_n_u_peer, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[192] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_schema_mismatches, __pyx_mstate->__pyx_kp_b_iso88591_A_1L_1_aq_q_A_MYZZ_y_AQ_a_9_Qa_G, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[192])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4161}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_peers_query_type, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_query_template, __pyx_mstate->__pyx_n_u_host_release_version, __pyx_mstate->__pyx_n_u_host_dse_version, __pyx_mstate->__pyx_n_u_uses_native_address_query}; __pyx_mstate_global->__pyx_codeobj_tab[193] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_peers_query, __pyx_mstate->__pyx_kp_b_iso88591_1_HD_xt_RS_A_Ba_4q_4_a_1_5OtST, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[193])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4206}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[194] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_signal_error, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_t_D_A_t9IYat_q_1_1_d_m_LA_J, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[194])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4226}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[195] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_up, __pyx_mstate->__pyx_kp_b_iso88591_A_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[195])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4229}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_conn}; __pyx_mstate_global->__pyx_codeobj_tab[196] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_down, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_5_D_T_1_3a_vQa_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[196])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4239}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_refresh_nodes}; __pyx_mstate_global->__pyx_codeobj_tab[197] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_add, __pyx_mstate->__pyx_kp_b_iso88591_1_1_0_1EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[197])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4243}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_c}; __pyx_mstate_global->__pyx_codeobj_tab[198] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_remove, __pyx_mstate->__pyx_kp_b_iso88591_A_D_2T_Ct1_vQ_jjk_0_1EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[198])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4252}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_c}; __pyx_mstate_global->__pyx_codeobj_tab[199] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_connections, __pyx_mstate->__pyx_kp_b_iso88591_A_G1F_q_gQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[199])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4256}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2}; __pyx_mstate_global->__pyx_codeobj_tab[200] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_return_connection, __pyx_mstate->__pyx_kp_b_iso88591_A_c_z_S_RS, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[200])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4261}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_scheduler, __pyx_mstate->__pyx_n_u_thread}; __pyx_mstate_global->__pyx_codeobj_tab[201] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_stop_scheduler, __pyx_mstate->__pyx_kp_b_iso88591_4y_Ya_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[201])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4278}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_executor}; __pyx_mstate_global->__pyx_codeobj_tab[202] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_Je_1_Je1_M_iq_e1_Ja_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[202])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4288}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[203] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_shutdown, __pyx_mstate->__pyx_kp_b_iso88591_A_vQa_O1_G_b_3a_E, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[203])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 4298}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_delay, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[204] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_schedule, __pyx_mstate->__pyx_kp_b_iso88591_A_M_fE_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[204])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 4301}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_delay, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_task}; __pyx_mstate_global->__pyx_codeobj_tab[205] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_schedule_unique, __pyx_mstate->__pyx_kp_b_iso88591_A_F_q_fA_5_t1_QgQ_vQ_QQR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[205])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4308}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_delay, __pyx_mstate->__pyx_n_u_task, __pyx_mstate->__pyx_n_u_run_at}; __pyx_mstate_global->__pyx_codeobj_tab[206] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_insert_task, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_T_c_1_Qa_HD_Zq_vQ_DA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[206])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4316}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_run_at, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_task, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_future}; __pyx_mstate_global->__pyx_codeobj_tab[207] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_run, __pyx_mstate->__pyx_kp_b_iso88591_A_t1_Cwd_QfF_t1_1_vQa_wc_U_XQa_F, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[207])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4342}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_future, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[208] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_log_if_failed, __pyx_mstate->__pyx_kp_b_iso88591_A_fJa_1_xq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[208])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS), 4350}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_control_conn, __pyx_mstate->__pyx_n_u_response_future, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[209] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_refresh_schema_and_set_result, __pyx_mstate->__pyx_kp_b_iso88591_6_7Gq_VW_Qa_xwa_3Fa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[209])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {14, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4435}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_query, __pyx_mstate->__pyx_n_u_timeout, __pyx_mstate->__pyx_n_u_metrics, __pyx_mstate->__pyx_n_u_prepared_statement, __pyx_mstate->__pyx_n_u_retry_policy, __pyx_mstate->__pyx_n_u_row_factory, __pyx_mstate->__pyx_n_u_load_balancer_2, __pyx_mstate->__pyx_n_u_start_time, __pyx_mstate->__pyx_n_u_speculative_execution_plan, __pyx_mstate->__pyx_n_u_continuous_paging_state, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[210] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_9_q_SST_22PPQ_Kq_O_s_nCwha_Kq_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[210])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4461}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[211] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_time_remaining, __pyx_mstate->__pyx_kp_b_iso88591_A_4y_1_1_M_4z_4uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[211])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4467}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_spec_delay}; __pyx_mstate_global->__pyx_codeobj_tab[212] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_start_timer, __pyx_mstate->__pyx_kp_b_iso88591_A_4xs_2_a_Q_4_5_47H_hh6G_TUUaaee, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[212])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4477}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[213] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_cancel_timer, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_wa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[213])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4481}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_attempts, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_errors, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[214] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_timeout, __pyx_mstate->__pyx_kp_b_iso88591_4_CuD_A_hh_A_q_N_Jb_4_G1_L_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[214])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4536}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[215] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_on_speculative_execute, __pyx_mstate->__pyx_kp_b_iso88591_A_Ja_4t7_t4q_Jd_2C_PQQWW_t_G1_4, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[215])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4558}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[216] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_make_query_plan_2, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_at1_d_4_6Fat8S_bbc, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[216])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4570}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_error_no_hosts, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_req_id_2}; __pyx_mstate_global->__pyx_codeobj_tab[217] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_send_request, __pyx_mstate->__pyx_kp_b_iso88591_1_HD_T_wgQ_Kq_q_t9G5_D_S_m2TQR, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[217])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4587}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_cb, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_request_id_2, __pyx_mstate->__pyx_n_u_result_meta, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[218] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_query_2, __pyx_mstate->__pyx_kp_b_iso88591_83a_d_t87_aq_4q_4AQ_1_4AQ_1_Q_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[218])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4633}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[219] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_has_more_pages, __pyx_mstate->__pyx_kp_b_iso88591_A_t_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[219])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4644}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[220] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_warnings_2, __pyx_mstate->__pyx_kp_b_iso88591_A_4t7_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[220])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4662}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[221] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_custom_payload, __pyx_mstate->__pyx_kp_b_iso88591_A_4t7_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[221])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4680}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[222] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_start_fetching_next_page, __pyx_mstate->__pyx_kp_b_iso88591_A_4t1_Q_H_D_G6_Q_M_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[222])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4701}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_prepare_message, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_cb, __pyx_mstate->__pyx_n_u_request_id_2}; __pyx_mstate_global->__pyx_codeobj_tab[223] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_reprepare, __pyx_mstate->__pyx_kp_b_iso88591_A_WAT_Gv_YZ_T_8_1_c_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[223])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4708}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_trace_id, __pyx_mstate->__pyx_n_u_session, __pyx_mstate->__pyx_n_u_retry_policy, __pyx_mstate->__pyx_n_u_retry_2, __pyx_mstate->__pyx_n_u_cl, __pyx_mstate->__pyx_n_u_query_id, __pyx_mstate->__pyx_n_u_prepared_statement, __pyx_mstate->__pyx_n_u_current_keyspace, __pyx_mstate->__pyx_n_u_prepared_keyspace, __pyx_mstate->__pyx_n_u_prepare_message, __pyx_mstate->__pyx_n_u_msg, __pyx_mstate->__pyx_n_u_exc}; __pyx_mstate_global->__pyx_codeobj_tab[224] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_result, __pyx_mstate->__pyx_kp_b_iso88591_A_A_q_aq_waz_Q_q_4t1_N_AZt1_WAZ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[224])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4860}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_response}; __pyx_mstate_global->__pyx_codeobj_tab[225] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_handle_continuous_paging_first, __pyx_mstate->__pyx_kp_b_iso88591_A_4RRSS_SWWiijSWWXSWWX_1_at_ha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[225])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4868}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_errors}; __pyx_mstate_global->__pyx_codeobj_tab[226] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_keyspace_completed, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_1_Q_9_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[226])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4875}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_connection_2, __pyx_mstate->__pyx_n_u_pool, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_new_metadata_id, __pyx_mstate->__pyx_n_u_request_id_2}; __pyx_mstate_global->__pyx_codeobj_tab[227] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_execute_after_prepare, __pyx_mstate->__pyx_kp_b_iso88591_A_1_1_4q_Qj_xvS_4q_t_j_81_1_F_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[227])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4929}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_to_call, __pyx_mstate->__pyx_n_u_callback_partial, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[228] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_final_result, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4z_y_U_Rt1_e1_G4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[228])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4951}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_to_call, __pyx_mstate->__pyx_n_u_callback_partial, __pyx_mstate->__pyx_n_u_genexpr, __pyx_mstate->__pyx_n_u_genexpr}; __pyx_mstate_global->__pyx_codeobj_tab[229] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_final_exception, __pyx_mstate->__pyx_kp_b_iso88591_A_N_4z_y_U_Rt1_A_e1_G4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[229])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4972}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_retry_decision, __pyx_mstate->__pyx_n_u_response, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_exception_from_response, __pyx_mstate->__pyx_n_u_exception_from_response, __pyx_mstate->__pyx_n_u_retry_type, __pyx_mstate->__pyx_n_u_consistency, __pyx_mstate->__pyx_n_u_reuse}; __pyx_mstate_global->__pyx_codeobj_tab[230] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_handle_retry_decision, __pyx_mstate->__pyx_kp_b_iso88591_A_N_d_X_1_Ks_Q_q_A_a_Q_Qa_t_WA_I, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[230])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4994}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_reuse_connection, __pyx_mstate->__pyx_n_u_consistency_level, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[231] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_retry, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_4z_WA_Q_HG1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[231])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5008}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_reuse_connection, __pyx_mstate->__pyx_n_u_host}; __pyx_mstate_global->__pyx_codeobj_tab[232] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_retry_task, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_D_G1F_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[232])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5020}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[233] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_result, __pyx_mstate->__pyx_kp_b_iso88591_A2_G5_4_gQ_9AV4q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[233])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5051}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_trace}; __pyx_mstate_global->__pyx_codeobj_tab[234] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_query_trace_ids, __pyx_mstate->__pyx_kp_b_iso88591_A_q_Zt9D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[234])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5057}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_wait, __pyx_mstate->__pyx_n_u_query_cl}; __pyx_mstate_global->__pyx_codeobj_tab[235] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_query_trace_2, __pyx_mstate->__pyx_kp_b_iso88591_66Fa_4_c_d2DCq_4q_4_AT1A_3jPQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[235])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5078}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_wait_per, __pyx_mstate->__pyx_n_u_query_cl, __pyx_mstate->__pyx_n_u_i}; __pyx_mstate_global->__pyx_codeobj_tab[236] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_all_query_traces, __pyx_mstate->__pyx_kp_b_iso88591_Oq_4q_1D_T_eSTTWWXX_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[236])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5088}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_max_wait, __pyx_mstate->__pyx_n_u_query_cl, __pyx_mstate->__pyx_n_u_trace}; __pyx_mstate_global->__pyx_codeobj_tab[237] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_query_trace, __pyx_mstate->__pyx_kp_b_iso88591_A_N_1_4uA_9Jiq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[237])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 5094}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_run_now}; __pyx_mstate_global->__pyx_codeobj_tab[238] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_callback, __pyx_mstate->__pyx_kp_b_iso88591_AJ_7_D_a_t_1_at_HA_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[238])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS), 5143}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fn, __pyx_mstate->__pyx_n_u_args, __pyx_mstate->__pyx_n_u_kwargs, __pyx_mstate->__pyx_n_u_run_now}; __pyx_mstate_global->__pyx_codeobj_tab[239] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_errback, __pyx_mstate->__pyx_kp_b_iso88591_A_4vQ_t1_1_at_xq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[239])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {7, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5161}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_errback, __pyx_mstate->__pyx_n_u_callback_args, __pyx_mstate->__pyx_n_u_callback_kwargs, __pyx_mstate->__pyx_n_u_errback_args, __pyx_mstate->__pyx_n_u_errback_kwargs}; __pyx_mstate_global->__pyx_codeobj_tab[240] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_add_callbacks, __pyx_mstate->__pyx_kp_b_iso88591_A_q_M_77Gs_L_4O3a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[240])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5189}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[241] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_clear_callbacks, __pyx_mstate->__pyx_kp_b_iso88591_A_a_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[241])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5194}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result}; __pyx_mstate_global->__pyx_codeobj_tab[242] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_str, __pyx_mstate->__pyx_kp_b_iso88591_A_d_N_a_q_hd_HD8K4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[242])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5233}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_response_future, __pyx_mstate->__pyx_n_u_initial_response}; __pyx_mstate_global->__pyx_codeobj_tab[243] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_init, __pyx_mstate->__pyx_kp_b_iso88591_A_q_O1_O1_aq_N_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[243])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5241}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[244] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_has_more_pages, __pyx_mstate->__pyx_kp_b_iso88591_A_t_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[244])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5248}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[245] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_current_rows_2, __pyx_mstate->__pyx_kp_b_iso88591_A_t_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[245])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5256}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[246] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_all, __pyx_mstate->__pyx_kp_b_iso88591_A_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[246])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5265}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_row}; __pyx_mstate_global->__pyx_codeobj_tab[247] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_one, __pyx_mstate->__pyx_kp_b_iso88591_A_a_4q_d_d_4q_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[247])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5281}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[248] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_iter, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_4q_A_N_at1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[248])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5287}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[249] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_next, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_A_t4_q_4t1_4t_1_d_4q_4uA_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[249])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5310}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result}; __pyx_mstate_global->__pyx_codeobj_tab[250] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_fetch_next_page, __pyx_mstate->__pyx_kp_b_iso88591_A_4_q_9_T_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[250])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5323}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_result}; __pyx_mstate_global->__pyx_codeobj_tab[251] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_set_current_rows, __pyx_mstate->__pyx_kp_b_iso88591_A_Qha, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[251])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5333}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[252] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_fetch_all, __pyx_mstate->__pyx_kp_b_iso88591_A_T_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[252])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5337}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_operator}; __pyx_mstate_global->__pyx_codeobj_tab[253] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_enter_list_mode, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_4q_a_PPRRS_4_q_xq_bbc_Kq_N, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[253])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5347}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_other}; __pyx_mstate_global->__pyx_codeobj_tab[254] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_eq, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_t_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[254])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5351}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_i}; __pyx_mstate_global->__pyx_codeobj_tab[255] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_getitem, __pyx_mstate->__pyx_kp_b_iso88591_A_2S_9_Qa_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[255])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5358}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[256] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_nonzero, __pyx_mstate->__pyx_kp_b_iso88591_A_t1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[256])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5363}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_wait_sec}; __pyx_mstate_global->__pyx_codeobj_tab[257] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_query_trace_2, __pyx_mstate->__pyx_kp_b_iso88591_a_t_31A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[257])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5370}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_max_wait_sec_per}; __pyx_mstate_global->__pyx_codeobj_tab[258] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_get_all_query_traces, __pyx_mstate->__pyx_kp_b_iso88591_1_t_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[258])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5377}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[259] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_cancel_continuous_paging, __pyx_mstate->__pyx_kp_b_iso88591_A_7, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[259])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5383}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_is_batch_statement, __pyx_mstate->__pyx_n_u_row}; __pyx_mstate_global->__pyx_codeobj_tab[260] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_was_applied, __pyx_mstate->__pyx_kp_b_iso88591_A_4_H4I_WX_a_TTXXhhi_Zq_HA_e4t_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[260])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 5410}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[261] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_cassandra_cluster_py, __pyx_mstate->__pyx_n_u_paging_state, __pyx_mstate->__pyx_kp_b_iso88591_A_t_1_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[261])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; bad: Py_DECREF(tuple_dedup_map); return -1; } /* #### Code section: init_globals ### */ static int __Pyx_InitGlobals(void) { /* PythonCompatibility.init */ if (likely(__Pyx_init_co_variables() == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CommonTypesMetaclass.init */ if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CachedMethodType.init */ #if CYTHON_COMPILING_IN_LIMITED_API { PyObject *typesModule=NULL; typesModule = PyImport_ImportModule("types"); if (typesModule) { __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); } } // error handling follows #endif if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CythonFunctionShared.init */ if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* Generator.init */ if (likely(__pyx_Generator_init(__pyx_m) == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- 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 /* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ #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); for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else 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); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *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 } #endif /* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ #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); return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, "name '%U' is not defined", name); } return result; } /* TupleAndListFromArray (used by fastcall) */ #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; Py_ssize_t i; if (n <= 0) { return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } Py_INCREF(src[i]); } return res; } #elif CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *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_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals (used by fastcall) */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL return PyObject_RichCompareBool(s1, s2, equals); #else int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length, length2; int kind; void *data1, *data2; #if !CYTHON_COMPILING_IN_LIMITED_API if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(length < 0)) return -1; #endif length2 = __Pyx_PyUnicode_GET_LENGTH(s2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(length2 < 0)) return -1; #endif if (length != length2) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: return (equals == Py_EQ); return_ne: return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(n == -1)) return NULL; #endif for (i = 0; i < n; i++) { PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!namei)) return NULL; #endif if (s == namei) return kwvalues[i]; } for (i = 0; i < n; i++) { PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!namei)) return NULL; #endif int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs; PyObject *dict; #if !CYTHON_ASSUME_SAFE_SIZE nkwargs = PyTuple_Size(kwnames); if (unlikely(nkwargs < 0)) return NULL; #else nkwargs = PyTuple_GET_SIZE(kwnames); #endif dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; itp_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_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { if (!PyErr_Occurred()) PyErr_SetNone(PyExc_NameError); return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } PyErr_Clear(); #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return result; } #else result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* HasAttr (used by ImportImpl) */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!PyUnicode_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (!r) { return (unlikely(PyErr_Occurred())) ? -1 : 0; } else { Py_DECREF(r); return 1; } } #endif /* PyObjectCall (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall(" 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 /* PyObjectCallMethO (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall(" 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 /* PyObjectFastCall (used by PyObjectCallOneArg) */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x03090000 #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) #elif CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { PyTypeObject *tp = Py_TYPE(callable); #if defined(__Pyx_CyFunction_USED) if (__Pyx_CyFunction_CheckExact(callable)) { return __Pyx_CyFunction_func_vectorcall(callable); } #endif if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { return NULL; } assert(PyCallable_Check(callable)); Py_ssize_t offset = tp->tp_vectorcall_offset; assert(offset > 0); vectorcallfunc ptr; memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); return ptr; } #else #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if CYTHON_COMPILING_IN_LIMITED_API return PyObject_Vectorcall(func, args, _nargs, NULL); #else vectorcallfunc f = __Pyx_PyVectorcall_Function(func); if (f) { return f(func, args, _nargs, NULL); } #endif #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* PyObjectCallOneArg (used by ImportImpl) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* ImportImpl (used by Import) */ static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { PyObject *imported_module = PyImport_GetModule(qualname); if (unlikely(!imported_module)) { *module = NULL; if (PyErr_Occurred()) { return -1; } return 0; } *module = imported_module; return 1; } static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { PyObject *imported_module; PyObject *top_level_package_name; Py_ssize_t i; int status, module_found; Py_ssize_t dot_index; module_found = __Pyx__Import_GetModule(qualname, &imported_module); if (unlikely(!module_found || module_found == -1)) { *module = NULL; return module_found; } if (imported_names) { for (i = 0; i < len_imported_names; i++) { PyObject *imported_name = imported_names[i]; #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); #else int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); if (unlikely(has_imported_attribute == -1)) goto error; #endif if (!has_imported_attribute) { goto not_found; } } *module = imported_module; return 1; } dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); if (dot_index == -1) { *module = imported_module; return 1; } if (unlikely(dot_index == -2)) goto error; top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); if (unlikely(!top_level_package_name)) goto error; Py_DECREF(imported_module); status = __Pyx__Import_GetModule(top_level_package_name, module); Py_DECREF(top_level_package_name); return status; error: Py_DECREF(imported_module); *module = NULL; return -1; not_found: Py_DECREF(imported_module); *module = NULL; return 0; } static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *from_list = 0; int module_found; if (!qualname) { qualname = name; } module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); if (likely(module_found == 1)) { return module; } else if (unlikely(module_found == -1)) { return NULL; } empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; if (imported_names) { #if CYTHON_COMPILING_IN_CPYTHON from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); if (unlikely(!from_list)) goto bad; #else from_list = PyList_New(len_imported_names); if (unlikely(!from_list)) goto bad; for (Py_ssize_t i=0; i__pyx_d, level); } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ CYTHON_COMPILING_IN_GRAAL { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, "cannot import name %S", name); } return value; } /* PyObjectFastCallMethod */ #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { PyObject *result; PyObject *attr = PyObject_GetAttr(args[0], name); if (unlikely(!attr)) return NULL; result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); Py_DECREF(attr); return result; } #endif /* GetTopmostException (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == 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 && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif 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; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else 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 } #endif /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); 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); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } 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); for (i=0; i= 0x030C0000 local_value = tstate->current_exception; tstate->current_exception = 0; #else 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; #endif #elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 local_value = PyErr_GetRaisedException(); #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif #if __PYX_LIMITED_VERSION_HEX > 0x030C0000 if (likely(local_value)) { local_type = (PyObject*) Py_TYPE(local_value); Py_INCREF(local_type); local_tb = PyException_GetTraceback(local_value); } #else 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 (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 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; #if PY_VERSION_HEX >= 0x030B00a4 tmp_value = exc_info->exc_value; exc_info->exc_value = local_value; tmp_type = NULL; tmp_tb = NULL; Py_XDECREF(local_type); Py_XDECREF(local_tb); #else 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; #endif } #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); #elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 PyErr_SetHandledException(local_value); Py_XDECREF(local_value); Py_XDECREF(local_type); Py_XDECREF(local_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; #if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; #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 && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; tmp_value = exc_info->exc_value; exc_info->exc_value = *value; if (tmp_value == NULL || tmp_value == Py_None) { Py_XDECREF(tmp_value); tmp_value = NULL; tmp_type = NULL; tmp_tb = NULL; } else { tmp_type = (PyObject*) Py_TYPE(tmp_value); Py_INCREF(tmp_type); #if CYTHON_COMPILING_IN_CPYTHON tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; Py_XINCREF(tmp_tb); #else tmp_tb = PyException_GetTraceback(tmp_value); #endif } #elif 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 /* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { PyObject *result; PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); if (unlikely(!selfless_args)) return NULL; result = PyObject_Call(method, selfless_args, kwargs); Py_DECREF(selfless_args); return result; } #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { return _PyObject_Vectorcall (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); } #else static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { return #if PY_VERSION_HEX < 0x03090000 _PyObject_Vectorcall #else PyObject_Vectorcall #endif (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); } #endif static PyMethodDef __Pyx_UnboundCMethod_Def = { "CythonUnboundCMethod", __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 METH_VARARGS | METH_KEYWORDS, #else METH_FASTCALL | METH_KEYWORDS, #endif NULL }; static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method, *result=NULL; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; result = method; #if CYTHON_COMPILING_IN_CPYTHON if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) { 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); } else #endif #if CYTHON_COMPILING_IN_PYPY #else if (PyCFunction_Check(method)) #endif { PyObject *self; int self_found; #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY self = PyObject_GetAttrString(method, "__self__"); if (!self) { PyErr_Clear(); } #else self = PyCFunction_GET_SELF(method); #endif self_found = (self && self != Py_None); #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY Py_XDECREF(self); #endif if (self_found) { PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); if (unlikely(!unbound_method)) return -1; Py_DECREF(method); result = unbound_method; } } #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING if (unlikely(target->method)) { Py_DECREF(result); } else #endif target->method = result; return 0; } /* CallUnboundCMethod0 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); if (likely(was_initialized == 2 && cfunc->func)) { if (likely(cfunc->flag == METH_NOARGS)) return __Pyx_CallCFunction(cfunc, self, NULL); if (likely(cfunc->flag == METH_FASTCALL)) return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (cfunc->flag == METH_VARARGS) return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); return __Pyx__CallUnboundCMethod0(cfunc, self); } #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING else if (unlikely(was_initialized == 1)) { __Pyx_CachedCFunction tmp_cfunc = { #ifndef __cplusplus 0 #endif }; tmp_cfunc.type = cfunc->type; tmp_cfunc.method_name = cfunc->method_name; return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); } #endif PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); return result; } #endif static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *result; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; result = __Pyx_PyObject_CallOneArg(cfunc->method, self); return result; } /* py_dict_items (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); } /* py_dict_values (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); } /* OwnedDictNext (used by ParseKeywordsImpl) */ #if CYTHON_AVOID_BORROWED_REFS static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { PyObject *next = NULL; if (!*ppos) { if (pvalue) { PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); if (unlikely(!dictview)) goto bad; *ppos = PyObject_GetIter(dictview); Py_DECREF(dictview); } else { *ppos = PyObject_GetIter(p); } if (unlikely(!*ppos)) goto bad; } next = PyIter_Next(*ppos); if (!next) { if (PyErr_Occurred()) goto bad; return 0; } if (pkey && pvalue) { *pkey = __Pyx_PySequence_ITEM(next, 0); if (unlikely(*pkey)) goto bad; *pvalue = __Pyx_PySequence_ITEM(next, 1); if (unlikely(*pvalue)) goto bad; Py_DECREF(next); } else if (pkey) { *pkey = next; } else { assert(pvalue); *pvalue = next; } return 1; bad: Py_XDECREF(next); #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); #else PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); #endif if (pkey) *pkey = NULL; if (pvalue) *pvalue = NULL; return 0; } #else // !CYTHON_AVOID_BORROWED_REFS static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { int result = PyDict_Next(p, ppos, pkey, pvalue); if (likely(result == 1)) { if (pkey) Py_INCREF(*pkey); if (pvalue) Py_INCREF(*pvalue); } return result; } #endif /* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, "%s() got multiple values for keyword argument '%U'", func_name, kw_name); } /* CallUnboundCMethod2 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); if (likely(was_initialized == 2 && cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { return __Pyx_CallCFunctionFast(cfunc, self, args, 2); } if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); } #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING else if (unlikely(was_initialized == 1)) { __Pyx_CachedCFunction tmp_cfunc = { #ifndef __cplusplus 0 #endif }; tmp_cfunc.type = cfunc->type; tmp_cfunc.method_name = cfunc->method_name; return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); } #endif PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); return result; } #endif static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ 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)) { PyObject *result = NULL; PyObject *args = PyTuple_New(2); if (unlikely(!args)) return NULL; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); else result = __Pyx_CallCFunction(cfunc, self, args); Py_DECREF(args); return result; } #endif { PyObject *args[4] = {NULL, self, arg1, arg2}; return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } } /* ParseKeywordsImpl (used by ParseKeywords) */ static int __Pyx_ValidateDuplicatePosArgs( PyObject *kwds, PyObject ** const argnames[], PyObject ** const *first_kw_arg, const char* function_name) { PyObject ** const *name = argnames; while (name != first_kw_arg) { PyObject *key = **name; int found = PyDict_Contains(kwds, key); if (unlikely(found)) { if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; } name++; } return 0; bad: return -1; } #if CYTHON_USE_UNICODE_INTERNALS static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { int kind; Py_ssize_t len = PyUnicode_GET_LENGTH(s1); if (len != PyUnicode_GET_LENGTH(s2)) return 0; kind = PyUnicode_KIND(s1); if (kind != PyUnicode_KIND(s2)) return 0; const void *data1 = PyUnicode_DATA(s1); const void *data2 = PyUnicode_DATA(s2); return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); } #endif static int __Pyx_MatchKeywordArg_str( PyObject *key, PyObject ** const argnames[], PyObject ** const *first_kw_arg, size_t *index_found, const char *function_name) { PyObject ** const *name; #if CYTHON_USE_UNICODE_INTERNALS Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; if (unlikely(key_hash == -1)) { key_hash = PyObject_Hash(key); if (unlikely(key_hash == -1)) goto bad; } #endif name = first_kw_arg; while (*name) { PyObject *name_str = **name; #if CYTHON_USE_UNICODE_INTERNALS if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { *index_found = (size_t) (name - argnames); return 1; } #else #if CYTHON_ASSUME_SAFE_SIZE if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) #endif { int cmp = PyUnicode_Compare(name_str, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { *index_found = (size_t) (name - argnames); return 1; } } #endif name++; } name = argnames; while (name != first_kw_arg) { PyObject *name_str = **name; #if CYTHON_USE_UNICODE_INTERNALS if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { if (__Pyx_UnicodeKeywordsEqual(name_str, key)) goto arg_passed_twice; } #else #if CYTHON_ASSUME_SAFE_SIZE if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) #endif { if (unlikely(name_str == key)) goto arg_passed_twice; int cmp = PyUnicode_Compare(name_str, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; } #endif name++; } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; bad: return -1; } static int __Pyx_MatchKeywordArg_nostr( PyObject *key, PyObject ** const argnames[], PyObject ** const *first_kw_arg, size_t *index_found, const char *function_name) { PyObject ** const *name; if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; name = first_kw_arg; while (*name) { int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); if (cmp == 1) { *index_found = (size_t) (name - argnames); return 1; } if (unlikely(cmp == -1)) goto bad; name++; } name = argnames; while (name != first_kw_arg) { int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); if (unlikely(cmp != 0)) { if (cmp == 1) goto arg_passed_twice; else goto bad; } name++; } 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; bad: return -1; } static CYTHON_INLINE int __Pyx_MatchKeywordArg( PyObject *key, PyObject ** const argnames[], PyObject ** const *first_kw_arg, size_t *index_found, const char *function_name) { return likely(PyUnicode_CheckExact(key)) ? __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); } static void __Pyx_RejectUnknownKeyword( PyObject *kwds, PyObject ** const argnames[], PyObject ** const *first_kw_arg, const char *function_name) { #if CYTHON_AVOID_BORROWED_REFS PyObject *pos = NULL; #else Py_ssize_t pos = 0; #endif PyObject *key = NULL; __Pyx_BEGIN_CRITICAL_SECTION(kwds); while ( #if CYTHON_AVOID_BORROWED_REFS __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) #else PyDict_Next(kwds, &pos, &key, NULL) #endif ) { PyObject** const *name = first_kw_arg; while (*name && (**name != key)) name++; if (!*name) { size_t index_found = 0; int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); if (cmp != 1) { if (cmp == 0) { PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(key); #endif break; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(key); #endif } __Pyx_END_CRITICAL_SECTION(); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(pos); #endif assert(PyErr_Occurred()); } static int __Pyx_ParseKeywordDict( PyObject *kwds, PyObject ** const argnames[], PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs) { PyObject** const *name; PyObject** const *first_kw_arg = argnames + num_pos_args; Py_ssize_t extracted = 0; #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; #endif name = first_kw_arg; while (*name && num_kwargs > extracted) { PyObject * key = **name; PyObject *value; int found = 0; #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 found = PyDict_GetItemRef(kwds, key, &value); #else value = PyDict_GetItemWithError(kwds, key); if (value) { Py_INCREF(value); found = 1; } else { if (unlikely(PyErr_Occurred())) goto bad; } #endif if (found) { if (unlikely(found < 0)) goto bad; values[name-argnames] = value; extracted++; } name++; } if (num_kwargs > extracted) { if (ignore_unknown_kwargs) { if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) goto bad; } else { __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); goto bad; } } return 0; bad: return -1; } static int __Pyx_ParseKeywordDictToDict( PyObject *kwds, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject** const *name; PyObject** const *first_kw_arg = argnames + num_pos_args; Py_ssize_t len; #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; #endif if (PyDict_Update(kwds2, kwds) < 0) goto bad; name = first_kw_arg; while (*name) { PyObject *key = **name; PyObject *value; #if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) int found = PyDict_Pop(kwds2, key, &value); if (found) { if (unlikely(found < 0)) goto bad; values[name-argnames] = value; } #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 int found = PyDict_GetItemRef(kwds2, key, &value); if (found) { if (unlikely(found < 0)) goto bad; values[name-argnames] = value; if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; } #else #if CYTHON_COMPILING_IN_CPYTHON value = _PyDict_Pop(kwds2, key, kwds2); #else value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); #endif if (value == kwds2) { Py_DECREF(value); } else { if (unlikely(!value)) goto bad; values[name-argnames] = value; } #endif name++; } len = PyDict_Size(kwds2); if (len > 0) { return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); } else if (unlikely(len == -1)) { goto bad; } return 0; bad: return -1; } static int __Pyx_ParseKeywordsTuple( PyObject *kwds, PyObject * const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs) { PyObject *key = NULL; PyObject** const * name; PyObject** const *first_kw_arg = argnames + num_pos_args; for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); #else key = __Pyx_PyTuple_GET_ITEM(kwds, pos); #endif #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!key)) goto bad; #endif name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { PyObject *value = kwvalues[pos]; values[name-argnames] = __Pyx_NewRef(value); } else { size_t index_found = 0; int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); if (cmp == 1) { PyObject *value = kwvalues[pos]; values[index_found] = __Pyx_NewRef(value); } else { if (unlikely(cmp == -1)) goto bad; if (kwds2) { PyObject *value = kwvalues[pos]; if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else if (!ignore_unknown_kwargs) { goto invalid_keyword; } } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(key); key = NULL; #endif } return 0; invalid_keyword: PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); goto bad; bad: #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(key); #endif return -1; } /* ParseKeywords */ static int __Pyx_ParseKeywords( PyObject *kwds, PyObject * const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs) { if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); else if (kwds2) return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); else return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); } /* 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); } /* 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) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign exc_type = __Pyx_PyErr_CurrentExceptionType(); if (unlikely(exc_type)) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return -1; __Pyx_PyErr_Clear(); return 0; } return 0; } /* UnpackItemEndCheck */ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } return __Pyx_IterFinish(); } /* PyObjectCall2Args (used by PyObjectCallMethod1) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod (used by PyObjectCallMethod1) */ #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetFullyQualifiedName(tp); PyErr_Format(PyExc_AttributeError, "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } #endif /* PyObjectCallMethod1 (used by append) */ #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) PyObject *args[2] = {obj, arg}; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); #endif } /* append */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_mstate_global->__pyx_n_u_append, x); if (unlikely(!retval)) return -1; Py_DECREF(retval); } return 0; } /* 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); return PyObject_SetAttr(obj, attr_name, value); } #endif /* PyObjectVectorCallKwBuilder */ #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); args[n] = value; return 0; } CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_VectorcallBuilder_AddArgStr; if (unlikely(!PyUnicode_Check(key))) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); return -1; } return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); } static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { PyObject *pyKey = PyUnicode_FromString(key); if (!pyKey) return -1; return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); } #else // CYTHON_VECTORCALL CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { if (unlikely(!PyUnicode_Check(key))) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); return -1; } return PyDict_SetItem(builder, key, value); } #endif /* RaiseClosureNameError */ static void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* dict_setdefault (used by FetchCommonType) */ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { PyObject* value; #if __PYX_LIMITED_VERSION_HEX >= 0x030F0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4) PyDict_SetDefaultRef(d, key, default_value, &value); #elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 PyObject *args[] = {d, key, default_value}; value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #elif CYTHON_COMPILING_IN_LIMITED_API value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); #else value = PyDict_SetDefault(d, key, default_value); if (unlikely(!value)) return NULL; Py_INCREF(value); #endif return value; } /* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static Py_ssize_t __Pyx_GetTypeDictOffset(void) { PyObject *tp_dictoffset_o; Py_ssize_t tp_dictoffset; tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); if (unlikely(!tp_dictoffset_o)) return -1; tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); Py_DECREF(tp_dictoffset_o); if (unlikely(tp_dictoffset == 0)) { PyErr_SetString( PyExc_TypeError, "'type' doesn't have a dictoffset"); return -1; } else if (unlikely(tp_dictoffset < 0)) { PyErr_SetString( PyExc_TypeError, "'type' has an unexpected negative dictoffset. " "Please report this as Cython bug"); return -1; } return tp_dictoffset; } static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { static Py_ssize_t tp_dictoffset = 0; if (unlikely(tp_dictoffset == 0)) { tp_dictoffset = __Pyx_GetTypeDictOffset(); if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { tp_dictoffset = 0; // try again next time? return NULL; } } return *(PyObject**)((char*)tp + tp_dictoffset); } #endif /* SetItemOnTypeDict (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { int result; PyObject *tp_dict; #if CYTHON_COMPILING_IN_LIMITED_API tp_dict = __Pyx_GetTypeDict(tp); if (unlikely(!tp_dict)) return -1; #else tp_dict = tp->tp_dict; #endif result = PyDict_SetItem(tp_dict, k, v); if (likely(!result)) { PyType_Modified(tp); if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); if (!setNameResult) return -1; Py_DECREF(setNameResult); } } return result; } /* FixUpExtensionType (used by FetchCommonType) */ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if __PYX_LIMITED_VERSION_HEX > 0x030900B1 CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); #else const PyType_Slot *slot = spec->slots; int changed = 0; #if !CYTHON_COMPILING_IN_LIMITED_API while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { #if !CYTHON_COMPILING_IN_CPYTHON const #endif // !CYTHON_COMPILING_IN_CPYTHON) PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_vectorcall_offset = memb->offset; changed = 1; } #endif // CYTHON_METH_FASTCALL #if !CYTHON_COMPILING_IN_PYPY else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); Py_DECREF(descr); if (unlikely(set_item_result < 0)) { return -1; } changed = 1; } #endif // !CYTHON_COMPILING_IN_PYPY } memb++; } } #endif // !CYTHON_COMPILING_IN_LIMITED_API #if !CYTHON_COMPILING_IN_PYPY slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_getset) slot++; if (slot && slot->slot == Py_tp_getset) { PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; while (getset && getset->name) { if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { PyObject *descr = PyDescr_NewGetSet(type, getset); if (unlikely(!descr)) return -1; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *pyname = PyUnicode_FromString(getset->name); if (unlikely(!pyname)) { Py_DECREF(descr); return -1; } int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); Py_DECREF(pyname); #else CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); #endif Py_DECREF(descr); if (unlikely(set_item_result < 0)) { return -1; } changed = 1; } ++getset; } } #else CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); #endif // !CYTHON_COMPILING_IN_PYPY if (changed) PyType_Modified(type); #endif // PY_VERSION_HEX > 0x030900B1 return 0; } /* AddModuleRef (used by FetchSharedCythonModule) */ #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { PyObject *module_dict = PyImport_GetModuleDict(); PyObject *m; if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { return NULL; } if (m != NULL && PyModule_Check(m)) { return m; } Py_XDECREF(m); m = PyModule_NewObject(name); if (m == NULL) return NULL; if (PyDict_CheckExact(module_dict)) { PyObject *new_m; (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); Py_DECREF(m); return new_m; } else { if (PyObject_SetItem(module_dict, name, m) != 0) { Py_DECREF(m); return NULL; } return m; } } static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *py_name = PyUnicode_FromString(name); if (!py_name) return NULL; PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); Py_DECREF(py_name); return module; } #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif /* FetchSharedCythonModule (used by FetchCommonType) */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); } /* FetchCommonType (used by CommonTypesMetaclass) */ #if __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); if (result && metaclass) { PyObject *old_tp = (PyObject*)Py_TYPE(result); Py_INCREF((PyObject*)metaclass); #if __PYX_LIMITED_VERSION_HEX >= 0x03090000 Py_SET_TYPE(result, metaclass); #else result->ob_type = metaclass; #endif Py_DECREF(old_tp); } return result; } #else #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) #endif static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t expected_basicsize) { Py_ssize_t basicsize; if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (expected_basicsize == 0) { return 0; // size is inherited, nothing useful to check } #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) return -1; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = NULL; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; #else basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; #endif if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; int get_item_ref_result; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; py_object_name = PyUnicode_FromString(object_name); if (!py_object_name) return NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) goto done; abi_module_dict = PyModule_GetDict(abi_module); if (!abi_module_dict) goto done; get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); if (get_item_ref_result == 1) { if (__Pyx_VerifyCachedType( cached_type, object_name, spec->basicsize) < 0) { goto bad; } goto done; } else if (unlikely(get_item_ref_result == -1)) { goto bad; } cached_type = __Pyx_PyType_FromMetaclass( metaclass, CYTHON_USE_MODULE_STATE ? module : abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); if (unlikely(new_cached_type != cached_type)) { if (unlikely(!new_cached_type)) goto bad; Py_DECREF(cached_type); cached_type = new_cached_type; if (__Pyx_VerifyCachedType( cached_type, object_name, spec->basicsize) < 0) { goto bad; } goto done; } else { Py_DECREF(new_cached_type); } done: Py_XDECREF(abi_module); Py_DECREF(py_object_name); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CommonTypesMetaclass (used by CythonFunctionShared) */ static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); } #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); return NULL; } static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); return -1; } #endif static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, {0, 0, 0, 0, 0} }; static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, #endif {0, 0} }; static PyType_Spec __pyx_CommonTypesMetaclass_spec = { __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", 0, 0, Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT, __pyx_CommonTypesMetaclass_slots }; static int __pyx_CommonTypesMetaclass_init(PyObject *module) { __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); PyObject *bases = PyTuple_Pack(1, &PyType_Type); if (unlikely(!bases)) { return -1; } mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); Py_DECREF(bases); if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { return -1; } return 0; } /* CallTypeTraverse (used by CythonFunctionShared) */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #else static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 if (__Pyx_get_runtime_version() < 0x03090000) return 0; #endif if (!always_call) { PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); unsigned long flags = PyType_GetFlags(base); if (flags & Py_TPFLAGS_HEAPTYPE) { return 0; } } Py_VISIT((PyObject*)Py_TYPE(o)); return 0; } #endif /* PyMethodNew (used by CythonFunctionShared) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *result; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 { PyObject *args[] = {func, self}; result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); } #else result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); #endif return result; } #else static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #endif /* PyVectorcallFastCallDict (used by CythonFunctionShared) */ #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i; #if CYTHON_AVOID_BORROWED_REFS PyObject *pos; #else Py_ssize_t pos; #endif size_t j; PyObject *key, *value; unsigned long keys_are_strings; #if !CYTHON_ASSUME_SAFE_SIZE Py_ssize_t nkw = PyDict_Size(kw); if (unlikely(nkw == -1)) return NULL; #else Py_ssize_t nkw = PyDict_GET_SIZE(kw); #endif newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = 0; i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { keys_are_strings &= #if CYTHON_COMPILING_IN_LIMITED_API PyType_GetFlags(Py_TYPE(key)); #else Py_TYPE(key)->tp_flags; #endif #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; #else PyTuple_SET_ITEM(kwnames, i, key); #endif kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(pos); #endif Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { Py_ssize_t kw_size = likely(kw == NULL) ? 0 : #if !CYTHON_ASSUME_SAFE_SIZE PyDict_Size(kw); #else PyDict_GET_SIZE(kw); #endif if (kw_size == 0) { return vc(func, args, nargs, NULL); } #if !CYTHON_ASSUME_SAFE_SIZE else if (unlikely(kw_size == -1)) { return NULL; } #endif return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared (used by CythonFunction) */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { int result; PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); if (unlikely(!newFunc)) { PyErr_Clear(); // It's only an optimization, so don't throw an error return 0; } result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); Py_DECREF(newFunc); return result; } return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { if (PyMethod_Check(func)) { func = PyMethod_GET_FUNCTION(func); } return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) { if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { PyObject *result; CYTHON_UNUSED_VAR(closure); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_doc_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_doc, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #else op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { PyObject *result = NULL; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_name_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL || !PyUnicode_Check(value))) { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_name, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); PyObject *result; __Pyx_BEGIN_CRITICAL_SECTION(op); Py_INCREF(op->func_qualname); result = op->func_qualname; __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL || !PyUnicode_Check(value))) { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_qualname, value); __Pyx_END_CRITICAL_SECTION(); return 0; } #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(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; } #endif static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); 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 = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_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, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = NULL; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_defaults_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_kwdefaults_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_annotations, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { 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 PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject *result; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_annotations_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; if (is_coroutine) { PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(is_coroutine_value)) { return is_coroutine_value; } ignore: PyErr_Clear(); } return __Pyx_PyBool_FromLong(is_coroutine); } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { PyObject *result; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } result = __Pyx_CyFunction_get_is_coroutine_value(op); if (unlikely(!result)) return NULL; __Pyx_BEGIN_CRITICAL_SECTION(op); if (op->func_is_coroutine) { Py_DECREF(result); result = __Pyx_NewRef(op->func_is_coroutine); } else { op->func_is_coroutine = __Pyx_NewRef(result); } __Pyx_END_CRITICAL_SECTION(); return result; } static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); if (!py_name) return; PyErr_Format(PyExc_TypeError, "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, message, size); Py_DECREF(py_name); #else const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; PyErr_Format(PyExc_TypeError, "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", name, message, size); #endif } static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); if (!py_name) return; PyErr_Format(PyExc_TypeError, "%.200S() %s", py_name, message); Py_DECREF(py_name); #else const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; PyErr_Format(PyExc_TypeError, "%.200s() %s", name, message); #endif } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, #else {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, #endif {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #endif #if CYTHON_METH_FASTCALL #if CYTHON_COMPILING_IN_LIMITED_API {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #if CYTHON_COMPILING_IN_LIMITED_API {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { PyObject *result = NULL; CYTHON_UNUSED_VAR(args); __Pyx_BEGIN_CRITICAL_SECTION(m); Py_INCREF(m->func_qualname); result = m->func_qualname; __Pyx_END_CRITICAL_SECTION(); return result; } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API op->func_dict = NULL; #endif op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func_dict); #elif PY_VERSION_HEX < 0x030d0000 _PyObject_ClearManagedDict((PyObject*)m); #else PyObject_ClearManagedDict((PyObject*)m); #endif 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); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); Py_CLEAR(m->defaults); return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_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) { { int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); if (e) return e; } Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func_dict); #else { int e = #if PY_VERSION_HEX < 0x030d0000 _PyObject_VisitManagedDict #else PyObject_VisitManagedDict #endif ((PyObject*)m, visit, arg); if (e != 0) return e; } #endif __Pyx_VISIT_CONST(m->func_name); __Pyx_VISIT_CONST(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { PyObject *repr; __Pyx_BEGIN_CRITICAL_SECTION(op); repr = PyUnicode_FromFormat("", op->func_qualname, (void *)op); __Pyx_END_CRITICAL_SECTION(); return repr; } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (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(*)(void))meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_SIZE size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); __Pyx_CyFunction_raise_argument_count_error( (__pyx_CyFunctionObject*)func, "takes no arguments", size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_SIZE size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_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; } __Pyx_CyFunction_raise_argument_count_error( (__pyx_CyFunctionObject*)func, "takes exactly one argument", size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } __Pyx_CyFunction_raise_type_error( (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_SIZE argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(argc < 0)) return NULL; #endif 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); PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); 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; } #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { __Pyx_CyFunction_raise_type_error( cyfunc, "needs an argument"); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { __Pyx_CyFunction_raise_type_error( cyfunc, "takes no keyword arguments"); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } if (unlikely(nargs != 0)) { __Pyx_CyFunction_raise_argument_count_error( cyfunc, "takes no arguments", nargs); return NULL; } return meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } if (unlikely(nargs != 1)) { __Pyx_CyFunction_raise_argument_count_error( cyfunc, "takes exactly one argument", nargs); return NULL; } return meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } #if PY_VERSION_HEX < 0x030e00A6 size_t nargs_value = (size_t) nargs; #else Py_ssize_t nargs_value = nargs; #endif return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); } #endif static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if CYTHON_METH_FASTCALL #if defined(Py_TPFLAGS_HAVE_VECTORCALL) Py_TPFLAGS_HAVE_VECTORCALL | #elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif #endif // CYTHON_METH_FASTCALL #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_TPFLAGS_MANAGED_DICT | #endif Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; static int __pyx_CyFunction_init(PyObject *module) { __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); if (unlikely(!m->defaults)) return NULL; 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); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* RaiseException */ 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 PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE 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); } #else 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); #endif } bad: Py_XDECREF(owned_instance); return; } /* DictGetItem */ #if !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; if (unlikely(__Pyx_PyDict_GetItemRef(d, key, &value) == 0)) { // no value, no error 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 value; } #endif /* PyObjectFormatAndDecref */ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { if (unlikely(!s)) return NULL; if (likely(PyUnicode_CheckExact(s))) return s; return __Pyx_PyObject_FormatAndDecref(s, f); } static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { PyObject *result; if (unlikely(!s)) return NULL; result = PyObject_Format(s, f); Py_DECREF(s); return result; } /* JoinPyUnicode */ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; int result_ukind, kind_shift; Py_ssize_t i, char_pos; void *result_udata; if (max_char > 1114111) max_char = 1114111; result_uval = PyUnicode_New(result_ulength, max_char); if (unlikely(!result_uval)) return NULL; result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; result_udata = PyUnicode_DATA(result_uval); assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) goto overflow; char_pos = 0; for (i=0; i < value_count; i++) { int ukind; Py_ssize_t ulength; void *udata; PyObject *uval = values[i]; #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_PyUnicode_READY(uval) == (-1)) goto bad; #endif ulength = __Pyx_PyUnicode_GET_LENGTH(uval); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(ulength < 0)) goto bad; #endif if (unlikely(!ulength)) continue; if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) goto overflow; ukind = __Pyx_PyUnicode_KIND(uval); udata = __Pyx_PyUnicode_DATA(uval); if (ukind == result_ukind) { memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); } else { #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); #else Py_ssize_t j; for (j=0; j < ulength; j++) { Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); } #endif } char_pos += ulength; } return result_uval; overflow: PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); bad: Py_DECREF(result_uval); return NULL; #else Py_ssize_t i; PyObject *result = NULL; PyObject *value_tuple = PyTuple_New(value_count); if (unlikely(!value_tuple)) return NULL; CYTHON_UNUSED_VAR(max_char); CYTHON_UNUSED_VAR(result_ulength); for (i=0; i__pyx_empty_unicode, value_tuple); bad: Py_DECREF(value_tuple); return result; #endif } /* PyObjectVectorCallMethodKwBuilder */ #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 static PyObject *__Pyx_Object_VectorcallMethod_CallFromBuilder(PyObject *name, PyObject *const *args, size_t nargsf, PyObject *kwnames) { PyObject *result; PyObject *obj = PyObject_GetAttr(args[0], name); if (unlikely(!obj)) return NULL; result = __Pyx_Object_Vectorcall_CallFromBuilder(obj, args+1, nargsf-1, kwnames); Py_DECREF(obj); return result; } #endif /* PyObjectCallNoArg (used by PyObjectCallMethod0) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectCallMethod0 (used by dict_iter) */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) PyObject *args[1] = {obj}; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_CallNoArg; return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; #endif } /* RaiseNoneIterError (used by UnpackTupleError) */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError (used by UnpackTuple2) */ static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else { Py_ssize_t size = __Pyx_PyTuple_GET_SIZE(t); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(size < 0)) return; #endif if (size < index) { __Pyx_RaiseNeedMoreValuesError(size); } else { __Pyx_RaiseTooManyValuesError(index); } } } /* UnpackTuple2 (used by dict_iter) */ static CYTHON_INLINE int __Pyx_unpack_tuple2( PyObject* tuple, PyObject** value1, PyObject** value2, int is_tuple, int has_known_size, int decref_tuple) { if (likely(is_tuple || PyTuple_Check(tuple))) { Py_ssize_t size; if (has_known_size) { return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); } size = __Pyx_PyTuple_GET_SIZE(tuple); if (likely(size == 2)) { return __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple); } if (size >= 0) { __Pyx_UnpackTupleError(tuple, 2); } return -1; } else { return __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple); } } static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS value1 = __Pyx_PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; value2 = __Pyx_PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; #else value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); #endif if (decref_tuple) { Py_DECREF(tuple); } *pvalue1 = value1; *pvalue2 = value2; return 0; #if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS bad: Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; #endif } static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int has_known_size, int decref_tuple) { Py_ssize_t index; PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; iternextfunc iternext; iter = PyObject_GetIter(tuple); if (unlikely(!iter)) goto bad; if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } iternext = __Pyx_PyObject_GetIterNextFunc(iter); value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; Py_DECREF(iter); *pvalue1 = value1; *pvalue2 = value2; return 0; unpacking_failed: if (!has_known_size && __Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); bad: Py_XDECREF(iter); Py_XDECREF(value1); Py_XDECREF(value2); if (decref_tuple) { Py_XDECREF(tuple); } return -1; } /* dict_iter */ #if CYTHON_COMPILING_IN_PYPY #include #endif static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; if (is_dict) { #if !CYTHON_COMPILING_IN_PYPY *p_orig_length = PyDict_Size(iterable); Py_INCREF(iterable); return iterable; #else static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; PyObject **pp = NULL; if (method_name) { const char *name = PyUnicode_AsUTF8(method_name); if (strcmp(name, "iteritems") == 0) pp = &py_items; else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; else if (strcmp(name, "itervalues") == 0) pp = &py_values; if (pp) { if (!*pp) { *pp = PyUnicode_FromString(name + 4); if (!*pp) return NULL; } method_name = *pp; } } #endif } *p_orig_length = 0; if (method_name) { PyObject* iter; iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); if (!iterable) return NULL; #if !CYTHON_COMPILING_IN_PYPY if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) return iterable; #endif iter = PyObject_GetIter(iterable); Py_DECREF(iterable); return iter; } return PyObject_GetIter(iterable); } #if !CYTHON_AVOID_BORROWED_REFS static CYTHON_INLINE int __Pyx_dict_iter_next_source_is_dict( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem) { PyObject *key, *value; if (unlikely(orig_length != PyDict_Size(iter_obj))) { PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); return -1; } if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { return 0; } if (pitem) { PyObject* tuple = PyTuple_New(2); if (unlikely(!tuple)) { return -1; } Py_INCREF(key); Py_INCREF(value); #if CYTHON_ASSUME_SAFE_MACROS PyTuple_SET_ITEM(tuple, 0, key); PyTuple_SET_ITEM(tuple, 1, value); #else if (unlikely(PyTuple_SetItem(tuple, 0, key) < 0)) { Py_DECREF(value); Py_DECREF(tuple); return -1; } if (unlikely(PyTuple_SetItem(tuple, 1, value) < 0)) { Py_DECREF(tuple); return -1; } #endif *pitem = tuple; } else { if (pkey) { Py_INCREF(key); *pkey = key; } if (pvalue) { Py_INCREF(value); *pvalue = value; } } return 1; } #endif static CYTHON_INLINE int __Pyx_dict_iter_next( PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { PyObject* next_item; #if !CYTHON_AVOID_BORROWED_REFS if (source_is_dict) { int result; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_BEGIN_CRITICAL_SECTION(iter_obj); #endif result = __Pyx_dict_iter_next_source_is_dict(iter_obj, orig_length, ppos, pkey, pvalue, pitem); #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_END_CRITICAL_SECTION(); #endif return result; } else if (PyTuple_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(iter_obj); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(tuple_size < 0)) return -1; #endif if (unlikely(pos >= tuple_size)) return 0; *ppos = pos + 1; #if CYTHON_ASSUME_SAFE_MACROS next_item = PyTuple_GET_ITEM(iter_obj, pos); #else next_item = PyTuple_GetItem(iter_obj, pos); if (unlikely(!next_item)) return -1; #endif Py_INCREF(next_item); } else if (PyList_CheckExact(iter_obj)) { Py_ssize_t pos = *ppos; Py_ssize_t list_size = __Pyx_PyList_GET_SIZE(iter_obj); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(list_size < 0)) return -1; #endif if (unlikely(pos >= list_size)) return 0; *ppos = pos + 1; next_item = __Pyx_PyList_GetItemRef(iter_obj, pos); if (unlikely(!next_item)) return -1; } else #endif { next_item = PyIter_Next(iter_obj); if (unlikely(!next_item)) { return __Pyx_IterFinish(); } } if (pitem) { *pitem = next_item; } else if (pkey && pvalue) { if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) return -1; } else if (pkey) { *pkey = next_item; } else { *pvalue = next_item; } return 1; } /* RaiseUnboundLocalError */ static void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* pep479 */ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen) { PyObject *exc, *val, *tb, *cur_exc, *new_exc; __Pyx_PyThreadState_declare int is_async_stopiteration = 0; CYTHON_MAYBE_UNUSED_VAR(in_async_gen); __Pyx_PyThreadState_assign cur_exc = __Pyx_PyErr_CurrentExceptionType(); if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopAsyncIteration))) { is_async_stopiteration = 1; } else { return; } } __Pyx_GetException(&exc, &val, &tb); Py_XDECREF(exc); Py_XDECREF(tb); new_exc = PyObject_CallFunction(PyExc_RuntimeError, "s", is_async_stopiteration ? "async generator raised StopAsyncIteration" : in_async_gen ? "async generator raised StopIteration" : "generator raised StopIteration"); if (!new_exc) { Py_XDECREF(val); return; } PyException_SetCause(new_exc, val); // steals ref to val PyErr_SetObject(PyExc_RuntimeError, new_exc); } /* pyfrozenset_new (used by PySetContains) */ static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { if (it) { PyObject* result; #if CYTHON_COMPILING_IN_PYPY PyObject* args; args = PyTuple_Pack(1, it); if (unlikely(!args)) return NULL; result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); Py_DECREF(args); return result; #else if (PyFrozenSet_CheckExact(it)) { Py_INCREF(it); return it; } result = PyFrozenSet_New(it); if (unlikely(!result)) return NULL; if ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000) #if CYTHON_COMPILING_IN_LIMITED_API || __Pyx_get_runtime_version() >= 0x030A0000 #endif ) return result; { Py_ssize_t size = __Pyx_PySet_GET_SIZE(result); if (likely(size > 0)) return result; #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(size < 0)) { Py_DECREF(result); return NULL; } #endif } Py_DECREF(result); #endif } return __Pyx_PyObject_CallNoArg((PyObject*) &PyFrozenSet_Type); } /* PySetContains */ static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { int result = -1; if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { PyObject *tmpkey; PyErr_Clear(); tmpkey = __Pyx_PyFrozenSet_New(key); if (tmpkey != NULL) { result = PySet_Contains(set, tmpkey); Py_DECREF(tmpkey); } } return result; } static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { int result = PySet_Contains(set, key); if (unlikely(result < 0)) { result = __Pyx_PySet_ContainsUnhashable(set, key); } return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!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, int wraparound, int boundscheck, int unsafe_shared) { CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); #if CYTHON_ASSUME_SAFE_SIZE Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); } else if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else (void)wraparound; (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck, int unsafe_shared) { CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); #if CYTHON_ASSUME_SAFE_SIZE && 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)))) { return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else (void)wraparound; (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck, int unsafe_shared) { CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { return __Pyx_NewRef(PyList_GET_ITEM(o, n)); } } else #if !CYTHON_AVOID_BORROWED_REFS 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)))) { return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); } } else #endif #endif #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (!is_list && mm && mm->mp_subscript) { PyObject *r, *key = PyLong_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (is_list || likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif (void)wraparound; (void)boundscheck; return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); } /* ObjectGetItem */ #if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { PyObject *runerr = NULL; Py_ssize_t key_value; key_value = __Pyx_PyIndex_AsSsize_t(index); if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1, 1); } if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { __Pyx_TypeName index_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(index)); PyErr_Clear(); PyErr_Format(PyExc_IndexError, "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); __Pyx_DECREF_TypeName(index_type_name); } return NULL; } static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { __Pyx_TypeName obj_type_name; if (likely(PyType_Check(obj))) { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_mstate_global->__pyx_n_u_class_getitem); if (!meth) { PyErr_Clear(); } else { PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); Py_DECREF(meth); return result; } } obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return NULL; } static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { PyTypeObject *tp = Py_TYPE(obj); PyMappingMethods *mm = tp->tp_as_mapping; PySequenceMethods *sm = tp->tp_as_sequence; if (likely(mm && mm->mp_subscript)) { return mm->mp_subscript(obj, key); } if (likely(sm && sm->sq_item)) { return __Pyx_PyObject_GetIndex(obj, key); } return __Pyx_PyObject_GetItem_Slow(obj, key); } #endif /* CallUnboundCMethod1 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); if (likely(was_initialized == 2 && cfunc->func)) { int flag = cfunc->flag; if (flag == METH_O) { return __Pyx_CallCFunction(cfunc, self, arg); } else if (flag == METH_FASTCALL) { return __Pyx_CallCFunctionFast(cfunc, self, &arg, 1); } else if (flag == (METH_FASTCALL | METH_KEYWORDS)) { return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, &arg, 1, NULL); } } #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING else if (unlikely(was_initialized == 1)) { __Pyx_CachedCFunction tmp_cfunc = { #ifndef __cplusplus 0 #endif }; tmp_cfunc.type = cfunc->type; tmp_cfunc.method_name = cfunc->method_name; return __Pyx__CallUnboundCMethod1(&tmp_cfunc, self, arg); } #endif PyObject* result = __Pyx__CallUnboundCMethod1(cfunc, self, arg); __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); return result; } #endif static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ PyObject *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)) { PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); else result = __Pyx_CallCFunction(cfunc, self, args); Py_DECREF(args); } else #endif { result = __Pyx_PyObject_Call2Args(cfunc->method, self, arg); } return result; } /* PyObjectLookupSpecial */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); 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 if (with_error) { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #endif /* set_iter */ static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, Py_ssize_t* p_orig_length, int* p_source_is_set) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable)); *p_source_is_set = is_set; if (likely(is_set)) { *p_orig_length = PySet_Size(iterable); Py_INCREF(iterable); return iterable; } #else CYTHON_UNUSED_VAR(is_set); *p_source_is_set = 0; #endif *p_orig_length = 0; return PyObject_GetIter(iterable); } static CYTHON_INLINE int __Pyx_set_iter_next( PyObject* iter_obj, Py_ssize_t orig_length, Py_ssize_t* ppos, PyObject **value, int source_is_set) { if (!CYTHON_COMPILING_IN_CPYTHON || PY_VERSION_HEX >= 0x030d0000 || unlikely(!source_is_set)) { *value = PyIter_Next(iter_obj); if (unlikely(!*value)) { return __Pyx_IterFinish(); } CYTHON_UNUSED_VAR(orig_length); CYTHON_UNUSED_VAR(ppos); return 1; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) { PyErr_SetString( PyExc_RuntimeError, "set changed size during iteration"); return -1; } { Py_hash_t hash; int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash); assert (ret != -1); if (likely(ret)) { Py_INCREF(*value); return 1; } } #endif return 0; } /* py_set_discard_unhashable (used by py_set_discard) */ static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) { PyObject *tmpkey; int rv; if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))) return -1; PyErr_Clear(); tmpkey = __Pyx_PyFrozenSet_New(key); if (tmpkey == NULL) return -1; rv = PySet_Discard(set, tmpkey); Py_DECREF(tmpkey); return rv; } /* py_set_discard */ static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key) { int found = PySet_Discard(set, key); if (unlikely(found < 0)) { found = __Pyx_PySet_DiscardUnhashable(set, key); } return found; } /* PyLongBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_Fallback___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, int inplace) { return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #if CYTHON_USE_PYLONG_INTERNALS static PyObject* __Pyx_Unpacked___Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); const long b = intval; long a; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla; if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op2); } const int is_positive = __Pyx_PyLong_IsPos(op1); const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); if (likely(size == 1)) { a = (long) digits[0]; if (!is_positive) a *= -1; } else { switch (size) { case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if (!is_positive) a *= -1; goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); if (!is_positive) lla *= -1; goto calculate_long_long; } break; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if (!is_positive) a *= -1; goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); if (!is_positive) lla *= -1; goto calculate_long_long; } break; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if (!is_positive) a *= -1; goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); if (!is_positive) lla *= -1; goto calculate_long_long; } break; } return PyLong_Type.tp_as_number->nb_add(op1, op2); } calculate_long: { long x; x = a + b; return PyLong_FromLong(x); } calculate_long_long: { PY_LONG_LONG llx; llx = lla + llb; return PyLong_FromLongLong(llx); } } #endif static PyObject* __Pyx_Float___Pyx_PyLong_AddObjC(PyObject *float_val, long intval, int zerodivision_check) { CYTHON_UNUSED_VAR(zerodivision_check); const long b = intval; double a = __Pyx_PyFloat_AS_DOUBLE(float_val); double result; result = ((double)a) + (double)b; return PyFloat_FromDouble(result); } static CYTHON_INLINE PyObject* __Pyx_PyLong_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_UNUSED_VAR(zerodivision_check); #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { return __Pyx_Unpacked___Pyx_PyLong_AddObjC(op1, op2, intval, inplace, zerodivision_check); } #endif if (PyFloat_CheckExact(op1)) { return __Pyx_Float___Pyx_PyLong_AddObjC(op1, intval, zerodivision_check); } return __Pyx_Fallback___Pyx_PyLong_AddObjC(op1, op2, inplace); } #endif /* 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 PyObject* __Pyx_PyTuple_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { Py_ssize_t length = PyTuple_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length); } static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice_locked( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { Py_ssize_t length = PyList_GET_SIZE(src); __Pyx_crop_slice(&start, &stop, &length); if (length <= 0) { return PyList_New(0); } return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length); } static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( PyObject* src, Py_ssize_t start, Py_ssize_t stop) { PyObject *result; __Pyx_BEGIN_CRITICAL_SECTION(src); result = __Pyx_PyList_GetSlice_locked(src, start, stop); __Pyx_END_CRITICAL_SECTION(); return result; } #endif // CYTHON_COMPILING_IN_CPYTHON /* SliceObject */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { __Pyx_TypeName obj_type_name; #if CYTHON_USE_TYPE_SLOTS PyMappingMethods* mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyLong_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyLong_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_USE_TYPE_SLOTS result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); bad: return NULL; } /* UnicodeConcatInPlace */ # if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_unicode_modifiable(PyObject *unicode, int unsafe_shared) { if (!__Pyx_IS_UNIQUELY_REFERENCED(unicode, unsafe_shared)) return 0; #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030F0000 if (PyUnstable_Unicode_GET_CACHED_HASH(unicode) != -1) return 0; #endif if (!PyUnicode_CheckExact(unicode)) return 0; if (PyUnicode_CHECK_INTERNED(unicode)) return 0; return 1; } static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right, int unsafe_shared #if CYTHON_REFNANNY , void* __pyx_refnanny #endif ) { PyObject *left = *p_left; Py_ssize_t left_len, right_len, new_len; if (unlikely(__Pyx_PyUnicode_READY(left) == -1)) return NULL; if (unlikely(__Pyx_PyUnicode_READY(right) == -1)) return NULL; left_len = PyUnicode_GET_LENGTH(left); if (left_len == 0) { Py_INCREF(right); return right; } right_len = PyUnicode_GET_LENGTH(right); if (right_len == 0) { Py_INCREF(left); return left; } if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) { PyErr_SetString(PyExc_OverflowError, "strings are too large to concat"); return NULL; } new_len = left_len + right_len; if (__Pyx_unicode_modifiable(left, unsafe_shared) && PyUnicode_CheckExact(right) && PyUnicode_KIND(right) <= PyUnicode_KIND(left) && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) { int ret; __Pyx_GIVEREF(*p_left); ret = PyUnicode_Resize(p_left, new_len); __Pyx_GOTREF(*p_left); if (unlikely(ret != 0)) return NULL; #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL; #else _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len); #endif __Pyx_INCREF(*p_left); __Pyx_GIVEREF(*p_left); return *p_left; } else { return __Pyx_PyUnicode_Concat(left, right); } } #endif /* PyLongBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, int inplace) { return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); } #if CYTHON_USE_PYLONG_INTERNALS static PyObject* __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); const long b = intval; long a; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla; if (unlikely(__Pyx_PyLong_IsZero(op1))) { return __Pyx_NewRef(op1); } const int is_positive = __Pyx_PyLong_IsPos(op1); const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); if (likely(size == 1)) { a = (long) digits[0]; if (!is_positive) a *= -1; } else { switch (size) { case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if (!is_positive) a *= -1; goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); if (!is_positive) lla *= -1; goto calculate_long_long; } break; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if (!is_positive) a *= -1; goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); if (!is_positive) lla *= -1; goto calculate_long_long; } break; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if (!is_positive) a *= -1; goto calculate_long; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); if (!is_positive) lla *= -1; goto calculate_long_long; } break; } return PyLong_Type.tp_as_number->nb_multiply(op1, op2); } calculate_long: CYTHON_UNUSED_VAR(a); CYTHON_UNUSED_VAR(b); lla = a; goto calculate_long_long; calculate_long_long: { PY_LONG_LONG llx; llx = lla * llb; return PyLong_FromLongLong(llx); } } #endif static PyObject* __Pyx_Float___Pyx_PyLong_MultiplyObjC(PyObject *float_val, long intval, int zerodivision_check) { CYTHON_UNUSED_VAR(zerodivision_check); const long b = intval; double a = __Pyx_PyFloat_AS_DOUBLE(float_val); double result; result = ((double)a) * (double)b; return PyFloat_FromDouble(result); } static CYTHON_INLINE PyObject* __Pyx_PyLong_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_UNUSED_VAR(zerodivision_check); #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { return __Pyx_Unpacked___Pyx_PyLong_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check); } #endif if (PyFloat_CheckExact(op1)) { return __Pyx_Float___Pyx_PyLong_MultiplyObjC(op1, intval, zerodivision_check); } return __Pyx_Fallback___Pyx_PyLong_MultiplyObjC(op1, op2, inplace); } #endif /* PyLongCompare */ static CYTHON_INLINE int __Pyx_PyLong_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { CYTHON_MAYBE_UNUSED_VAR(intval); CYTHON_UNUSED_VAR(inplace); if (op1 == op2) { return 1; } #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); const digit* digits = __Pyx_PyLong_Digits(op1); if (intval == 0) { return (__Pyx_PyLong_IsZero(op1) == 1); } else if (intval < 0) { if (__Pyx_PyLong_IsNonNeg(op1)) return 0; intval = -intval; } else { if (__Pyx_PyLong_IsNeg(op1)) return 0; } 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)); return (unequal == 0); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = __Pyx_PyFloat_AS_DOUBLE(op1); return ((double)a == (double)b); } return __Pyx_PyObject_IsTrueAndDecref( PyObject_RichCompare(op1, op2, Py_EQ)); } /* py_set_remove */ static int __Pyx_PySet_RemoveNotFound(PyObject *set, PyObject *key, int found) { if (unlikely(found < 0)) { found = __Pyx_PySet_DiscardUnhashable(set, key); } if (likely(found == 0)) { PyObject *tup; tup = PyTuple_Pack(1, key); if (!tup) return -1; PyErr_SetObject(PyExc_KeyError, tup); Py_DECREF(tup); return -1; } return found; } static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) { int found = PySet_Discard(set, key); if (unlikely(found != 1)) { return __Pyx_PySet_RemoveNotFound(set, key, found); } return 0; } /* GetAttr3 */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 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; } #endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 int res = PyObject_GetOptionalAttr(o, n, &r); return (res != 0) ? r : __Pyx_NewRef(d); #else #if CYTHON_USE_TYPE_SLOTS if (likely(PyUnicode_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { r = __Pyx_NewRef(d); } return r; } #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); #endif } /* GetAttr */ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS if (likely(PyUnicode_Check(n))) return __Pyx_PyObject_GetAttrStr(o, n); #endif return PyObject_GetAttr(o, n); } /* MergeKeywords */ static int __Pyx_MergeKeywords_dict(PyObject *kwdict, PyObject *source_dict) { Py_ssize_t len1, len2; len2 = PyDict_Size(source_dict); if (unlikely(len2 == -1)) return -1; if (len2 == 0) { return 0; } len1 = PyDict_Size(kwdict); if (unlikely(len1 == -1)) return -1; if (len1 > 0) { PyObject *key, *smaller_dict, *larger_dict; #if CYTHON_AVOID_BORROWED_REFS PyObject *ppos = NULL; #else Py_ssize_t ppos = 0; #endif int duplicates_found = 0; if (len1 <= len2) { smaller_dict = kwdict; larger_dict = source_dict; } else { smaller_dict = source_dict; larger_dict = kwdict; } __Pyx_BEGIN_CRITICAL_SECTION(smaller_dict); while ( #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS __Pyx_PyDict_NextRef(smaller_dict, &ppos, &key, NULL) #else PyDict_Next(smaller_dict, &ppos, &key, NULL) #endif ) { if (unlikely(PyDict_Contains(larger_dict, key))) { __Pyx_RaiseDoubleKeywordsError("function", key); #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS Py_DECREF(key); #endif duplicates_found = 1; break; }; #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS Py_DECREF(key); #endif } __Pyx_END_CRITICAL_SECTION(); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(ppos); #endif if (unlikely(duplicates_found)) return -1; } return PyDict_Update(kwdict, source_dict); } static int __Pyx_MergeKeywords_any(PyObject *kwdict, PyObject *source_mapping) { PyObject *iter, *key = NULL, *value = NULL; int source_is_dict, result; Py_ssize_t orig_length, ppos = 0; iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_mstate_global->__pyx_n_u_items, &orig_length, &source_is_dict); if (unlikely(!iter)) { PyObject *args; if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) goto bad; PyErr_Clear(); args = PyTuple_Pack(1, source_mapping); if (likely(args)) { PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL); Py_DECREF(args); if (likely(fallback)) { result = __Pyx_MergeKeywords_dict(kwdict, fallback); Py_DECREF(fallback); return result; } } if (unlikely(!iter)) goto bad; } while (1) { result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict); if (unlikely(result < 0)) goto bad; if (!result) break; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API { int inserted = PyDict_SetDefaultRef(kwdict, key, value, NULL); if (unlikely(inserted != 0)) { if (inserted == 1) __Pyx_RaiseDoubleKeywordsError("function", key); result = -1; } } #else if (unlikely(PyDict_Contains(kwdict, key))) { __Pyx_RaiseDoubleKeywordsError("function", key); result = -1; } else { result = PyDict_SetItem(kwdict, key, value); } #endif Py_DECREF(key); Py_DECREF(value); if (unlikely(result < 0)) goto bad; } Py_XDECREF(iter); return 0; bad: Py_XDECREF(iter); return -1; } static CYTHON_INLINE int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { assert(PyDict_Check(kwdict)); if (likely(PyDict_Check(source_mapping))) { return __Pyx_MergeKeywords_dict(kwdict, source_mapping); } else { return __Pyx_MergeKeywords_any(kwdict, source_mapping); } } /* PyFloatBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { const double b = floatval; double a, result; CYTHON_UNUSED_VAR(inplace); CYTHON_UNUSED_VAR(zerodivision_check); if (likely(PyFloat_CheckExact(op1))) { a = __Pyx_PyFloat_AS_DOUBLE(op1); } else if (likely(PyLong_CheckExact(op1))) { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsZero(op1)) { a = 0.0; } else if (__Pyx_PyLong_IsCompact(op1)) { a = (double) __Pyx_PyLong_CompactValue(op1); } else { const digit* digits = __Pyx_PyLong_Digits(op1); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); switch (size) { case -2: case 2: if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) { a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -2) a = -a; break; } } CYTHON_FALLTHROUGH; case -3: case 3: if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) { a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -3) a = -a; break; } } CYTHON_FALLTHROUGH; case -4: case 4: if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) { a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) { if (size == -4) a = -a; break; } } CYTHON_FALLTHROUGH; default: #endif a = PyLong_AsDouble(op1); if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL; #if CYTHON_USE_PYLONG_INTERNALS } } #endif } else { return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } result = a + b; return PyFloat_FromDouble(result); } #endif /* IterNextPlain (used by IterNext) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject *__Pyx_GetBuiltinNext_LimitedAPI(void) { if (unlikely(!__pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache)) __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache = __Pyx_GetBuiltinName(__pyx_mstate_global->__pyx_n_u_next); return __pyx_mstate_global->__Pyx_GetBuiltinNext_LimitedAPI_cache; } #endif static CYTHON_INLINE PyObject *__Pyx_PyIter_Next_Plain(PyObject *iterator) { #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 PyObject *result; PyObject *next = __Pyx_GetBuiltinNext_LimitedAPI(); if (unlikely(!next)) return NULL; result = PyObject_CallFunctionObjArgs(next, iterator, NULL); return result; #else (void)__Pyx_GetBuiltinName; // only for early limited API iternextfunc iternext = __Pyx_PyObject_GetIterNextFunc(iterator); assert(iternext); return iternext(iterator); #endif } /* IterNext */ static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign exc_type = __Pyx_PyErr_CurrentExceptionType(); if (unlikely(exc_type)) { if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(defval); return defval; } if (defval) { Py_INCREF(defval); return defval; } __Pyx_PyErr_SetNone(PyExc_StopIteration); return NULL; } static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { __Pyx_TypeName iterator_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(iterator)); PyErr_Format(PyExc_TypeError, __Pyx_FMT_TYPENAME " object is not an iterator", iterator_type_name); __Pyx_DECREF_TypeName(iterator_type_name); } static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { PyObject* next; #if !CYTHON_COMPILING_IN_LIMITED_API iternextfunc iternext = __Pyx_PyObject_TryGetSlot(iterator, tp_iternext, iternextfunc); if (likely(iternext)) { next = iternext(iterator); if (likely(next)) return next; #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 if (unlikely(iternext == &_PyObject_NextNotImplemented)) return NULL; #endif } else if (CYTHON_USE_TYPE_SLOTS) { __Pyx_PyIter_Next_ErrorNoIterator(iterator); return NULL; } else #endif if (unlikely(!PyIter_Check(iterator))) { __Pyx_PyIter_Next_ErrorNoIterator(iterator); return NULL; } else { next = defval ? PyIter_Next(iterator) : __Pyx_PyIter_Next_Plain(iterator); if (likely(next)) return next; } return __Pyx_PyIter_Next2Default(defval); } /* AllocateExtensionType */ static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); return alloc_func(t, 0); } else { newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 if (!tp_new) { PyObject *new_str = PyUnicode_FromString("__new__"); if (likely(new_str)) { PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); Py_DECREF(new_str); return o; } else return NULL; } else #endif return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); } } /* ValidateBasesTuple (used by PyType_Ready) */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_SIZE n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (unlikely(n < 0)) return -1; #endif for (i = 1; i < n; i++) { PyTypeObject *b; #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !CYTHON_USE_TYPE_SLOTS dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { while (t) { PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases) { return 1; } t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); } return 0; } static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; if (!__Pyx_PyType_HasMultipleInheritance(t)) { return PyType_Ready(t); } PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ !CYTHON_COMPILING_IN_GRAAL gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* Py3UpdateBases */ static PyObject* __Pyx_PEP560_update_bases(PyObject *bases) { Py_ssize_t i, j, size_bases; PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; #if CYTHON_ASSUME_SAFE_SIZE size_bases = PyTuple_GET_SIZE(bases); #else size_bases = PyTuple_Size(bases); if (size_bases < 0) return NULL; #endif for (i = 0; i < size_bases; i++) { #if CYTHON_AVOID_BORROWED_REFS Py_CLEAR(base); #endif #if CYTHON_ASSUME_SAFE_MACROS base = PyTuple_GET_ITEM(bases, i); #else base = PyTuple_GetItem(bases, i); if (!base) goto error; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(base); #endif if (PyType_Check(base)) { if (new_bases) { if (PyList_Append(new_bases, base) < 0) { goto error; } } continue; } meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); if (!meth && PyErr_Occurred()) { goto error; } if (!meth) { if (new_bases) { if (PyList_Append(new_bases, base) < 0) { goto error; } } continue; } new_base = __Pyx_PyObject_CallOneArg(meth, bases); Py_DECREF(meth); if (!new_base) { goto error; } if (!PyTuple_Check(new_base)) { PyErr_SetString(PyExc_TypeError, "__mro_entries__ must return a tuple"); Py_DECREF(new_base); goto error; } if (!new_bases) { if (!(new_bases = PyList_New(i))) { goto error; } for (j = 0; j < i; j++) { PyObject *base_from_list; #if CYTHON_ASSUME_SAFE_MACROS base_from_list = PyTuple_GET_ITEM(bases, j); PyList_SET_ITEM(new_bases, j, base_from_list); Py_INCREF(base_from_list); #else base_from_list = PyTuple_GetItem(bases, j); if (!base_from_list) goto error; Py_INCREF(base_from_list); if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; #endif } } #if CYTHON_ASSUME_SAFE_SIZE j = PyList_GET_SIZE(new_bases); #else j = PyList_Size(new_bases); if (j < 0) goto error; #endif if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { goto error; } Py_DECREF(new_base); } if (!new_bases) { Py_INCREF(bases); return bases; } result = PyList_AsTuple(new_bases); Py_DECREF(new_bases); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(base); #endif return result; error: Py_XDECREF(new_bases); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(base); #endif return NULL; } /* CalculateMetaclass */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases; #if CYTHON_ASSUME_SAFE_SIZE nbases = PyTuple_GET_SIZE(bases); #else nbases = PyTuple_Size(bases); if (nbases < 0) return NULL; #endif for (i=0; i < nbases; i++) { PyTypeObject *tmptype; #if CYTHON_ASSUME_SAFE_MACROS PyObject *tmp = PyTuple_GET_ITEM(bases, i); #else PyObject *tmp = PyTuple_GetItem(bases, i); if (!tmp) return NULL; #endif tmptype = Py_TYPE(tmp); if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { metaclass = &PyType_Type; } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); if (prep) { PyObject *pargs[3] = {NULL, name, bases}; ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_DECREF(prep); } else { if (unlikely(PyErr_Occurred())) return NULL; ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result; PyObject *owned_metaclass = NULL; PyObject *margs[4] = {NULL, name, bases, dict}; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_XDECREF(owned_metaclass); return result; } /* ListPack */ static PyObject *__Pyx_PyList_Pack(Py_ssize_t n, ...) { va_list va; PyObject *l = PyList_New(n); va_start(va, n); if (unlikely(!l)) goto end; for (Py_ssize_t i=0; i 0x19000000 PyTypeObject *d_type = GraalPyDescrObject_GetType(method); return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method)); #elif CYTHON_COMPILING_IN_GRAAL PyTypeObject *d_type = PyDescrObject_GetType(method); return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method)); #else PyMethodDescrObject *descr = (PyMethodDescrObject *)method; PyTypeObject *d_type = descr->d_common.d_type; return PyDescr_NewClassMethod(d_type, descr->d_method); #endif } #endif #if !CYTHON_COMPILING_IN_LIMITED_API else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else { return PyClassMethod_New(method); } #else { PyObject *func=NULL; PyObject *builtins, *classmethod, *classmethod_str, *result=NULL; if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) { func = PyObject_GetAttrString(method, "__func__"); if (!func) goto bad; } else { func = method; Py_INCREF(func); } builtins = PyEval_GetBuiltins(); // borrowed if (unlikely(!builtins)) goto bad; classmethod_str = PyUnicode_FromString("classmethod"); if (unlikely(!classmethod_str)) goto bad; classmethod = PyObject_GetItem(builtins, classmethod_str); Py_DECREF(classmethod_str); if (unlikely(!classmethod)) goto bad; result = PyObject_CallFunctionObjArgs(classmethod, func, NULL); Py_DECREF(classmethod); bad: Py_XDECREF(func); return result; } #endif } /* CLineInTraceback (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 #define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) #elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); #else PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { PyObject **dict_ptr = _PyObject_GetDictPtr(o); return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; } #endif static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline = NULL; PyObject *ptype, *pvalue, *ptraceback; PyObject *cython_runtime_dict; CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, cython_runtime_dict, __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) } if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } Py_XDECREF(use_cline); Py_XDECREF(cython_runtime_dict); __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache (used by AddTraceback) */ 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 __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { __Pyx_CachedCodeObjectType* code_object; int pos; if (unlikely(!code_line) || unlikely(!code_cache->entries)) { return NULL; } pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { return NULL; } code_object = code_cache->entries[pos].code_object; Py_INCREF(code_object); return code_object; } static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS (void)__pyx__find_code_object; return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. #else struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); if (old_count < 0) { __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); return NULL; } #endif __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); #endif return result; #endif } static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { code_cache->entries = entries; code_cache->max_count = 64; 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(code_cache->entries, code_cache->count, code_line); if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_INCREF(code_object); Py_DECREF(tmp); return; } if (code_cache->count == code_cache->max_count) { int new_max = code_cache->max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } code_cache->entries = entries; code_cache->max_count = new_max; } for (i=code_cache->count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; code_cache->count++; Py_INCREF(code_object); } static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS (void)__pyx__insert_code_object; return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. #else struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_nonatomic_int_type expected = 0; if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { return; } #endif __pyx__insert_code_object(code_cache, code_line, code_object); #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); #endif #endif } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = __pyx_find_code_object(c_line ? -c_line : py_line); if (!code_object) { code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; if (c_line) { py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); } else { py_funcname = PyUnicode_FromString(funcname); } if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); } else { dict = PyDict_New(); } getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; if (c_line) { py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; } py_code = PyCode_NewEmpty(filename, funcname, py_line); Py_XDECREF(py_funcname); return py_code; bad: 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; PyObject *ptype, *pvalue, *ptraceback; 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) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_mstate_global->__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); } #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } 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 PyLong_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) { PyObject *module = NULL, *name = NULL, *result = NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_mstate_global->__pyx_n_u_qualname); #else name = PyType_GetQualName(tp); #endif if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_mstate_global->__pyx_n_u_module); if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { result = name; name = NULL; goto done; } result = PyUnicode_FromFormat("%U.%U", module, name); if (unlikely(result == NULL)) goto bad; done: Py_XDECREF(name); Py_XDECREF(module); return result; bad: PyErr_Clear(); if (name) { result = name; name = NULL; } else { result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__12); } goto done; } #endif /* CIntFromPyVerify (used by CIntFromPy) */ #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;\ } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_Long(x); if (!tmp) return (long) -1; val = __Pyx_PyLong_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { 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 && PY_VERSION_HEX < 0x030C00A7 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)) } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { 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)) } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; 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; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_Long(x); if (!tmp) return (int) -1; val = __Pyx_PyLong_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { 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 && PY_VERSION_HEX < 0x030C00A7 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)) } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { 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)) } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; 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; } /* GetRuntimeVersion */ #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 void __Pyx_init_runtime_version(void) { if (__Pyx_cached_runtime_version == 0) { const char* rt_version = Py_GetVersion(); unsigned long version = 0; unsigned long factor = 0x01000000UL; unsigned int digit = 0; int i = 0; while (factor) { while ('0' <= rt_version[i] && rt_version[i] <= '9') { digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); ++i; } version += factor * digit; if (rt_version[i] != '.') break; digit = 0; factor >>= 8; ++i; } __Pyx_cached_runtime_version = version; } } #endif static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 return Py_Version & ~0xFFUL; #else return __Pyx_cached_runtime_version; #endif } /* ReturnWithStopIteration (used by CoroutineBase) */ static void __Pyx__ReturnWithStopIteration(PyObject* value, int async); static CYTHON_INLINE void __Pyx_ReturnWithStopIteration(PyObject* value, int async, int iternext) { if (value == Py_None) { if (async || !iternext) PyErr_SetNone(async ? PyExc_StopAsyncIteration : PyExc_StopIteration); return; } __Pyx__ReturnWithStopIteration(value, async); } static void __Pyx__ReturnWithStopIteration(PyObject* value, int async) { #if CYTHON_COMPILING_IN_CPYTHON __Pyx_PyThreadState_declare #endif PyObject *exc; PyObject *exc_type = async ? PyExc_StopAsyncIteration : PyExc_StopIteration; #if CYTHON_COMPILING_IN_CPYTHON if ((PY_VERSION_HEX >= (0x030C00A6)) || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { if (PY_VERSION_HEX >= (0x030e00A1)) { exc = __Pyx_PyObject_CallOneArg(exc_type, value); } else { PyObject *args_tuple = PyTuple_New(1); if (unlikely(!args_tuple)) return; Py_INCREF(value); PyTuple_SET_ITEM(args_tuple, 0, value); exc = PyObject_Call(exc_type, args_tuple, NULL); Py_DECREF(args_tuple); } if (unlikely(!exc)) return; } else { Py_INCREF(value); exc = value; } #if CYTHON_FAST_THREAD_STATE __Pyx_PyThreadState_assign #if CYTHON_USE_EXC_INFO_STACK if (!__pyx_tstate->exc_info->exc_value) #else if (!__pyx_tstate->exc_type) #endif { Py_INCREF(exc_type); __Pyx_ErrRestore(exc_type, exc, NULL); return; } #endif #else exc = __Pyx_PyObject_CallOneArg(exc_type, value); if (unlikely(!exc)) return; #endif PyErr_SetObject(exc_type, exc); Py_DECREF(exc); } /* CoroutineBase (used by Generator) */ #if !CYTHON_COMPILING_IN_LIMITED_API #include #if PY_VERSION_HEX >= 0x030b00a6 && !defined(PYPY_VERSION) #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #endif // CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE void __Pyx_Coroutine_Undelegate(__pyx_CoroutineObject *gen) { #if CYTHON_USE_AM_SEND gen->yieldfrom_am_send = NULL; #endif Py_CLEAR(gen->yieldfrom); } static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *__pyx_tstate, PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; CYTHON_UNUSED_VAR(__pyx_tstate); __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); value = Py_None; } else if (likely(__Pyx_IS_TYPE(ev, (PyTypeObject*)PyExc_StopIteration))) { #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); if (unlikely(!value)) goto limited_api_failure; #else value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); #endif Py_DECREF(ev); } else if (unlikely(PyTuple_Check(ev))) { Py_ssize_t tuple_size = __Pyx_PyTuple_GET_SIZE(ev); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(tuple_size < 0)) { Py_XDECREF(tb); Py_DECREF(ev); Py_DECREF(et); return -1; } #endif if (tuple_size >= 1) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #elif CYTHON_ASSUME_SAFE_MACROS value = PySequence_ITEM(ev, 0); #else value = PySequence_GetItem(ev, 0); if (!value) goto limited_api_failure; #endif } else { Py_INCREF(Py_None); value = Py_None; } Py_DECREF(ev); } else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { value = ev; } if (likely(value)) { Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if CYTHON_COMPILING_IN_LIMITED_API value = PyObject_GetAttr(ev, __pyx_mstate_global->__pyx_n_u_value); #else value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); #endif Py_DECREF(ev); #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!value)) return -1; #endif *pvalue = value; return 0; #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL || !CYTHON_ASSUME_SAFE_MACROS limited_api_failure: Py_XDECREF(et); Py_XDECREF(tb); Py_XDECREF(ev); return -1; #endif } static CYTHON_INLINE __Pyx_PySendResult __Pyx_Coroutine_status_from_result(PyObject **retval) { if (*retval) { return PYGEN_NEXT; } else if (likely(__Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, retval) == 0)) { return PYGEN_RETURN; } else { return PYGEN_ERROR; } } static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { #if PY_VERSION_HEX >= 0x030B00a4 Py_CLEAR(exc_state->exc_value); #else PyObject *t, *v, *tb; t = exc_state->exc_type; v = exc_state->exc_value; tb = exc_state->exc_traceback; exc_state->exc_type = NULL; exc_state->exc_value = NULL; exc_state->exc_traceback = NULL; Py_XDECREF(t); Py_XDECREF(v); Py_XDECREF(tb); #endif } #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) static void __Pyx__Coroutine_AlreadyRunningError(__pyx_CoroutineObject *gen) { const char *msg; CYTHON_MAYBE_UNUSED_VAR(gen); if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { msg = "coroutine already executing"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { msg = "async generator already executing"; #endif } else { msg = "generator already executing"; } PyErr_SetString(PyExc_ValueError, msg); } static void __Pyx_Coroutine_AlreadyTerminatedError(PyObject *gen, PyObject *value, int closing) { CYTHON_MAYBE_UNUSED_VAR(gen); CYTHON_MAYBE_UNUSED_VAR(closing); #ifdef __Pyx_Coroutine_USED if (!closing && __Pyx_Coroutine_Check(gen)) { PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); } else #endif if (value) { #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(gen)) PyErr_SetNone(PyExc_StopAsyncIteration); else #endif PyErr_SetNone(PyExc_StopIteration); } } static __Pyx_PySendResult __Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, PyObject **result, int closing) { __Pyx_PyThreadState_declare PyThreadState *tstate; __Pyx_ExcInfoStruct *exc_state; PyObject *retval; assert(__Pyx_Coroutine_get_is_running(self)); // Callers should ensure is_running if (unlikely(self->resume_label == -1)) { __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); return PYGEN_ERROR; } #if CYTHON_FAST_THREAD_STATE __Pyx_PyThreadState_assign tstate = __pyx_tstate; #else tstate = __Pyx_PyThreadState_Current; #endif exc_state = &self->gi_exc_state; if (exc_state->exc_value) { #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY #else PyObject *exc_tb; #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON exc_tb = PyException_GetTraceback(exc_state->exc_value); #elif PY_VERSION_HEX >= 0x030B00a4 exc_tb = ((PyBaseExceptionObject*) exc_state->exc_value)->traceback; #else exc_tb = exc_state->exc_traceback; #endif if (exc_tb) { PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; assert(f->f_back == NULL); #if PY_VERSION_HEX >= 0x030B00A1 f->f_back = PyThreadState_GetFrame(tstate); #else Py_XINCREF(tstate->frame); f->f_back = tstate->frame; #endif #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_CPYTHON Py_DECREF(exc_tb); #endif } #endif } #if CYTHON_USE_EXC_INFO_STACK exc_state->previous_item = tstate->exc_info; tstate->exc_info = exc_state; #else if (exc_state->exc_type) { __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(exc_state); __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); } #endif retval = self->body(self, tstate, value); #if CYTHON_USE_EXC_INFO_STACK exc_state = &self->gi_exc_state; tstate->exc_info = exc_state->previous_item; exc_state->previous_item = NULL; __Pyx_Coroutine_ResetFrameBackpointer(exc_state); #endif *result = retval; if (self->resume_label == -1) { return likely(retval) ? PYGEN_RETURN : PYGEN_ERROR; } return PYGEN_NEXT; } static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED_VAR(exc_state); #else PyObject *exc_tb; #if PY_VERSION_HEX >= 0x030B00a4 if (!exc_state->exc_value) return; exc_tb = PyException_GetTraceback(exc_state->exc_value); #else exc_tb = exc_state->exc_traceback; #endif if (likely(exc_tb)) { PyTracebackObject *tb = (PyTracebackObject *) exc_tb; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); #if PY_VERSION_HEX >= 0x030B00a4 Py_DECREF(exc_tb); #endif } #endif } #define __Pyx_Coroutine_MethodReturnFromResult(gen, result, retval, iternext)\ ((result) == PYGEN_NEXT ? (retval) : __Pyx__Coroutine_MethodReturnFromResult(gen, result, retval, iternext)) static PyObject * __Pyx__Coroutine_MethodReturnFromResult(PyObject* gen, __Pyx_PySendResult result, PyObject *retval, int iternext) { CYTHON_MAYBE_UNUSED_VAR(gen); if (likely(result == PYGEN_RETURN)) { int is_async = 0; #ifdef __Pyx_AsyncGen_USED is_async = __Pyx_AsyncGen_CheckExact(gen); #endif __Pyx_ReturnWithStopIteration(retval, is_async, iternext); Py_XDECREF(retval); } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { #if PY_VERSION_HEX <= 0x030A00A1 return _PyGen_Send(gen, arg); #else PyObject *result; if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { if (PyAsyncGen_CheckExact(gen)) { assert(result == Py_None); PyErr_SetNone(PyExc_StopAsyncIteration); } else if (result == Py_None) { PyErr_SetNone(PyExc_StopIteration); } else { #if PY_VERSION_HEX < 0x030d00A1 _PyGen_SetStopIterationValue(result); #else if (!PyTuple_Check(result) && !PyExceptionInstance_Check(result)) { PyErr_SetObject(PyExc_StopIteration, result); } else { PyObject *exc = __Pyx_PyObject_CallOneArg(PyExc_StopIteration, result); if (likely(exc != NULL)) { PyErr_SetObject(PyExc_StopIteration, exc); Py_DECREF(exc); } } #endif } Py_DECREF(result); result = NULL; } return result; #endif } #endif static CYTHON_INLINE __Pyx_PySendResult __Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen, PyObject** retval) { __Pyx_PySendResult result; PyObject *val = NULL; assert(__Pyx_Coroutine_get_is_running(gen)); __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); result = __Pyx_Coroutine_SendEx(gen, val, retval, 0); Py_XDECREF(val); return result; } #if CYTHON_USE_AM_SEND static __Pyx_PySendResult __Pyx_Coroutine_SendToDelegate(__pyx_CoroutineObject *gen, __Pyx_pyiter_sendfunc gen_am_send, PyObject *value, PyObject **retval) { PyObject *ret = NULL; __Pyx_PySendResult delegate_result, result; assert(__Pyx_Coroutine_get_is_running(gen)); delegate_result = gen_am_send(gen->yieldfrom, value, &ret); if (delegate_result == PYGEN_NEXT) { assert (ret != NULL); *retval = ret; return PYGEN_NEXT; } assert (delegate_result != PYGEN_ERROR || ret == NULL); __Pyx_Coroutine_Undelegate(gen); result = __Pyx_Coroutine_SendEx(gen, ret, retval, 0); Py_XDECREF(ret); return result; } #endif static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval = NULL; __Pyx_PySendResult result = __Pyx_Coroutine_AmSend(self, value, &retval); return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); } static __Pyx_PySendResult __Pyx_Coroutine_AmSend(PyObject *self, PyObject *value, PyObject **retval) { __Pyx_PySendResult result; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { *retval = __Pyx_Coroutine_AlreadyRunningError(gen); return PYGEN_ERROR; } #if CYTHON_USE_AM_SEND if (gen->yieldfrom_am_send) { result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, value, retval); } else #endif if (gen->yieldfrom) { PyObject *yf = gen->yieldfrom; PyObject *ret; #if !CYTHON_USE_AM_SEND #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { ret = __Pyx_async_gen_asend_send(yf, value); } else #endif #if CYTHON_COMPILING_IN_CPYTHON if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else if (PyCoro_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); } else #endif #endif { #if !CYTHON_COMPILING_IN_LIMITED_API || __PYX_LIMITED_VERSION_HEX >= 0x03080000 if (value == Py_None && PyIter_Check(yf)) ret = __Pyx_PyIter_Next_Plain(yf); else #endif ret = __Pyx_PyObject_CallMethod1(yf, __pyx_mstate_global->__pyx_n_u_send, value); } if (likely(ret)) { __Pyx_Coroutine_unset_is_running(gen); *retval = ret; return PYGEN_NEXT; } result = __Pyx_Coroutine_FinishDelegation(gen, retval); } else { result = __Pyx_Coroutine_SendEx(gen, value, retval, 0); } __Pyx_Coroutine_unset_is_running(gen); return result; } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { __Pyx_PySendResult result; PyObject *retval = NULL; CYTHON_UNUSED_VAR(gen); assert(__Pyx_Coroutine_get_is_running(gen)); #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { result = __Pyx_Coroutine_Close(yf, &retval); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_Check(yf)) { result = __Pyx_Coroutine_Close(yf, &retval); } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { result = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf); } else #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_PyAsyncGenASend_CheckExact(yf)) { retval = __Pyx_async_gen_asend_close(yf, NULL); result = PYGEN_RETURN; } else if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { retval = __Pyx_async_gen_athrow_close(yf, NULL); result = PYGEN_RETURN; } else #endif { PyObject *meth; result = PYGEN_RETURN; meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_close); if (unlikely(!meth)) { if (unlikely(PyErr_Occurred())) { PyErr_WriteUnraisable(yf); } } else { retval = __Pyx_PyObject_CallNoArg(meth); Py_DECREF(meth); if (unlikely(!retval)) { result = PYGEN_ERROR; } } } Py_XDECREF(retval); return result == PYGEN_ERROR ? -1 : 0; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __Pyx_PySendResult result; PyObject *retval = NULL; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { return __Pyx_Coroutine_AlreadyRunningError(gen); } #if CYTHON_USE_AM_SEND if (gen->yieldfrom_am_send) { result = __Pyx_Coroutine_SendToDelegate(gen, gen->yieldfrom_am_send, Py_None, &retval); } else #endif if (gen->yieldfrom) { PyObject *yf = gen->yieldfrom; PyObject *ret; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Next(yf); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, Py_None); } else #endif #if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX < 0x030A00A3 || !CYTHON_USE_AM_SEND) if (PyGen_CheckExact(yf)) { ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); } else #endif ret = __Pyx_PyIter_Next_Plain(yf); if (likely(ret)) { __Pyx_Coroutine_unset_is_running(gen); return ret; } result = __Pyx_Coroutine_FinishDelegation(gen, &retval); } else { result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); } __Pyx_Coroutine_unset_is_running(gen); return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 1); } static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, PyObject *arg) { PyObject *retval = NULL; __Pyx_PySendResult result; CYTHON_UNUSED_VAR(arg); result = __Pyx_Coroutine_Close(self, &retval); if (unlikely(result == PYGEN_ERROR)) return NULL; Py_XDECREF(retval); Py_RETURN_NONE; } static __Pyx_PySendResult __Pyx_Coroutine_Close(PyObject *self, PyObject **retval) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; __Pyx_PySendResult result; PyObject *yf; int err = 0; if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { *retval = __Pyx_Coroutine_AlreadyRunningError(gen); return PYGEN_ERROR; } yf = gen->yieldfrom; if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); result = __Pyx_Coroutine_SendEx(gen, NULL, retval, 1); if (result == PYGEN_ERROR) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_Coroutine_unset_is_running(gen); if (!__Pyx_PyErr_Occurred()) { return PYGEN_RETURN; } else if (likely(__Pyx_PyErr_ExceptionMatches2(PyExc_GeneratorExit, PyExc_StopIteration))) { __Pyx_PyErr_Clear(); return PYGEN_RETURN; } return PYGEN_ERROR; } else if (likely(result == PYGEN_RETURN && *retval == Py_None)) { __Pyx_Coroutine_unset_is_running(gen); return PYGEN_RETURN; } else { const char *msg; Py_DECREF(*retval); *retval = NULL; if ((0)) { #ifdef __Pyx_Coroutine_USED } else if (__Pyx_Coroutine_Check(self)) { msg = "coroutine ignored GeneratorExit"; #endif #ifdef __Pyx_AsyncGen_USED } else if (__Pyx_AsyncGen_CheckExact(self)) { msg = "async generator ignored GeneratorExit"; #endif } else { msg = "generator ignored GeneratorExit"; } PyErr_SetString(PyExc_RuntimeError, msg); __Pyx_Coroutine_unset_is_running(gen); return PYGEN_ERROR; } } static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, PyObject *args, int close_on_genexit) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *yf; if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) return __Pyx_Coroutine_AlreadyRunningError(gen); yf = gen->yieldfrom; if (yf) { __Pyx_PySendResult result; PyObject *ret; Py_INCREF(yf); if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) goto propagate_exception; goto throw_here; } if (0 #ifdef __Pyx_Generator_USED || __Pyx_Generator_CheckExact(yf) #endif #ifdef __Pyx_Coroutine_USED || __Pyx_Coroutine_Check(yf) #endif ) { ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); #ifdef __Pyx_Coroutine_USED } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); #endif } else { PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(yf, __pyx_mstate_global->__pyx_n_u_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (unlikely(PyErr_Occurred())) { __Pyx_Coroutine_unset_is_running(gen); return NULL; } __Pyx_Coroutine_Undelegate(gen); goto throw_here; } if (likely(args)) { ret = __Pyx_PyObject_Call(meth, args, NULL); } else { PyObject *cargs[4] = {NULL, typ, val, tb}; ret = __Pyx_PyObject_FastCall(meth, cargs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } Py_DECREF(meth); } Py_DECREF(yf); if (ret) { __Pyx_Coroutine_unset_is_running(gen); return ret; } result = __Pyx_Coroutine_FinishDelegation(gen, &ret); __Pyx_Coroutine_unset_is_running(gen); return __Pyx_Coroutine_MethodReturnFromResult(self, result, ret, 0); } throw_here: __Pyx_Raise(typ, val, tb, NULL); propagate_exception: { PyObject *retval = NULL; __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, NULL, &retval, 0); __Pyx_Coroutine_unset_is_running(gen); return __Pyx_Coroutine_MethodReturnFromResult(self, result, retval, 0); } } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { PyObject *typ; PyObject *val = NULL; PyObject *tb = NULL; if (unlikely(!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))) return NULL; return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); } static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { #if PY_VERSION_HEX >= 0x030B00a4 Py_VISIT(exc_state->exc_value); #else Py_VISIT(exc_state->exc_type); Py_VISIT(exc_state->exc_value); Py_VISIT(exc_state->exc_traceback); #endif return 0; } static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { { int e = __Pyx_call_type_traverse((PyObject*)gen, 1, visit, arg); if (e) return e; } Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); __Pyx_Coroutine_Undelegate(gen); __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); } #endif Py_CLEAR(gen->gi_code); Py_CLEAR(gen->gi_frame); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); Py_CLEAR(gen->gi_modulename); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API if (gen->gi_weakreflist != NULL) #endif PyObject_ClearWeakRefs(self); if (gen->resume_label >= 0) { PyObject_GC_Track(self); #if CYTHON_USE_TP_FINALIZE if (unlikely(PyObject_CallFinalizerFromDealloc(self))) #else { destructor del = __Pyx_PyObject_GetSlot(gen, tp_del, destructor); if (del) del(self); } if (unlikely(Py_REFCNT(self) > 0)) #endif { return; } PyObject_GC_UnTrack(self); } #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { /* We have to handle this case for asynchronous generators right here, because this code has to be between UNTRACK and GC_Del. */ Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); } #endif __Pyx_Coroutine_clear(self); __Pyx_PyHeapTypeObject_GC_Del(gen); } #if CYTHON_USE_TP_FINALIZE static void __Pyx_Coroutine_del(PyObject *self) { PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; __Pyx_PyThreadState_declare if (gen->resume_label < 0) { return; } __Pyx_PyThreadState_assign __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); #ifdef __Pyx_AsyncGen_USED if (__Pyx_AsyncGen_CheckExact(self)) { __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; PyObject *finalizer = agen->ag_finalizer; if (finalizer && !agen->ag_closed) { PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); if (unlikely(!res)) { PyErr_WriteUnraisable(self); } else { Py_DECREF(res); } __Pyx_ErrRestore(error_type, error_value, error_traceback); return; } } #endif if (unlikely(gen->resume_label == 0 && !error_value)) { #ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Generator_USED if (!__Pyx_Generator_CheckExact(self)) #endif { PyObject_GC_UnTrack(self); if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) PyErr_WriteUnraisable(self); PyObject_GC_Track(self); } #endif } else { PyObject *retval = NULL; __Pyx_PySendResult result = __Pyx_Coroutine_Close(self, &retval); if (result == PYGEN_ERROR) { PyErr_WriteUnraisable(self); } else { Py_XDECREF(retval); } } __Pyx_ErrRestore(error_type, error_value, error_traceback); } #endif static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, void *context) { PyObject *name = self->gi_name; CYTHON_UNUSED_VAR(context); if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL || !PyUnicode_Check(value))) { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(self->gi_name, value); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, void *context) { PyObject *name = self->gi_qualname; CYTHON_UNUSED_VAR(context); if (unlikely(!name)) name = Py_None; Py_INCREF(name); return name; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL || !PyUnicode_Check(value))) { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_Py_XDECREF_SET(self->gi_qualname, value); return 0; } static PyObject * __Pyx__Coroutine_get_frame(__pyx_CoroutineObject *self) { #if !CYTHON_COMPILING_IN_LIMITED_API PyObject *frame; #if PY_VERSION_HEX >= 0x030d0000 Py_BEGIN_CRITICAL_SECTION(self); #endif frame = self->gi_frame; if (!frame) { if (unlikely(!self->gi_code)) { Py_RETURN_NONE; } PyObject *globals = PyDict_New(); if (unlikely(!globals)) return NULL; frame = (PyObject *) PyFrame_New( PyThreadState_Get(), /*PyThreadState *tstate,*/ (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ globals, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); Py_DECREF(globals); if (unlikely(!frame)) return NULL; if (unlikely(self->gi_frame)) { Py_DECREF(frame); frame = self->gi_frame; } else { self->gi_frame = frame; } } Py_INCREF(frame); #if PY_VERSION_HEX >= 0x030d0000 Py_END_CRITICAL_SECTION(); #endif return frame; #else CYTHON_UNUSED_VAR(self); Py_RETURN_NONE; #endif } static PyObject * __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, void *context) { CYTHON_UNUSED_VAR(context); PyObject *frame = self->gi_frame; if (frame) return __Pyx_NewRef(frame); return __Pyx__Coroutine_get_frame(self); } static __pyx_CoroutineObject *__Pyx__Coroutine_New( PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (unlikely(!gen)) return NULL; return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); } static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, PyObject *name, PyObject *qualname, PyObject *module_name) { gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->yieldfrom_am_send = NULL; #if PY_VERSION_HEX >= 0x030B00a4 && !CYTHON_COMPILING_IN_LIMITED_API gen->gi_exc_state.exc_value = NULL; #else gen->gi_exc_state.exc_type = NULL; gen->gi_exc_state.exc_value = NULL; gen->gi_exc_state.exc_traceback = NULL; #endif #if CYTHON_USE_EXC_INFO_STACK gen->gi_exc_state.previous_item = NULL; #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API gen->gi_weakreflist = NULL; #endif Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; Py_XINCREF(module_name); gen->gi_modulename = module_name; Py_XINCREF(code); gen->gi_code = code; gen->gi_frame = NULL; PyObject_GC_Track(gen); return gen; } static char __Pyx_Coroutine_test_and_set_is_running(__pyx_CoroutineObject *gen) { char result; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_BEGIN_CRITICAL_SECTION(gen); #endif result = gen->is_running; gen->is_running = 1; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_END_CRITICAL_SECTION(); #endif return result; } static void __Pyx_Coroutine_unset_is_running(__pyx_CoroutineObject *gen) { #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_BEGIN_CRITICAL_SECTION(gen); #endif assert(gen->is_running); gen->is_running = 0; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_END_CRITICAL_SECTION(); #endif } static char __Pyx_Coroutine_get_is_running(__pyx_CoroutineObject *gen) { char result; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_BEGIN_CRITICAL_SECTION(gen); #endif result = gen->is_running; #if PY_VERSION_HEX >= 0x030d0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_END_CRITICAL_SECTION(); #endif return result; } static PyObject *__Pyx_Coroutine_get_is_running_getter(PyObject *gen, void *closure) { CYTHON_UNUSED_VAR(closure); char result = __Pyx_Coroutine_get_is_running((__pyx_CoroutineObject*)gen); if (result) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #if __PYX_HAS_PY_AM_SEND == 2 static void __Pyx_SetBackportTypeAmSend(PyTypeObject *type, __Pyx_PyAsyncMethodsStruct *static_amsend_methods, __Pyx_pyiter_sendfunc am_send) { Py_ssize_t ptr_offset = (char*)(type->tp_as_async) - (char*)type; if (ptr_offset < 0 || ptr_offset > type->tp_basicsize) { return; } memcpy((void*)static_amsend_methods, (void*)(type->tp_as_async), sizeof(*type->tp_as_async)); static_amsend_methods->am_send = am_send; type->tp_as_async = __Pyx_SlotTpAsAsync(static_amsend_methods); } #endif static PyObject *__Pyx_Coroutine_fail_reduce_ex(PyObject *self, PyObject *arg) { CYTHON_UNUSED_VAR(arg); __Pyx_TypeName self_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE((PyObject*)self)); PyErr_Format(PyExc_TypeError, "cannot pickle '" __Pyx_FMT_TYPENAME "' object", self_type_name); __Pyx_DECREF_TypeName(self_type_name); return NULL; } /* Generator */ static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {"__reduce_ex__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_O, 0}, {"__reduce__", (PyCFunction) __Pyx_Coroutine_fail_reduce_ex, METH_NOARGS, 0}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {"gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, PyDoc_STR("object being iterated by 'yield from', or None")}, {"gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, {"__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), 0, 0}, #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CoroutineObject, gi_weakreflist), READONLY, 0}, #endif {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {"__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, PyDoc_STR("name of the generator"), 0}, {"__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, PyDoc_STR("qualified name of the generator"), 0}, {"gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, PyDoc_STR("Frame of the generator"), 0}, {"gi_running", __Pyx_Coroutine_get_is_running_getter, NULL, NULL, NULL}, {0, 0, 0, 0, 0} }; static PyType_Slot __pyx_GeneratorType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_Coroutine_dealloc}, {Py_tp_traverse, (void *)__Pyx_Coroutine_traverse}, {Py_tp_iter, (void *)PyObject_SelfIter}, {Py_tp_iternext, (void *)__Pyx_Generator_Next}, {Py_tp_methods, (void *)__pyx_Generator_methods}, {Py_tp_members, (void *)__pyx_Generator_memberlist}, {Py_tp_getset, (void *)__pyx_Generator_getsets}, {Py_tp_getattro, (void *) PyObject_GenericGetAttr}, #if CYTHON_USE_TP_FINALIZE {Py_tp_finalize, (void *)__Pyx_Coroutine_del}, #endif #if __PYX_HAS_PY_AM_SEND == 1 {Py_am_send, (void *)__Pyx_Coroutine_AmSend}, #endif {0, 0}, }; static PyType_Spec __pyx_GeneratorType_spec = { __PYX_TYPE_MODULE_PREFIX "generator", sizeof(__pyx_CoroutineObject), 0, #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_TPFLAGS_MANAGED_WEAKREF | #endif Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | __Pyx_TPFLAGS_HAVE_AM_SEND, __pyx_GeneratorType_slots }; #if __PYX_HAS_PY_AM_SEND == 2 static __Pyx_PyAsyncMethodsStruct __pyx_Generator_as_async; #endif static int __pyx_Generator_init(PyObject *module) { __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); mstate->__pyx_GeneratorType = __Pyx_FetchCommonTypeFromSpec( mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_GeneratorType_spec, NULL); if (unlikely(!mstate->__pyx_GeneratorType)) { return -1; } #if __PYX_HAS_PY_AM_SEND == 2 __Pyx_SetBackportTypeAmSend(mstate->__pyx_GeneratorType, &__pyx_Generator_as_async, &__Pyx_Coroutine_AmSend); #endif return 0; } static PyObject *__Pyx_Generator_GetInlinedResult(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *retval = NULL; if (unlikely(__Pyx_Coroutine_test_and_set_is_running(gen))) { return __Pyx_Coroutine_AlreadyRunningError(gen); } __Pyx_PySendResult result = __Pyx_Coroutine_SendEx(gen, Py_None, &retval, 0); __Pyx_Coroutine_unset_is_running(gen); (void) result; assert (result == PYGEN_RETURN || result == PYGEN_ERROR); assert ((result == PYGEN_RETURN && retval != NULL) || (result == PYGEN_ERROR && retval == NULL)); return retval; } /* CheckBinaryVersion */ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* NewCodeObj */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #elif PY_VERSION_HEX >= 0x030B0000 static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 if (likely(result)) result->_co_firsttraceable = 0; #endif return result; } #elif !CYTHON_COMPILING_IN_PYPY #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx__PyCode_New(a, p, 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 static PyObject* __Pyx_PyCode_New( const __Pyx_PyCode_New_function_description descr, PyObject * const *varnames, PyObject *filename, PyObject *funcname, PyObject *line_table, PyObject *tuple_dedup_map ) { PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; PyObject *varnames_tuple = PyTuple_New(var_count); if (unlikely(!varnames_tuple)) return NULL; for (Py_ssize_t i=0; i < var_count; i++) { Py_INCREF(varnames[i]); if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; } #if CYTHON_COMPILING_IN_LIMITED_API varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); if (!varnames_tuple_dedup) { if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; varnames_tuple_dedup = varnames_tuple; } #else varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); if (unlikely(!varnames_tuple_dedup)) goto done; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(varnames_tuple_dedup); #endif if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(line_table_length == -1)) goto done; #endif Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; code_bytes = PyBytes_FromStringAndSize(NULL, code_len); if (unlikely(!code_bytes)) goto done; char* c_code_bytes = PyBytes_AsString(code_bytes); if (unlikely(!c_code_bytes)) goto done; memset(c_code_bytes, 0, (size_t) code_len); } code_obj = (PyObject*) __Pyx__PyCode_New( (int) descr.argcount, (int) descr.num_posonly_args, (int) descr.num_kwonly_args, (int) descr.nlocals, 0, (int) descr.flags, code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_empty_tuple, varnames_tuple_dedup, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_empty_tuple, filename, funcname, (int) descr.first_line, (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes ); done: Py_XDECREF(code_bytes); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(varnames_tuple_dedup); #endif Py_DECREF(varnames_tuple); return code_obj; } /* DecompressString */ static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { PyObject *module = NULL, *decompress, *compressed_bytes, *decompressed; const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; PyObject *methodname = PyUnicode_FromString("decompress"); if (unlikely(!methodname)) return NULL; #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 if (algo == 3) { PyObject *fromlist = Py_BuildValue("[O]", methodname); if (unlikely(!fromlist)) goto bad; module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); Py_DECREF(fromlist); } else #endif module = PyImport_ImportModule(module_name); if (unlikely(!module)) goto import_failed; decompress = PyObject_GetAttr(module, methodname); if (unlikely(!decompress)) goto import_failed; { #ifdef __cplusplus char *memview_bytes = const_cast(s); #else #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wcast-qual" #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-qual" #endif char *memview_bytes = (char*) s; #if defined(__clang__) #pragma clang diagnostic pop #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) #pragma GCC diagnostic pop #endif #endif #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) int memview_flags = 0x100; #else int memview_flags = PyBUF_READ; #endif compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); } if (unlikely(!compressed_bytes)) { Py_DECREF(decompress); goto bad; } decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); Py_DECREF(compressed_bytes); Py_DECREF(decompress); Py_DECREF(module); Py_DECREF(methodname); return decompressed; import_failed: PyErr_Format(PyExc_ImportError, "Failed to import '%.20s.decompress' - cannot initialise module strings. " "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", module_name, algo); bad: Py_XDECREF(module); Py_DECREF(methodname); return NULL; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } 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_UTF8 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API { const char* result; Py_ssize_t unicode_length; CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; #else result = PyUnicode_AsUTF8AndSize(o, length); #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII unicode_length = PyUnicode_GetLength(o); if (unlikely(unicode_length < 0)) return NULL; if (unlikely(unicode_length != *length)) { PyUnicode_AsASCIIString(o); return NULL; } #endif return result; } #else #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_UTF8 if (PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif if (PyByteArray_Check(o)) { #if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); #else *length = PyByteArray_Size(o); if (*length == -1) return NULL; return PyByteArray_AsString(o); #endif } else { 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_LongWrongResultType(PyObject* result) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } PyErr_Format(PyExc_TypeError, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif PyObject *res = NULL; if (likely(PyLong_Check(x))) return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; if (likely(m && m->nb_int)) { res = m->nb_int(x); } #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Long(x); } #endif if (likely(res)) { if (unlikely(!PyLong_CheckExact(res))) { return __Pyx_PyNumber_LongWrongResultType(res); } } 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 (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); 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 = PyLong_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyLong_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { CYTHON_UNUSED_VAR(b); return __Pyx_NewRef(Py_None); } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return __Pyx_NewRef(b ? Py_True: Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { return PyLong_FromSize_t(ival); } /* MultiPhaseInitModuleState */ #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 #else #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 #endif #endif #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS #error "Module state with PEP489 requires atomics. Currently that's one of\ C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" #endif #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE #define __Pyx_ModuleStateLookup_Lock() #define __Pyx_ModuleStateLookup_Unlock() #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) #elif defined(__cplusplus) && __cplusplus >= 201103L #include static std::mutex __Pyx_ModuleStateLookup_mutex; #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) #include static mtx_t __Pyx_ModuleStateLookup_mutex; static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; static void __Pyx_ModuleStateLookup_initialize_mutex(void) { mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); } #define __Pyx_ModuleStateLookup_Lock()\ call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ mtx_lock(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) #elif defined(HAVE_PTHREAD_H) #include static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) #elif defined(_WIN32) #include // synchapi.h on its own doesn't work static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) #else #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ Requires C standard >= C11, or C++ standard >= C++11,\ or pthreads, or the Windows 32 API, or Python >= 3.13." #endif typedef struct { int64_t id; PyObject *module; } __Pyx_InterpreterIdAndModule; typedef struct { char interpreter_id_as_index; Py_ssize_t count; Py_ssize_t allocated; __Pyx_InterpreterIdAndModule table[1]; } __Pyx_ModuleStateLookupData; #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; #endif #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; #else static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; #endif static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( __Pyx_InterpreterIdAndModule* table, Py_ssize_t count, int64_t interpreterId) { __Pyx_InterpreterIdAndModule* begin = table; __Pyx_InterpreterIdAndModule* end = begin + count; if (begin->id == interpreterId) { return begin; } while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; if (halfway->id == interpreterId) { return halfway; } if (halfway->id < interpreterId) { begin = halfway; } else { end = halfway; } } for (; begin < end; ++begin) { if (begin->id >= interpreterId) return begin; } return begin; } static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); if (interpreter_id == -1) return NULL; #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); { __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); if (likely(data)) { __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); if (likely(data == new_data)) { goto read_finished; } } __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); __Pyx_ModuleStateLookup_Lock(); __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); __Pyx_ModuleStateLookup_Unlock(); } read_finished:; #else __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; #endif __Pyx_InterpreterIdAndModule* found = NULL; if (unlikely(!data)) goto end; if (data->interpreter_id_as_index) { if (interpreter_id < data->count) { found = data->table+interpreter_id; } } else { found = __Pyx_State_FindModuleStateLookupTableLowerBound( data->table, data->count, interpreter_id); } end: { PyObject *result=NULL; if (found && found->id == interpreter_id) { result = found->module; } #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); #endif return result; } } #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); } #else #define __Pyx_ModuleStateLookup_wait_until_no_readers() #endif static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { Py_ssize_t to_allocate = (*old_data)->allocated; while (to_allocate <= interpreter_id) { if (to_allocate == 0) to_allocate = 1; else to_allocate *= 2; } __Pyx_ModuleStateLookupData *new_data = *old_data; if (to_allocate != (*old_data)->allocated) { new_data = (__Pyx_ModuleStateLookupData *)realloc( *old_data, sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); if (!new_data) { PyErr_NoMemory(); return -1; } for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { new_data->table[i].id = i; new_data->table[i].module = NULL; } new_data->allocated = to_allocate; } new_data->table[interpreter_id].module = module; if (new_data->count < interpreter_id+1) { new_data->count = interpreter_id+1; } *old_data = new_data; return 0; } static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { __Pyx_InterpreterIdAndModule *read = data->table; __Pyx_InterpreterIdAndModule *write = data->table; __Pyx_InterpreterIdAndModule *end = read + data->count; for (; readmodule) { write->id = read->id; write->module = read->module; ++write; } } data->count = write - data->table; for (; writeid = 0; write->module = NULL; } data->interpreter_id_as_index = 0; } static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); if (interpreter_id == -1) return -1; int result = 0; __Pyx_ModuleStateLookup_Lock(); #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); #else __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; #endif __Pyx_ModuleStateLookupData *new_data = old_data; if (!new_data) { new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); if (!new_data) { result = -1; PyErr_NoMemory(); goto end; } new_data->allocated = 1; new_data->interpreter_id_as_index = 1; } __Pyx_ModuleStateLookup_wait_until_no_readers(); if (new_data->interpreter_id_as_index) { if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); goto end; } __Pyx_State_ConvertFromInterpIdAsIndex(new_data); } { Py_ssize_t insert_at = 0; { __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( new_data->table, new_data->count, interpreter_id); assert(lower_bound); insert_at = lower_bound - new_data->table; if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { lower_bound->module = module; goto end; // already in table, nothing more to do } } if (new_data->count+1 >= new_data->allocated) { Py_ssize_t to_allocate = (new_data->count+1)*2; new_data = (__Pyx_ModuleStateLookupData*)realloc( new_data, sizeof(__Pyx_ModuleStateLookupData) + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); if (!new_data) { result = -1; new_data = old_data; PyErr_NoMemory(); goto end; } new_data->allocated = to_allocate; } ++new_data->count; int64_t last_id = interpreter_id; PyObject *last_module = module; for (Py_ssize_t i=insert_at; icount; ++i) { int64_t current_id = new_data->table[i].id; new_data->table[i].id = last_id; last_id = current_id; PyObject *current_module = new_data->table[i].module; new_data->table[i].module = last_module; last_module = current_module; } } end: #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); #else __Pyx_ModuleStateLookup_data = new_data; #endif __Pyx_ModuleStateLookup_Unlock(); return result; } static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); if (interpreter_id == -1) return -1; __Pyx_ModuleStateLookup_Lock(); #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); #else __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; #endif if (data->interpreter_id_as_index) { if (interpreter_id < data->count) { data->table[interpreter_id].module = NULL; } goto done; } { __Pyx_ModuleStateLookup_wait_until_no_readers(); __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( data->table, data->count, interpreter_id); if (!lower_bound) goto done; if (lower_bound->id != interpreter_id) goto done; __Pyx_InterpreterIdAndModule *end = data->table+data->count; for (;lower_boundid = (lower_bound+1)->id; lower_bound->module = (lower_bound+1)->module; } } --data->count; if (data->count == 0) { free(data); data = NULL; } done: #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); #else __Pyx_ModuleStateLookup_data = data; #endif __Pyx_ModuleStateLookup_Unlock(); return 0; } #endif /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */