From aa8f1e5ef4ef80cc5bdd059a1c045c88fa455c91 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Sun, 24 May 2020 00:29:31 +0300 Subject: [PATCH] add cython implementation --- .python-version | 1 + src/hunter/__init__.py | 2 +- src/hunter/_event.c | 2756 +++++---- src/hunter/_event.pyx | 25 +- src/hunter/_predicates.c | 11414 ++++++++++++++++++++++++----------- src/hunter/_predicates.pxd | 3 +- src/hunter/_predicates.pyx | 15 +- src/hunter/_tracer.c | 24 + tests/test_tracer.py | 3 +- 9 files changed, 9468 insertions(+), 4775 deletions(-) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..9fb2c23 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +hunter diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index de360a0..a8ce582 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -17,13 +17,13 @@ from .actions import StackPrinter from .actions import VarsPrinter from .actions import VarsSnooper - try: if os.environ.get("PUREPYTHONHUNTER"): raise ImportError("Cython speedups are disabled.") from ._event import Event from ._predicates import And as _And + from ._predicates import Backlog as _Backlog from ._predicates import From as _From from ._predicates import Not as _Not from ._predicates import Or as _Or diff --git a/src/hunter/_event.c b/src/hunter/_event.c index 113c9fe..b13f315 100644 --- a/src/hunter/_event.c +++ b/src/hunter/_event.c @@ -810,6 +810,8 @@ static const char *__pyx_f[] = { "src/hunter/_event.pxd", "stringsource", ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_tracer.pxd", }; @@ -872,7 +874,7 @@ struct __pyx_obj_6hunter_6_event_Event { }; -/* "hunter/_event.pyx":297 +/* "hunter/_event.pyx":314 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -896,7 +898,7 @@ struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines { -/* "hunter/_event.pyx":29 +/* "hunter/_event.pyx":30 * * * cdef class Event: # <<<<<<<<<<<<<< @@ -1240,6 +1242,16 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; #endif +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + /* IterFinish.proto */ static CYTHON_INLINE int __Pyx_IterFinish(void); @@ -1266,13 +1278,6 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif -/* PyObjectCall.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); @@ -1546,9 +1551,6 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); -/* RaiseException.proto */ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); @@ -1717,6 +1719,74 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; +/* Module declarations from 'cpython.version' */ + +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'cpython.exc' */ + +/* Module declarations from 'cpython.module' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'cpython.tuple' */ + +/* Module declarations from 'cpython.list' */ + +/* Module declarations from 'cpython.sequence' */ + +/* Module declarations from 'cpython.mapping' */ + +/* Module declarations from 'cpython.iterator' */ + +/* Module declarations from 'cpython.number' */ + +/* Module declarations from 'cpython.int' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.bool' */ +static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; + +/* Module declarations from 'cpython.long' */ + +/* Module declarations from 'cpython.float' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.complex' */ +static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; + +/* Module declarations from 'cpython.string' */ + +/* Module declarations from 'cpython.unicode' */ + +/* Module declarations from 'cpython.dict' */ + +/* Module declarations from 'cpython.instance' */ + +/* Module declarations from 'cpython.function' */ + +/* Module declarations from 'cpython.method' */ + +/* Module declarations from 'cpython.weakref' */ + +/* Module declarations from 'cpython.getargs' */ + +/* Module declarations from 'cpython.pythread' */ + +/* Module declarations from 'cpython.cobject' */ + +/* Module declarations from 'cpython.oldbuffer' */ + +/* Module declarations from 'cpython.set' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'cpython.bytes' */ + +/* Module declarations from 'cpython.pycapsule' */ + /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ @@ -1730,8 +1800,6 @@ static PyTypeObject *__pyx_ptype_6hunter_7_tracer_CodeType = 0; static PyTypeObject *__pyx_ptype_6hunter_7_tracer_FrameType = 0; static PyTypeObject *__pyx_ptype_6hunter_7_tracer_Tracer = 0; -/* Module declarations from 'cpython.pythread' */ - /* Module declarations from 'hunter._event' */ static PyTypeObject *__pyx_ptype_6hunter_6_event_Event = 0; static PyTypeObject *__pyx_ptype_6hunter_6_event___pyx_scope_struct__yield_lines = 0; @@ -1743,10 +1811,11 @@ int __pyx_module_is_main_hunter___event = 0; /* Implementation of 'hunter._event' */ static PyObject *__pyx_builtin_object; -static const char __pyx_k_[] = ""; -static const char __pyx_k__7[] = "."; +static PyObject *__pyx_builtin_TypeError; +static const char __pyx_k__5[] = ""; static const char __pyx_k_py[] = ".py"; static const char __pyx_k_so[] = ".so"; +static const char __pyx_k__11[] = "."; static const char __pyx_k_all[] = "__all__"; static const char __pyx_k_arg[] = "arg"; static const char __pyx_k_def[] = "def"; @@ -1773,9 +1842,11 @@ static const char __pyx_k_site[] = "site"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_util[] = "util"; static const char __pyx_k_Event[] = "Event"; +static const char __pyx_k_calls[] = "calls"; static const char __pyx_k_class[] = "class"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_const[] = "const"; +static const char __pyx_k_depth[] = "depth"; static const char __pyx_k_frame[] = "frame"; static const char __pyx_k_ident[] = "ident"; static const char __pyx_k_items[] = "items"; @@ -1820,6 +1891,7 @@ static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_splitext[] = "splitext"; static const char __pyx_k_threadid[] = "threadid"; static const char __pyx_k_tokenize[] = "tokenize"; +static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_collector[] = "collector"; static const char __pyx_k_functools[] = "functools"; static const char __pyx_k_linecache[] = "linecache"; @@ -1854,15 +1926,17 @@ static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_CYTHON_SUFFIX_RE[] = "CYTHON_SUFFIX_RE"; static const char __pyx_k_SYS_PREFIX_PATHS[] = "SYS_PREFIX_PATHS"; +static const char __pyx_k_threading_support[] = "threading_support"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_pyx_unpickle_Event[] = "__pyx_unpickle_Event"; static const char __pyx_k_SITE_PACKAGES_PATHS[] = "SITE_PACKAGES_PATHS"; static const char __pyx_k_LEADING_WHITESPACE_RE[] = "LEADING_WHITESPACE_RE"; static const char __pyx_k_src_hunter__event_pyx[] = "src/hunter/_event.pyx"; static const char __pyx_k_NO_SOURCE_not_reading_file[] = "\077\077? NO SOURCE: not reading {} file"; +static const char __pyx_k_Depth_calls_and_threading_suppor[] = "Depth, calls and threading support need to be specified when creating and event"; static const char __pyx_k_Incompatible_checksums_s_vs_0x36[] = "Incompatible checksums (%s vs 0x36bd738 = (_code, _filename, _fullsource, _function, _function_object, _globals, _lineno, _locals, _module, _source, _stdlib, _thread, _threadidn, _threadname, arg, calls, depth, detached, frame, kind, threading_support))"; -static PyObject *__pyx_kp_s_; static PyObject *__pyx_n_s_CYTHON_SUFFIX_RE; +static PyObject *__pyx_kp_s_Depth_calls_and_threading_suppor; static PyObject *__pyx_n_s_Event; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x36; static PyObject *__pyx_n_s_LEADING_WHITESPACE_RE; @@ -1872,13 +1946,16 @@ static PyObject *__pyx_n_s_PickleError; static PyObject *__pyx_n_s_SITE_PACKAGES_PATHS; static PyObject *__pyx_n_s_SYS_PREFIX_PATHS; static PyObject *__pyx_n_s_TokenError; -static PyObject *__pyx_kp_s__7; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_kp_s__11; +static PyObject *__pyx_kp_s__5; static PyObject *__pyx_n_s_all; static PyObject *__pyx_n_s_amount; static PyObject *__pyx_n_s_arg; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_basename; static PyObject *__pyx_n_s_call; +static PyObject *__pyx_n_s_calls; static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_close; @@ -1891,6 +1968,7 @@ static PyObject *__pyx_n_s_const; static PyObject *__pyx_n_s_current_thread; static PyObject *__pyx_n_s_dedent; static PyObject *__pyx_n_s_def; +static PyObject *__pyx_n_s_depth; static PyObject *__pyx_n_s_dict; static PyObject *__pyx_n_s_endswith; static PyObject *__pyx_n_s_exists; @@ -1970,6 +2048,7 @@ static PyObject *__pyx_n_s_sub; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_threadid; static PyObject *__pyx_n_s_threading; +static PyObject *__pyx_n_s_threading_support; static PyObject *__pyx_n_s_threadname; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_tokenize; @@ -1979,8 +2058,10 @@ static PyObject *__pyx_n_s_util; static PyObject *__pyx_n_s_value_filter; static PyObject *__pyx_n_s_values; static PyObject *__pyx_n_s_yield_lines; -static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyFrameObject *__pyx_v_frame, PyObject *__pyx_v_kind, PyObject *__pyx_v_arg, struct __pyx_obj_6hunter_7_tracer_Tracer *__pyx_v_tracer); /* proto */ +static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyFrameObject *__pyx_v_frame, PyObject *__pyx_v_kind, PyObject *__pyx_v_arg, struct __pyx_obj_6hunter_7_tracer_Tracer *__pyx_v_tracer, PyObject *__pyx_v_depth, PyObject *__pyx_v_calls, PyObject *__pyx_v_threading_support); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_value_filter); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_4set_frame(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_frame); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_6make_fake_event(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ @@ -1994,7 +2075,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_6_event_5Event_4__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_8__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_5frame___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_4kind___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_3arg___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ @@ -2002,8 +2083,8 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj static PyObject *__pyx_pf_6hunter_6_event_5Event_5calls___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_17threading_support___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_8detached___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_6_event_5Event_6__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_6_event_5Event_8__setstate_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_10__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_12__setstate_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_yield_lines(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_module_globals, PyObject *__pyx_v_start, PyObject *__pyx_v_collector, PyObject *__pyx_v_limit); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_3__pyx_unpickle_Event(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_6hunter_6_event_Event(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -2012,24 +2093,28 @@ static PyObject *__pyx_int_1; static PyObject *__pyx_int_10; static PyObject *__pyx_int_57399096; static PyObject *__pyx_int_neg_1; -static PyObject *__pyx_slice__4; -static PyObject *__pyx_tuple__2; -static PyObject *__pyx_tuple__3; -static PyObject *__pyx_tuple__5; +static PyObject *__pyx_k_; +static PyObject *__pyx_k__2; +static PyObject *__pyx_k__3; +static PyObject *__pyx_slice__8; +static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; -static PyObject *__pyx_tuple__11; -static PyObject *__pyx_tuple__12; -static PyObject *__pyx_codeobj__8; -static PyObject *__pyx_codeobj__9; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_codeobj__12; +static PyObject *__pyx_codeobj__13; /* Late includes */ -/* "hunter/_event.pyx":43 +/* "hunter/_event.pyx":44 * Needed for the ``calls`` and ``depth`` fields. * """ - * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer): # <<<<<<<<<<<<<< - * self.arg = arg - * self.frame = frame + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): # <<<<<<<<<<<<<< + * if tracer is None: + * if UNSET in (depth, calls, threading_support): */ /* Python wrapper */ @@ -2039,16 +2124,29 @@ static int __pyx_pw_6hunter_6_event_5Event_1__init__(PyObject *__pyx_v_self, PyO PyObject *__pyx_v_kind = 0; PyObject *__pyx_v_arg = 0; struct __pyx_obj_6hunter_7_tracer_Tracer *__pyx_v_tracer = 0; + PyObject *__pyx_v_depth = 0; + PyObject *__pyx_v_calls = 0; + PyObject *__pyx_v_threading_support = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_kind,&__pyx_n_s_arg,&__pyx_n_s_tracer,0}; - PyObject* values[4] = {0,0,0,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frame,&__pyx_n_s_kind,&__pyx_n_s_arg,&__pyx_n_s_tracer,&__pyx_n_s_depth,&__pyx_n_s_calls,&__pyx_n_s_threading_support,0}; + PyObject* values[7] = {0,0,0,0,0,0,0}; + values[3] = (PyObject *)((struct __pyx_obj_6hunter_7_tracer_Tracer *)Py_None); + values[4] = __pyx_k_; + values[5] = __pyx_k__2; + values[6] = __pyx_k__3; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); @@ -2069,49 +2167,79 @@ static int __pyx_pw_6hunter_6_event_5Event_1__init__(PyObject *__pyx_v_self, PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kind)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 43, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, 1); __PYX_ERR(0, 44, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 43, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, 2); __PYX_ERR(0, 44, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: - if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tracer)) != 0)) kw_args--; - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 43, __pyx_L3_error) + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tracer); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth); + if (value) { values[4] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 5: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_calls); + if (value) { values[5] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 6: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_threading_support); + if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 43, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 44, __pyx_L3_error) } - } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { - goto __pyx_L5_argtuple_error; } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - values[2] = PyTuple_GET_ITEM(__pyx_args, 2); - values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } } __pyx_v_frame = ((PyFrameObject *)values[0]); __pyx_v_kind = ((PyObject*)values[1]); __pyx_v_arg = values[2]; __pyx_v_tracer = ((struct __pyx_obj_6hunter_7_tracer_Tracer *)values[3]); + __pyx_v_depth = values[4]; + __pyx_v_calls = values[5]; + __pyx_v_threading_support = values[6]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 43, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 44, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._event.Event.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_frame), __pyx_ptype_6hunter_7_tracer_FrameType, 1, "frame", 0))) __PYX_ERR(0, 43, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kind), (&PyString_Type), 1, "kind", 1))) __PYX_ERR(0, 43, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tracer), __pyx_ptype_6hunter_7_tracer_Tracer, 1, "tracer", 0))) __PYX_ERR(0, 43, __pyx_L1_error) - __pyx_r = __pyx_pf_6hunter_6_event_5Event___init__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), __pyx_v_frame, __pyx_v_kind, __pyx_v_arg, __pyx_v_tracer); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_frame), __pyx_ptype_6hunter_7_tracer_FrameType, 1, "frame", 0))) __PYX_ERR(0, 44, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_kind), (&PyString_Type), 1, "kind", 1))) __PYX_ERR(0, 44, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tracer), __pyx_ptype_6hunter_7_tracer_Tracer, 1, "tracer", 0))) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_r = __pyx_pf_6hunter_6_event_5Event___init__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), __pyx_v_frame, __pyx_v_kind, __pyx_v_arg, __pyx_v_tracer, __pyx_v_depth, __pyx_v_calls, __pyx_v_threading_support); /* function exit code */ goto __pyx_L0; @@ -2122,317 +2250,450 @@ static int __pyx_pw_6hunter_6_event_5Event_1__init__(PyObject *__pyx_v_self, PyO return __pyx_r; } -static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyFrameObject *__pyx_v_frame, PyObject *__pyx_v_kind, PyObject *__pyx_v_arg, struct __pyx_obj_6hunter_7_tracer_Tracer *__pyx_v_tracer) { +static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyFrameObject *__pyx_v_frame, PyObject *__pyx_v_kind, PyObject *__pyx_v_arg, struct __pyx_obj_6hunter_7_tracer_Tracer *__pyx_v_tracer, PyObject *__pyx_v_depth, PyObject *__pyx_v_calls, PyObject *__pyx_v_threading_support) { int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 43, 0, __PYX_ERR(0, 43, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 44, 0, __PYX_ERR(0, 44, __pyx_L1_error)); + __Pyx_INCREF(__pyx_v_depth); + __Pyx_INCREF(__pyx_v_calls); + __Pyx_INCREF(__pyx_v_threading_support); - /* "hunter/_event.pyx":44 + /* "hunter/_event.pyx":45 * """ - * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer): + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): + * if tracer is None: # <<<<<<<<<<<<<< + * if UNSET in (depth, calls, threading_support): + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") + */ + __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)__pyx_v_tracer) == Py_None); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "hunter/_event.pyx":46 + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): + * if tracer is None: + * if UNSET in (depth, calls, threading_support): # <<<<<<<<<<<<<< + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") + * else: + */ + __Pyx_TraceLine(46,0,__PYX_ERR(0, 46, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); + __pyx_t_3 = __pyx_v_6hunter_6_event_UNSET; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_depth, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_calls, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_1) { + } else { + __pyx_t_2 = __pyx_t_1; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_threading_support, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 46, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = __pyx_t_1; + __pyx_L5_bool_binop_done:; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = (__pyx_t_2 != 0); + if (unlikely(__pyx_t_1)) { + + /* "hunter/_event.pyx":47 + * if tracer is None: + * if UNSET in (depth, calls, threading_support): + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") # <<<<<<<<<<<<<< + * else: + * depth = tracer.depth + */ + __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __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, 47, __pyx_L1_error) + + /* "hunter/_event.pyx":46 + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): + * if tracer is None: + * if UNSET in (depth, calls, threading_support): # <<<<<<<<<<<<<< + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") + * else: + */ + } + + /* "hunter/_event.pyx":45 + * """ + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): + * if tracer is None: # <<<<<<<<<<<<<< + * if UNSET in (depth, calls, threading_support): + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") + */ + goto __pyx_L3; + } + + /* "hunter/_event.pyx":49 + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") + * else: + * depth = tracer.depth # <<<<<<<<<<<<<< + * calls = tracer.calls + * threading_support = tracer.threading_support + */ + __Pyx_TraceLine(49,0,__PYX_ERR(0, 49, __pyx_L1_error)) + /*else*/ { + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_tracer->depth); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_depth, __pyx_t_3); + __pyx_t_3 = 0; + + /* "hunter/_event.pyx":50 + * else: + * depth = tracer.depth + * calls = tracer.calls # <<<<<<<<<<<<<< + * threading_support = tracer.threading_support + * + */ + __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_tracer->calls); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_calls, __pyx_t_3); + __pyx_t_3 = 0; + + /* "hunter/_event.pyx":51 + * depth = tracer.depth + * calls = tracer.calls + * threading_support = tracer.threading_support # <<<<<<<<<<<<<< + * + * self.arg = arg + */ + __Pyx_TraceLine(51,0,__PYX_ERR(0, 51, __pyx_L1_error)) + __pyx_t_3 = __pyx_v_tracer->threading_support; + __Pyx_INCREF(__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_threading_support, __pyx_t_3); + __pyx_t_3 = 0; + } + __pyx_L3:; + + /* "hunter/_event.pyx":53 + * threading_support = tracer.threading_support + * * self.arg = arg # <<<<<<<<<<<<<< * self.frame = frame * self.kind = kind */ - __Pyx_TraceLine(44,0,__PYX_ERR(0, 44, __pyx_L1_error)) + __Pyx_TraceLine(53,0,__PYX_ERR(0, 53, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); __Pyx_GOTREF(__pyx_v_self->arg); __Pyx_DECREF(__pyx_v_self->arg); __pyx_v_self->arg = __pyx_v_arg; - /* "hunter/_event.pyx":45 - * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer): + /* "hunter/_event.pyx":54 + * * self.arg = arg * self.frame = frame # <<<<<<<<<<<<<< * self.kind = kind - * self.depth = tracer.depth + * self.depth = depth */ - __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L1_error)) + __Pyx_TraceLine(54,0,__PYX_ERR(0, 54, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_frame)); __Pyx_GIVEREF(((PyObject *)__pyx_v_frame)); __Pyx_GOTREF(__pyx_v_self->frame); __Pyx_DECREF(((PyObject *)__pyx_v_self->frame)); __pyx_v_self->frame = __pyx_v_frame; - /* "hunter/_event.pyx":46 + /* "hunter/_event.pyx":55 * self.arg = arg * self.frame = frame * self.kind = kind # <<<<<<<<<<<<<< - * self.depth = tracer.depth - * self.calls = tracer.calls + * self.depth = depth + * self.calls = calls */ - __Pyx_TraceLine(46,0,__PYX_ERR(0, 46, __pyx_L1_error)) + __Pyx_TraceLine(55,0,__PYX_ERR(0, 55, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_kind); __Pyx_GIVEREF(__pyx_v_kind); __Pyx_GOTREF(__pyx_v_self->kind); __Pyx_DECREF(__pyx_v_self->kind); __pyx_v_self->kind = __pyx_v_kind; - /* "hunter/_event.pyx":47 + /* "hunter/_event.pyx":56 * self.frame = frame * self.kind = kind - * self.depth = tracer.depth # <<<<<<<<<<<<<< - * self.calls = tracer.calls - * self.threading_support = tracer.threading_support + * self.depth = depth # <<<<<<<<<<<<<< + * self.calls = calls + * self.threading_support = threading_support */ - __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_tracer->depth; - __pyx_v_self->depth = __pyx_t_1; + __Pyx_TraceLine(56,0,__PYX_ERR(0, 56, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_depth); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L1_error) + __pyx_v_self->depth = __pyx_t_5; - /* "hunter/_event.pyx":48 + /* "hunter/_event.pyx":57 * self.kind = kind - * self.depth = tracer.depth - * self.calls = tracer.calls # <<<<<<<<<<<<<< - * self.threading_support = tracer.threading_support + * self.depth = depth + * self.calls = calls # <<<<<<<<<<<<<< + * self.threading_support = threading_support * self.detached = False */ - __Pyx_TraceLine(48,0,__PYX_ERR(0, 48, __pyx_L1_error)) - __pyx_t_1 = __pyx_v_tracer->calls; - __pyx_v_self->calls = __pyx_t_1; + __Pyx_TraceLine(57,0,__PYX_ERR(0, 57, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_calls); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_v_self->calls = __pyx_t_5; - /* "hunter/_event.pyx":49 - * self.depth = tracer.depth - * self.calls = tracer.calls - * self.threading_support = tracer.threading_support # <<<<<<<<<<<<<< + /* "hunter/_event.pyx":58 + * self.depth = depth + * self.calls = calls + * self.threading_support = threading_support # <<<<<<<<<<<<<< * self.detached = False * */ - __Pyx_TraceLine(49,0,__PYX_ERR(0, 49, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_tracer->threading_support); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 49, __pyx_L1_error) - __pyx_v_self->threading_support = __pyx_t_2; + __Pyx_TraceLine(58,0,__PYX_ERR(0, 58, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_threading_support); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 58, __pyx_L1_error) + __pyx_v_self->threading_support = __pyx_t_1; - /* "hunter/_event.pyx":50 - * self.calls = tracer.calls - * self.threading_support = tracer.threading_support + /* "hunter/_event.pyx":59 + * self.calls = calls + * self.threading_support = threading_support * self.detached = False # <<<<<<<<<<<<<< * * self._code = UNSET */ - __Pyx_TraceLine(50,0,__PYX_ERR(0, 50, __pyx_L1_error)) + __Pyx_TraceLine(59,0,__PYX_ERR(0, 59, __pyx_L1_error)) __pyx_v_self->detached = 0; - /* "hunter/_event.pyx":52 + /* "hunter/_event.pyx":61 * self.detached = False * * self._code = UNSET # <<<<<<<<<<<<<< * self._filename = UNSET * self._fullsource = UNSET */ - __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error)) + __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_code); __Pyx_DECREF(__pyx_v_self->_code); __pyx_v_self->_code = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":53 + /* "hunter/_event.pyx":62 * * self._code = UNSET * self._filename = UNSET # <<<<<<<<<<<<<< * self._fullsource = UNSET * self._function_object = UNSET */ - __Pyx_TraceLine(53,0,__PYX_ERR(0, 53, __pyx_L1_error)) + __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_filename); __Pyx_DECREF(__pyx_v_self->_filename); __pyx_v_self->_filename = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":54 + /* "hunter/_event.pyx":63 * self._code = UNSET * self._filename = UNSET * self._fullsource = UNSET # <<<<<<<<<<<<<< * self._function_object = UNSET * self._function = UNSET */ - __Pyx_TraceLine(54,0,__PYX_ERR(0, 54, __pyx_L1_error)) + __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_fullsource); __Pyx_DECREF(__pyx_v_self->_fullsource); __pyx_v_self->_fullsource = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":55 + /* "hunter/_event.pyx":64 * self._filename = UNSET * self._fullsource = UNSET * self._function_object = UNSET # <<<<<<<<<<<<<< * self._function = UNSET * self._globals = UNSET */ - __Pyx_TraceLine(55,0,__PYX_ERR(0, 55, __pyx_L1_error)) + __Pyx_TraceLine(64,0,__PYX_ERR(0, 64, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_function_object); __Pyx_DECREF(__pyx_v_self->_function_object); __pyx_v_self->_function_object = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":56 + /* "hunter/_event.pyx":65 * self._fullsource = UNSET * self._function_object = UNSET * self._function = UNSET # <<<<<<<<<<<<<< * self._globals = UNSET * self._lineno = UNSET */ - __Pyx_TraceLine(56,0,__PYX_ERR(0, 56, __pyx_L1_error)) + __Pyx_TraceLine(65,0,__PYX_ERR(0, 65, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_function); __Pyx_DECREF(__pyx_v_self->_function); __pyx_v_self->_function = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":57 + /* "hunter/_event.pyx":66 * self._function_object = UNSET * self._function = UNSET * self._globals = UNSET # <<<<<<<<<<<<<< * self._lineno = UNSET * self._locals = UNSET */ - __Pyx_TraceLine(57,0,__PYX_ERR(0, 57, __pyx_L1_error)) + __Pyx_TraceLine(66,0,__PYX_ERR(0, 66, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_globals); __Pyx_DECREF(__pyx_v_self->_globals); __pyx_v_self->_globals = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":58 + /* "hunter/_event.pyx":67 * self._function = UNSET * self._globals = UNSET * self._lineno = UNSET # <<<<<<<<<<<<<< * self._locals = UNSET * self._module = UNSET */ - __Pyx_TraceLine(58,0,__PYX_ERR(0, 58, __pyx_L1_error)) + __Pyx_TraceLine(67,0,__PYX_ERR(0, 67, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_lineno); __Pyx_DECREF(__pyx_v_self->_lineno); __pyx_v_self->_lineno = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":59 + /* "hunter/_event.pyx":68 * self._globals = UNSET * self._lineno = UNSET * self._locals = UNSET # <<<<<<<<<<<<<< * self._module = UNSET * self._source = UNSET */ - __Pyx_TraceLine(59,0,__PYX_ERR(0, 59, __pyx_L1_error)) + __Pyx_TraceLine(68,0,__PYX_ERR(0, 68, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_locals); __Pyx_DECREF(__pyx_v_self->_locals); __pyx_v_self->_locals = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":60 + /* "hunter/_event.pyx":69 * self._lineno = UNSET * self._locals = UNSET * self._module = UNSET # <<<<<<<<<<<<<< * self._source = UNSET * self._stdlib = UNSET */ - __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error)) + __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_module); __Pyx_DECREF(__pyx_v_self->_module); __pyx_v_self->_module = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":61 + /* "hunter/_event.pyx":70 * self._locals = UNSET * self._module = UNSET * self._source = UNSET # <<<<<<<<<<<<<< * self._stdlib = UNSET * self._threadidn = UNSET */ - __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error)) + __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_source); __Pyx_DECREF(__pyx_v_self->_source); __pyx_v_self->_source = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":62 + /* "hunter/_event.pyx":71 * self._module = UNSET * self._source = UNSET * self._stdlib = UNSET # <<<<<<<<<<<<<< * self._threadidn = UNSET * self._threadname = UNSET */ - __Pyx_TraceLine(62,0,__PYX_ERR(0, 62, __pyx_L1_error)) + __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_stdlib); __Pyx_DECREF(__pyx_v_self->_stdlib); __pyx_v_self->_stdlib = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":63 + /* "hunter/_event.pyx":72 * self._source = UNSET * self._stdlib = UNSET * self._threadidn = UNSET # <<<<<<<<<<<<<< * self._threadname = UNSET * self._thread = UNSET */ - __Pyx_TraceLine(63,0,__PYX_ERR(0, 63, __pyx_L1_error)) + __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_threadidn); __Pyx_DECREF(__pyx_v_self->_threadidn); __pyx_v_self->_threadidn = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":64 + /* "hunter/_event.pyx":73 * self._stdlib = UNSET * self._threadidn = UNSET * self._threadname = UNSET # <<<<<<<<<<<<<< * self._thread = UNSET * */ - __Pyx_TraceLine(64,0,__PYX_ERR(0, 64, __pyx_L1_error)) + __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_threadname); __Pyx_DECREF(__pyx_v_self->_threadname); __pyx_v_self->_threadname = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":65 + /* "hunter/_event.pyx":74 * self._threadidn = UNSET * self._threadname = UNSET * self._thread = UNSET # <<<<<<<<<<<<<< * * def detach(self, value_filter=None): */ - __Pyx_TraceLine(65,0,__PYX_ERR(0, 65, __pyx_L1_error)) + __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_GOTREF(__pyx_v_self->_thread); __Pyx_DECREF(__pyx_v_self->_thread); __pyx_v_self->_thread = __pyx_v_6hunter_6_event_UNSET; - /* "hunter/_event.pyx":43 + /* "hunter/_event.pyx":44 * Needed for the ``calls`` and ``depth`` fields. * """ - * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer): # <<<<<<<<<<<<<< - * self.arg = arg - * self.frame = frame + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): # <<<<<<<<<<<<<< + * if tracer is None: + * if UNSET in (depth, calls, threading_support): */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("hunter._event.Event.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; + __Pyx_XDECREF(__pyx_v_depth); + __Pyx_XDECREF(__pyx_v_calls); + __Pyx_XDECREF(__pyx_v_threading_support); __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_event.pyx":67 +/* "hunter/_event.pyx":76 * self._thread = UNSET * * def detach(self, value_filter=None): # <<<<<<<<<<<<<< @@ -2469,7 +2730,7 @@ static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "detach") < 0)) __PYX_ERR(0, 67, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "detach") < 0)) __PYX_ERR(0, 76, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -2483,7 +2744,7 @@ static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("detach", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("detach", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 76, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._event.Event.detach", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2516,17 +2777,17 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte int __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("detach", 0); - __Pyx_TraceCall("detach", __pyx_f[0], 67, 0, __PYX_ERR(0, 67, __pyx_L1_error)); + __Pyx_TraceCall("detach", __pyx_f[0], 76, 0, __PYX_ERR(0, 76, __pyx_L1_error)); - /* "hunter/_event.pyx":68 + /* "hunter/_event.pyx":77 * * def detach(self, value_filter=None): * event = Event.__new__(Event) # <<<<<<<<<<<<<< * * event._code = self.code */ - __Pyx_TraceLine(68,0,__PYX_ERR(0, 68, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_tp_new_6hunter_6_event_Event(((PyTypeObject *)__pyx_ptype_6hunter_6_event_Event), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error)) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_6hunter_6_event_Event(((PyTypeObject *)__pyx_ptype_6hunter_6_event_Event), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); @@ -2534,15 +2795,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":70 + /* "hunter/_event.pyx":79 * event = Event.__new__(Event) * * event._code = self.code # <<<<<<<<<<<<<< * event._filename = self.filename * event._fullsource = self.fullsource */ - __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_code); @@ -2550,15 +2811,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_code = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":71 + /* "hunter/_event.pyx":80 * * event._code = self.code * event._filename = self.filename # <<<<<<<<<<<<<< * event._fullsource = self.fullsource * event._function_object = self._function_object */ - __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_filename); @@ -2566,15 +2827,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_filename = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":72 + /* "hunter/_event.pyx":81 * event._code = self.code * event._filename = self.filename * event._fullsource = self.fullsource # <<<<<<<<<<<<<< * event._function_object = self._function_object * event._function = self.function */ - __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fullsource); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fullsource); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_fullsource); @@ -2582,14 +2843,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_fullsource = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":73 + /* "hunter/_event.pyx":82 * event._filename = self.filename * event._fullsource = self.fullsource * event._function_object = self._function_object # <<<<<<<<<<<<<< * event._function = self.function * event._lineno = self.lineno */ - __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error)) + __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_function_object; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -2598,15 +2859,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_function_object = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":74 + /* "hunter/_event.pyx":83 * event._fullsource = self.fullsource * event._function_object = self._function_object * event._function = self.function # <<<<<<<<<<<<<< * event._lineno = self.lineno * event._module = self.module */ - __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_function); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_function); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_function); @@ -2614,15 +2875,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_function = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":75 + /* "hunter/_event.pyx":84 * event._function_object = self._function_object * event._function = self.function * event._lineno = self.lineno # <<<<<<<<<<<<<< * event._module = self.module * event._source = self.source */ - __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_lineno); @@ -2630,15 +2891,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_lineno = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":76 + /* "hunter/_event.pyx":85 * event._function = self.function * event._lineno = self.lineno * event._module = self.module # <<<<<<<<<<<<<< * event._source = self.source * event._stdlib = self.stdlib */ - __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_module); @@ -2646,15 +2907,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_module = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":77 + /* "hunter/_event.pyx":86 * event._lineno = self.lineno * event._module = self.module * event._source = self.source # <<<<<<<<<<<<<< * event._stdlib = self.stdlib * event._threadidn = self.threadid */ - __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_source); @@ -2662,15 +2923,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_source = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":78 + /* "hunter/_event.pyx":87 * event._module = self.module * event._source = self.source * event._stdlib = self.stdlib # <<<<<<<<<<<<<< * event._threadidn = self.threadid * event._threadname = self.threadname */ - __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stdlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error) + __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stdlib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_stdlib); @@ -2678,15 +2939,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_stdlib = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":79 + /* "hunter/_event.pyx":88 * event._source = self.source * event._stdlib = self.stdlib * event._threadidn = self.threadid # <<<<<<<<<<<<<< * event._threadname = self.threadname * */ - __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_threadid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 79, __pyx_L1_error) + __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_threadid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_threadidn); @@ -2694,15 +2955,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_threadidn = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":80 + /* "hunter/_event.pyx":89 * event._stdlib = self.stdlib * event._threadidn = self.threadid * event._threadname = self.threadname # <<<<<<<<<<<<<< * * if value_filter: */ - __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_threadname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error) + __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_threadname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_threadname); @@ -2710,36 +2971,36 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_threadname = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":82 + /* "hunter/_event.pyx":91 * event._threadname = self.threadname * * if value_filter: # <<<<<<<<<<<<<< * event._globals = {key: value_filter(value) for key, value in self.globals.items()} * event._locals = {key: value_filter(value) for key, value in self.locals.items()} */ - __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value_filter); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 82, __pyx_L1_error) + __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_value_filter); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 91, __pyx_L1_error) if (__pyx_t_3) { - /* "hunter/_event.pyx":83 + /* "hunter/_event.pyx":92 * * if value_filter: * event._globals = {key: value_filter(value) for key, value in self.globals.items()} # <<<<<<<<<<<<<< * event._locals = {key: value_filter(value) for key, value in self.locals.items()} * event.arg = value_filter(self.arg) */ - __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error)) + __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error)) { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L6_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_globals); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L6_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_globals); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 92, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 83, __pyx_L6_error) + __PYX_ERR(0, 92, __pyx_L6_error) } - __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L6_error) + __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); @@ -2748,7 +3009,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_5, &__pyx_t_4, &__pyx_t_8, &__pyx_t_7, NULL, __pyx_t_6); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 83, __pyx_L6_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 92, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_key, __pyx_t_8); @@ -2768,10 +3029,10 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte } __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_7genexpr__pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_7genexpr__pyx_v_value); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L6_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 92, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_7genexpr__pyx_v_key, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 83, __pyx_L6_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_7genexpr__pyx_v_key, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 92, __pyx_L6_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2790,25 +3051,25 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_globals = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":84 + /* "hunter/_event.pyx":93 * if value_filter: * event._globals = {key: value_filter(value) for key, value in self.globals.items()} * event._locals = {key: value_filter(value) for key, value in self.locals.items()} # <<<<<<<<<<<<<< * event.arg = value_filter(self.arg) * else: */ - __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error)) + __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error)) { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L12_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_locals); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 84, __pyx_L12_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_locals); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_t_7 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 84, __pyx_L12_error) + __PYX_ERR(0, 93, __pyx_L12_error) } - __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L12_error) + __pyx_t_8 = __Pyx_dict_iterator(__pyx_t_7, 0, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 93, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_1); @@ -2817,7 +3078,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_5, &__pyx_t_8, &__pyx_t_7, NULL, __pyx_t_6); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 84, __pyx_L12_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 93, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_key, __pyx_t_8); @@ -2837,10 +3098,10 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte } __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_8genexpr1__pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_8genexpr1__pyx_v_value); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 84, __pyx_L12_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr1__pyx_v_key, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 84, __pyx_L12_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_8genexpr1__pyx_v_key, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 93, __pyx_L12_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -2859,14 +3120,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_locals = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":85 + /* "hunter/_event.pyx":94 * event._globals = {key: value_filter(value) for key, value in self.globals.items()} * event._locals = {key: value_filter(value) for key, value in self.locals.items()} * event.arg = value_filter(self.arg) # <<<<<<<<<<<<<< * else: * event._globals = {} */ - __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error)) + __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_value_filter); __pyx_t_1 = __pyx_v_value_filter; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -2880,7 +3141,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_self->arg) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_self->arg); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -2889,7 +3150,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->arg = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":82 + /* "hunter/_event.pyx":91 * event._threadname = self.threadname * * if value_filter: # <<<<<<<<<<<<<< @@ -2899,16 +3160,16 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte goto __pyx_L3; } - /* "hunter/_event.pyx":87 + /* "hunter/_event.pyx":96 * event.arg = value_filter(self.arg) * else: * event._globals = {} # <<<<<<<<<<<<<< * event._locals = {} * event.arg = None */ - __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error)) + __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) /*else*/ { - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_globals); @@ -2916,15 +3177,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_globals = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":88 + /* "hunter/_event.pyx":97 * else: * event._globals = {} * event._locals = {} # <<<<<<<<<<<<<< * event.arg = None * */ - __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_event->_locals); @@ -2932,14 +3193,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->_locals = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":89 + /* "hunter/_event.pyx":98 * event._globals = {} * event._locals = {} * event.arg = None # <<<<<<<<<<<<<< * * event.threading_support = self.threading_support */ - __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error)) + __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_event->arg); @@ -2948,47 +3209,47 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte } __pyx_L3:; - /* "hunter/_event.pyx":91 + /* "hunter/_event.pyx":100 * event.arg = None * * event.threading_support = self.threading_support # <<<<<<<<<<<<<< * event.calls = self.calls * event.depth = self.depth */ - __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error)) + __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->threading_support; __pyx_v_event->threading_support = __pyx_t_3; - /* "hunter/_event.pyx":92 + /* "hunter/_event.pyx":101 * * event.threading_support = self.threading_support * event.calls = self.calls # <<<<<<<<<<<<<< * event.depth = self.depth * event.kind = self.kind */ - __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error)) + __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) __pyx_t_6 = __pyx_v_self->calls; __pyx_v_event->calls = __pyx_t_6; - /* "hunter/_event.pyx":93 + /* "hunter/_event.pyx":102 * event.threading_support = self.threading_support * event.calls = self.calls * event.depth = self.depth # <<<<<<<<<<<<<< * event.kind = self.kind * */ - __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error)) + __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error)) __pyx_t_6 = __pyx_v_self->depth; __pyx_v_event->depth = __pyx_t_6; - /* "hunter/_event.pyx":94 + /* "hunter/_event.pyx":103 * event.calls = self.calls * event.depth = self.depth * event.kind = self.kind # <<<<<<<<<<<<<< * * event.detached = True */ - __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error)) + __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->kind; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -2997,30 +3258,30 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __pyx_v_event->kind = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":96 + /* "hunter/_event.pyx":105 * event.kind = self.kind * * event.detached = True # <<<<<<<<<<<<<< * * return event */ - __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) + __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error)) __pyx_v_event->detached = 1; - /* "hunter/_event.pyx":98 + /* "hunter/_event.pyx":107 * event.detached = True * * return event # <<<<<<<<<<<<<< * * cdef inline Event clone(self): */ - __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error)) + __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_event)); __pyx_r = ((PyObject *)__pyx_v_event); goto __pyx_L0; - /* "hunter/_event.pyx":67 + /* "hunter/_event.pyx":76 * self._thread = UNSET * * def detach(self, value_filter=None): # <<<<<<<<<<<<<< @@ -3049,7 +3310,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte return __pyx_r; } -/* "hunter/_event.pyx":100 +/* "hunter/_event.pyx":109 * return event * * cdef inline Event clone(self): # <<<<<<<<<<<<<< @@ -3067,17 +3328,17 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl int __pyx_t_3; int __pyx_t_4; __Pyx_RefNannySetupContext("clone", 0); - __Pyx_TraceCall("clone", __pyx_f[0], 100, 0, __PYX_ERR(0, 100, __pyx_L1_error)); + __Pyx_TraceCall("clone", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error)); - /* "hunter/_event.pyx":101 + /* "hunter/_event.pyx":110 * * cdef inline Event clone(self): * event = Event.__new__(Event) # <<<<<<<<<<<<<< * event.arg = self.arg * event.frame = self.frame */ - __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) - __pyx_t_1 = ((PyObject *)__pyx_tp_new_6hunter_6_event_Event(((PyTypeObject *)__pyx_ptype_6hunter_6_event_Event), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) + __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error)) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_6hunter_6_event_Event(((PyTypeObject *)__pyx_ptype_6hunter_6_event_Event), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = ((PyObject *)__pyx_t_1); __Pyx_INCREF(__pyx_t_2); @@ -3085,14 +3346,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":102 + /* "hunter/_event.pyx":111 * cdef inline Event clone(self): * event = Event.__new__(Event) * event.arg = self.arg # <<<<<<<<<<<<<< * event.frame = self.frame * event.kind = self.kind */ - __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error)) + __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->arg; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3101,14 +3362,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->arg = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":103 + /* "hunter/_event.pyx":112 * event = Event.__new__(Event) * event.arg = self.arg * event.frame = self.frame # <<<<<<<<<<<<<< * event.kind = self.kind * event.depth = self.depth */ - __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error)) + __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_self->frame); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3117,14 +3378,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->frame = ((PyFrameObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":104 + /* "hunter/_event.pyx":113 * event.arg = self.arg * event.frame = self.frame * event.kind = self.kind # <<<<<<<<<<<<<< * event.depth = self.depth * event.calls = self.calls */ - __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error)) + __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->kind; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3133,47 +3394,47 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->kind = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":105 + /* "hunter/_event.pyx":114 * event.frame = self.frame * event.kind = self.kind * event.depth = self.depth # <<<<<<<<<<<<<< * event.calls = self.calls * event.threading_support = self.threading_support */ - __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error)) + __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->depth; __pyx_v_event->depth = __pyx_t_3; - /* "hunter/_event.pyx":106 + /* "hunter/_event.pyx":115 * event.kind = self.kind * event.depth = self.depth * event.calls = self.calls # <<<<<<<<<<<<<< * event.threading_support = self.threading_support * event._code = self._code */ - __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error)) + __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->calls; __pyx_v_event->calls = __pyx_t_3; - /* "hunter/_event.pyx":107 + /* "hunter/_event.pyx":116 * event.depth = self.depth * event.calls = self.calls * event.threading_support = self.threading_support # <<<<<<<<<<<<<< * event._code = self._code * event._filename = self._filename */ - __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) + __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->threading_support; __pyx_v_event->threading_support = __pyx_t_4; - /* "hunter/_event.pyx":108 + /* "hunter/_event.pyx":117 * event.calls = self.calls * event.threading_support = self.threading_support * event._code = self._code # <<<<<<<<<<<<<< * event._filename = self._filename * event._fullsource = self._fullsource */ - __Pyx_TraceLine(108,0,__PYX_ERR(0, 108, __pyx_L1_error)) + __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_code; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3182,14 +3443,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_code = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":109 + /* "hunter/_event.pyx":118 * event.threading_support = self.threading_support * event._code = self._code * event._filename = self._filename # <<<<<<<<<<<<<< * event._fullsource = self._fullsource * event._function_object = self._function_object */ - __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) + __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_filename; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3198,14 +3459,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_filename = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":110 + /* "hunter/_event.pyx":119 * event._code = self._code * event._filename = self._filename * event._fullsource = self._fullsource # <<<<<<<<<<<<<< * event._function_object = self._function_object * event._function = self._function */ - __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error)) + __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_fullsource; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3214,14 +3475,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_fullsource = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":111 + /* "hunter/_event.pyx":120 * event._filename = self._filename * event._fullsource = self._fullsource * event._function_object = self._function_object # <<<<<<<<<<<<<< * event._function = self._function * event._globals = self._globals */ - __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error)) + __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_function_object; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3230,14 +3491,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_function_object = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":112 + /* "hunter/_event.pyx":121 * event._fullsource = self._fullsource * event._function_object = self._function_object * event._function = self._function # <<<<<<<<<<<<<< * event._globals = self._globals * event._lineno = self._lineno */ - __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error)) + __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_function; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3246,14 +3507,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_function = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":113 + /* "hunter/_event.pyx":122 * event._function_object = self._function_object * event._function = self._function * event._globals = self._globals # <<<<<<<<<<<<<< * event._lineno = self._lineno * event._locals = self._locals */ - __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error)) + __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_globals; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3262,14 +3523,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_globals = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":114 + /* "hunter/_event.pyx":123 * event._function = self._function * event._globals = self._globals * event._lineno = self._lineno # <<<<<<<<<<<<<< * event._locals = self._locals * event._module = self._module */ - __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error)) + __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_lineno; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3278,14 +3539,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_lineno = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":115 + /* "hunter/_event.pyx":124 * event._globals = self._globals * event._lineno = self._lineno * event._locals = self._locals # <<<<<<<<<<<<<< * event._module = self._module * event._source = self._source */ - __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error)) + __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_locals; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3294,14 +3555,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_locals = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":116 + /* "hunter/_event.pyx":125 * event._lineno = self._lineno * event._locals = self._locals * event._module = self._module # <<<<<<<<<<<<<< * event._source = self._source * event._stdlib = self._stdlib */ - __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) + __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_module; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3310,14 +3571,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_module = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":117 + /* "hunter/_event.pyx":126 * event._locals = self._locals * event._module = self._module * event._source = self._source # <<<<<<<<<<<<<< * event._stdlib = self._stdlib * event._threadidn = self._threadidn */ - __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error)) + __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_source; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3326,14 +3587,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_source = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":118 + /* "hunter/_event.pyx":127 * event._module = self._module * event._source = self._source * event._stdlib = self._stdlib # <<<<<<<<<<<<<< * event._threadidn = self._threadidn * event._threadname = self._threadname */ - __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error)) + __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_stdlib; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3342,14 +3603,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_stdlib = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":119 + /* "hunter/_event.pyx":128 * event._source = self._source * event._stdlib = self._stdlib * event._threadidn = self._threadidn # <<<<<<<<<<<<<< * event._threadname = self._threadname * event._thread = self._thread */ - __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) + __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_threadidn; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3358,14 +3619,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_threadidn = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":120 + /* "hunter/_event.pyx":129 * event._stdlib = self._stdlib * event._threadidn = self._threadidn * event._threadname = self._threadname # <<<<<<<<<<<<<< * event._thread = self._thread * return event */ - __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error)) + __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_threadname; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3374,14 +3635,14 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_threadname = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":121 + /* "hunter/_event.pyx":130 * event._threadidn = self._threadidn * event._threadname = self._threadname * event._thread = self._thread # <<<<<<<<<<<<<< * return event * */ - __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) + __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_thread; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3390,20 +3651,20 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_v_event->_thread = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_event.pyx":122 + /* "hunter/_event.pyx":131 * event._threadname = self._threadname * event._thread = self._thread * return event # <<<<<<<<<<<<<< * - * @property + * def set_frame(self, frame): */ - __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) + __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_event)); __pyx_r = __pyx_v_event; goto __pyx_L0; - /* "hunter/_event.pyx":100 + /* "hunter/_event.pyx":109 * return event * * cdef inline Event clone(self): # <<<<<<<<<<<<<< @@ -3425,7 +3686,167 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl return __pyx_r; } -/* "hunter/_event.pyx":125 +/* "hunter/_event.pyx":133 + * return event + * + * def set_frame(self, frame): # <<<<<<<<<<<<<< + * self.frame = frame + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_6_event_5Event_5set_frame(PyObject *__pyx_v_self, PyObject *__pyx_v_frame); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_5set_frame(PyObject *__pyx_v_self, PyObject *__pyx_v_frame) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_frame (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_4set_frame(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v_frame)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_6_event_5Event_4set_frame(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_frame) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("set_frame", 0); + __Pyx_TraceCall("set_frame", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error)); + + /* "hunter/_event.pyx":134 + * + * def set_frame(self, frame): + * self.frame = frame # <<<<<<<<<<<<<< + * + * def make_fake_event(self): + */ + __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) + __pyx_t_1 = __pyx_v_frame; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->frame); + __Pyx_DECREF(((PyObject *)__pyx_v_self->frame)); + __pyx_v_self->frame = ((PyFrameObject *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "hunter/_event.pyx":133 + * return event + * + * def set_frame(self, frame): # <<<<<<<<<<<<<< + * self.frame = frame + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._event.Event.set_frame", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_event.pyx":136 + * self.frame = frame + * + * def make_fake_event(self): # <<<<<<<<<<<<<< + * self._locals = {} + * self._globals = {} + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_6_event_5Event_7make_fake_event(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_7make_fake_event(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("make_fake_event (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_6make_fake_event(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_6_event_5Event_6make_fake_event(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("make_fake_event", 0); + __Pyx_TraceCall("make_fake_event", __pyx_f[0], 136, 0, __PYX_ERR(0, 136, __pyx_L1_error)); + + /* "hunter/_event.pyx":137 + * + * def make_fake_event(self): + * self._locals = {} # <<<<<<<<<<<<<< + * self._globals = {} + * self.detached = True + */ + __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_locals); + __Pyx_DECREF(__pyx_v_self->_locals); + __pyx_v_self->_locals = __pyx_t_1; + __pyx_t_1 = 0; + + /* "hunter/_event.pyx":138 + * def make_fake_event(self): + * self._locals = {} + * self._globals = {} # <<<<<<<<<<<<<< + * self.detached = True + * + */ + __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->_globals); + __Pyx_DECREF(__pyx_v_self->_globals); + __pyx_v_self->_globals = __pyx_t_1; + __pyx_t_1 = 0; + + /* "hunter/_event.pyx":139 + * self._locals = {} + * self._globals = {} + * self.detached = True # <<<<<<<<<<<<<< + * + * @property + */ + __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) + __pyx_v_self->detached = 1; + + /* "hunter/_event.pyx":136 + * self.frame = frame + * + * def make_fake_event(self): # <<<<<<<<<<<<<< + * self._locals = {} + * self._globals = {} + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._event.Event.make_fake_event", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_event.pyx":142 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -3459,39 +3880,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ PyObject *__pyx_t_5 = NULL; int __pyx_t_6; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 125, 0, __PYX_ERR(0, 125, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 142, 0, __PYX_ERR(0, 142, __pyx_L1_error)); - /* "hunter/_event.pyx":128 + /* "hunter/_event.pyx":145 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< * current = PyThread_get_thread_ident() * main = get_main_thread() */ - __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error)) + __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_threadidn == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":129 + /* "hunter/_event.pyx":146 * * if self._threadidn is UNSET: * current = PyThread_get_thread_ident() # <<<<<<<<<<<<<< * main = get_main_thread() * if main is not None and current == main.ident: */ - __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) + __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) __pyx_v_current = PyThread_get_thread_ident(); - /* "hunter/_event.pyx":130 + /* "hunter/_event.pyx":147 * if self._threadidn is UNSET: * current = PyThread_get_thread_ident() * main = get_main_thread() # <<<<<<<<<<<<<< * if main is not None and current == main.ident: * self._threadidn = None */ - __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -3505,20 +3926,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_main = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":131 + /* "hunter/_event.pyx":148 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< * self._threadidn = None * else: */ - __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) + __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_main != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { @@ -3526,34 +3947,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ __pyx_t_2 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main, __pyx_n_s_ident); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main, __pyx_n_s_ident); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __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, 131, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "hunter/_event.pyx":132 + /* "hunter/_event.pyx":149 * main = get_main_thread() * if main is not None and current == main.ident: * self._threadidn = None # <<<<<<<<<<<<<< * else: * self._threadidn = current */ - __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error)) + __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_threadidn); __Pyx_DECREF(__pyx_v_self->_threadidn); __pyx_v_self->_threadidn = Py_None; - /* "hunter/_event.pyx":131 + /* "hunter/_event.pyx":148 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< @@ -3563,16 +3984,16 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ goto __pyx_L4; } - /* "hunter/_event.pyx":134 + /* "hunter/_event.pyx":151 * self._threadidn = None * else: * self._threadidn = current # <<<<<<<<<<<<<< * return self._threadidn * */ - __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) + __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_threadidn); @@ -3582,7 +4003,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ } __pyx_L4:; - /* "hunter/_event.pyx":128 + /* "hunter/_event.pyx":145 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< @@ -3591,20 +4012,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":135 + /* "hunter/_event.pyx":152 * else: * self._threadidn = current * return self._threadidn # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) + __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_threadidn); __pyx_r = __pyx_v_self->_threadidn; goto __pyx_L0; - /* "hunter/_event.pyx":125 + /* "hunter/_event.pyx":142 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -3627,7 +4048,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":138 +/* "hunter/_event.pyx":155 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -3658,41 +4079,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 138, 0, __PYX_ERR(0, 138, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 155, 0, __PYX_ERR(0, 155, __pyx_L1_error)); - /* "hunter/_event.pyx":139 + /* "hunter/_event.pyx":156 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< * if self._thread is UNSET: * self._thread = current_thread() */ - __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) + __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_threadname == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":140 + /* "hunter/_event.pyx":157 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< * self._thread = current_thread() * self._threadname = self._thread.name */ - __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) + __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_self->_thread == __pyx_v_6hunter_6_event_UNSET); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":141 + /* "hunter/_event.pyx":158 * if self._threadname is UNSET: * if self._thread is UNSET: * self._thread = current_thread() # <<<<<<<<<<<<<< * self._threadname = self._thread.name * return self._threadname */ - __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -3706,7 +4127,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -3715,7 +4136,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p __pyx_v_self->_thread = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":140 + /* "hunter/_event.pyx":157 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< @@ -3724,15 +4145,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":142 + /* "hunter/_event.pyx":159 * if self._thread is UNSET: * self._thread = current_thread() * self._threadname = self._thread.name # <<<<<<<<<<<<<< * return self._threadname * */ - __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_thread, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_thread, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_threadname); @@ -3740,7 +4161,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p __pyx_v_self->_threadname = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":139 + /* "hunter/_event.pyx":156 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< @@ -3749,20 +4170,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":143 + /* "hunter/_event.pyx":160 * self._thread = current_thread() * self._threadname = self._thread.name * return self._threadname # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) + __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_threadname); __pyx_r = __pyx_v_self->_threadname; goto __pyx_L0; - /* "hunter/_event.pyx":138 + /* "hunter/_event.pyx":155 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -3784,7 +4205,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":146 +/* "hunter/_event.pyx":163 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -3813,41 +4234,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 146, 0, __PYX_ERR(0, 146, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 163, 0, __PYX_ERR(0, 163, __pyx_L1_error)); - /* "hunter/_event.pyx":147 + /* "hunter/_event.pyx":164 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals */ - __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) + __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_locals == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":148 + /* "hunter/_event.pyx":165 * def locals(self): * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) # <<<<<<<<<<<<<< * self._locals = self.frame.f_locals * return self._locals */ - __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) + __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) __pyx_t_3 = ((PyObject *)__pyx_v_self->frame); __Pyx_INCREF(__pyx_t_3); PyFrame_FastToLocals(((PyFrameObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":149 + /* "hunter/_event.pyx":166 * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals # <<<<<<<<<<<<<< * return self._locals * */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) + __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_locals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -3856,7 +4277,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob __pyx_v_self->_locals = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":147 + /* "hunter/_event.pyx":164 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< @@ -3865,20 +4286,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":150 + /* "hunter/_event.pyx":167 * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals * return self._locals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error)) + __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_locals); __pyx_r = __pyx_v_self->_locals; goto __pyx_L0; - /* "hunter/_event.pyx":146 + /* "hunter/_event.pyx":163 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -3898,7 +4319,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":153 +/* "hunter/_event.pyx":170 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -3927,28 +4348,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 153, 0, __PYX_ERR(0, 153, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 170, 0, __PYX_ERR(0, 170, __pyx_L1_error)); - /* "hunter/_event.pyx":154 + /* "hunter/_event.pyx":171 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< * self._globals = self.frame.f_globals * return self._globals */ - __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error)) + __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_globals == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":155 + /* "hunter/_event.pyx":172 * def globals(self): * if self._globals is UNSET: * self._globals = self.frame.f_globals # <<<<<<<<<<<<<< * return self._globals * */ - __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error)) + __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_globals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -3957,7 +4378,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o __pyx_v_self->_globals = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":154 + /* "hunter/_event.pyx":171 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< @@ -3966,20 +4387,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o */ } - /* "hunter/_event.pyx":156 + /* "hunter/_event.pyx":173 * if self._globals is UNSET: * self._globals = self.frame.f_globals * return self._globals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) + __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_globals); __pyx_r = __pyx_v_self->_globals; goto __pyx_L0; - /* "hunter/_event.pyx":153 + /* "hunter/_event.pyx":170 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -3999,7 +4420,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o return __pyx_r; } -/* "hunter/_event.pyx":159 +/* "hunter/_event.pyx":176 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4028,29 +4449,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 159, 0, __PYX_ERR(0, 159, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 176, 0, __PYX_ERR(0, 176, __pyx_L1_error)); - /* "hunter/_event.pyx":160 + /* "hunter/_event.pyx":177 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< * self._function = self.frame.f_code.co_name * return self._function */ - __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) + __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_function == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":161 + /* "hunter/_event.pyx":178 * def function(self): * if self._function is UNSET: * self._function = self.frame.f_code.co_name # <<<<<<<<<<<<<< * return self._function * */ - __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->frame->f_code), __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->frame->f_code), __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_function); @@ -4058,7 +4479,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ __pyx_v_self->_function = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":160 + /* "hunter/_event.pyx":177 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< @@ -4067,20 +4488,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":162 + /* "hunter/_event.pyx":179 * if self._function is UNSET: * self._function = self.frame.f_code.co_name * return self._function # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error)) + __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_function); __pyx_r = __pyx_v_self->_function; goto __pyx_L0; - /* "hunter/_event.pyx":159 + /* "hunter/_event.pyx":176 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4100,7 +4521,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":165 +/* "hunter/_event.pyx":182 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -4143,61 +4564,61 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc Py_ssize_t __pyx_t_11; int __pyx_t_12; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 165, 0, __PYX_ERR(0, 165, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 182, 0, __PYX_ERR(0, 182, __pyx_L1_error)); - /* "hunter/_event.pyx":166 + /* "hunter/_event.pyx":183 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< * code = self.code * if code.co_name is None: */ - __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error)) + __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_function_object == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":167 + /* "hunter/_event.pyx":184 * def function_object(self): * if self._function_object is UNSET: * code = self.code # <<<<<<<<<<<<<< * if code.co_name is None: * return None */ - __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_code = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":168 + /* "hunter/_event.pyx":185 * if self._function_object is UNSET: * code = self.code * if code.co_name is None: # <<<<<<<<<<<<<< * return None * # First, try to find the function in globals */ - __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_code, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_code, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":169 + /* "hunter/_event.pyx":186 * code = self.code * if code.co_name is None: * return None # <<<<<<<<<<<<<< * # First, try to find the function in globals * candidate = self.globals.get(code.co_name, None) */ - __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) + __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "hunter/_event.pyx":168 + /* "hunter/_event.pyx":185 * if self._function_object is UNSET: * code = self.code * if code.co_name is None: # <<<<<<<<<<<<<< @@ -4206,20 +4627,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":171 + /* "hunter/_event.pyx":188 * return None * # First, try to find the function in globals * candidate = self.globals.get(code.co_name, None) # <<<<<<<<<<<<<< * func = if_same_code(candidate, code) * # If that failed, as will be the case with class and instance methods, try */ - __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_globals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) + __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_globals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __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_code, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_code, __pyx_n_s_co_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -4236,7 +4657,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -4245,14 +4666,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, Py_None}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -4263,7 +4684,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, Py_None); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -4271,15 +4692,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __pyx_v_candidate = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":172 + /* "hunter/_event.pyx":189 * # First, try to find the function in globals * candidate = self.globals.get(code.co_name, None) * func = if_same_code(candidate, code) # <<<<<<<<<<<<<< * # If that failed, as will be the case with class and instance methods, try * # to look up the function from the first argument. In the case of class/instance */ - __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error) + __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4296,7 +4717,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_candidate, __pyx_v_code}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4304,13 +4725,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_candidate, __pyx_v_code}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -4321,7 +4742,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_v_code); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -4329,14 +4750,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __pyx_v_func = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":177 + /* "hunter/_event.pyx":194 * # methods, this should be the class (or an instance of the class) on which our * # method is defined. * if func is None and code.co_argcount >= 1: # <<<<<<<<<<<<<< * first_arg = self.locals.get(code.co_varnames[0]) * func = get_func_in_mro(first_arg, code) */ - __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) + __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_func == Py_None); __pyx_t_9 = (__pyx_t_2 != 0); if (__pyx_t_9) { @@ -4344,32 +4765,32 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __pyx_t_1 = __pyx_t_9; goto __pyx_L6_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_code, __pyx_n_s_co_argcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_code, __pyx_n_s_co_argcount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_9; __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "hunter/_event.pyx":178 + /* "hunter/_event.pyx":195 * # method is defined. * if func is None and code.co_argcount >= 1: * first_arg = self.locals.get(code.co_varnames[0]) # <<<<<<<<<<<<<< * func = get_func_in_mro(first_arg, code) * # If we still can't find the function, as will be the case with static methods, */ - __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_locals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_locals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __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_code, __pyx_n_s_co_varnames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_code, __pyx_n_s_co_varnames); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4385,21 +4806,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_first_arg = __pyx_t_5; __pyx_t_5 = 0; - /* "hunter/_event.pyx":179 + /* "hunter/_event.pyx":196 * if func is None and code.co_argcount >= 1: * first_arg = self.locals.get(code.co_varnames[0]) * func = get_func_in_mro(first_arg, code) # <<<<<<<<<<<<<< * # If we still can't find the function, as will be the case with static methods, * # try looking at classes in global scope. */ - __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4416,7 +4837,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_first_arg, __pyx_v_code}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -4424,13 +4845,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_first_arg, __pyx_v_code}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -4441,7 +4862,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_v_code); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -4449,7 +4870,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __Pyx_DECREF_SET(__pyx_v_func, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":177 + /* "hunter/_event.pyx":194 * # methods, this should be the class (or an instance of the class) on which our * # method is defined. * if func is None and code.co_argcount >= 1: # <<<<<<<<<<<<<< @@ -4458,34 +4879,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":182 + /* "hunter/_event.pyx":199 * # If we still can't find the function, as will be the case with static methods, * # try looking at classes in global scope. * if func is None: # <<<<<<<<<<<<<< * for v in self.globals.values(): * if not isinstance(v, type): */ - __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) + __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_func == Py_None); __pyx_t_9 = (__pyx_t_1 != 0); if (__pyx_t_9) { - /* "hunter/_event.pyx":183 + /* "hunter/_event.pyx":200 * # try looking at classes in global scope. * if func is None: * for v in self.globals.values(): # <<<<<<<<<<<<<< * if not isinstance(v, type): * continue */ - __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) + __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) __pyx_t_10 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_globals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_globals); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 183, __pyx_L1_error) + __PYX_ERR(0, 200, __pyx_L1_error) } - __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_4, 0, __pyx_n_s_values, (&__pyx_t_11), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_4, 0, __pyx_n_s_values, (&__pyx_t_11), (&__pyx_t_7)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); @@ -4494,34 +4915,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc while (1) { __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_11, &__pyx_t_10, NULL, &__pyx_t_3, NULL, __pyx_t_7); if (unlikely(__pyx_t_12 == 0)) break; - if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 183, __pyx_L1_error) + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":184 + /* "hunter/_event.pyx":201 * if func is None: * for v in self.globals.values(): * if not isinstance(v, type): # <<<<<<<<<<<<<< * continue * func = get_func_in_mro(v, code) */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) + __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error)) __pyx_t_9 = PyType_Check(__pyx_v_v); __pyx_t_1 = ((!(__pyx_t_9 != 0)) != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":185 + /* "hunter/_event.pyx":202 * for v in self.globals.values(): * if not isinstance(v, type): * continue # <<<<<<<<<<<<<< * func = get_func_in_mro(v, code) * if func is not None: */ - __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) + __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) goto __pyx_L9_continue; - /* "hunter/_event.pyx":184 + /* "hunter/_event.pyx":201 * if func is None: * for v in self.globals.values(): * if not isinstance(v, type): # <<<<<<<<<<<<<< @@ -4530,15 +4951,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":186 + /* "hunter/_event.pyx":203 * if not isinstance(v, type): * continue * func = get_func_in_mro(v, code) # <<<<<<<<<<<<<< * if func is not None: * break */ - __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_12 = 0; @@ -4555,7 +4976,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_v, __pyx_v_code}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4563,13 +4984,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_v, __pyx_v_code}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -4580,7 +5001,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_12, __pyx_v_code); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -4588,29 +5009,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __Pyx_DECREF_SET(__pyx_v_func, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":187 + /* "hunter/_event.pyx":204 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< * break * self._function_object = func */ - __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) + __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_func != Py_None); __pyx_t_9 = (__pyx_t_1 != 0); if (__pyx_t_9) { - /* "hunter/_event.pyx":188 + /* "hunter/_event.pyx":205 * func = get_func_in_mro(v, code) * if func is not None: * break # <<<<<<<<<<<<<< * self._function_object = func * return self._function_object */ - __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) + __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) goto __pyx_L10_break; - /* "hunter/_event.pyx":187 + /* "hunter/_event.pyx":204 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< @@ -4623,7 +5044,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc __pyx_L10_break:; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":182 + /* "hunter/_event.pyx":199 * # If we still can't find the function, as will be the case with static methods, * # try looking at classes in global scope. * if func is None: # <<<<<<<<<<<<<< @@ -4632,21 +5053,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":189 + /* "hunter/_event.pyx":206 * if func is not None: * break * self._function_object = func # <<<<<<<<<<<<<< * return self._function_object * */ - __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) + __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_func); __Pyx_GIVEREF(__pyx_v_func); __Pyx_GOTREF(__pyx_v_self->_function_object); __Pyx_DECREF(__pyx_v_self->_function_object); __pyx_v_self->_function_object = __pyx_v_func; - /* "hunter/_event.pyx":166 + /* "hunter/_event.pyx":183 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< @@ -4655,20 +5076,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":190 + /* "hunter/_event.pyx":207 * break * self._function_object = func * return self._function_object # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error)) + __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_function_object); __pyx_r = __pyx_v_self->_function_object; goto __pyx_L0; - /* "hunter/_event.pyx":165 + /* "hunter/_event.pyx":182 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -4697,7 +5118,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc return __pyx_r; } -/* "hunter/_event.pyx":193 +/* "hunter/_event.pyx":210 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -4728,60 +5149,60 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 193, 0, __PYX_ERR(0, 193, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 210, 0, __PYX_ERR(0, 210, __pyx_L1_error)); - /* "hunter/_event.pyx":194 + /* "hunter/_event.pyx":211 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< * module = self.frame.f_globals.get('__name__', '') * if module is None: */ - __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) + __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_module == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":195 + /* "hunter/_event.pyx":212 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame->f_globals, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame->f_globals, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_module = __pyx_t_4; __pyx_t_4 = 0; - /* "hunter/_event.pyx":196 + /* "hunter/_event.pyx":213 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< * module = '' * */ - __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error)) + __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_module == Py_None); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":197 + /* "hunter/_event.pyx":214 * module = self.frame.f_globals.get('__name__', '') * if module is None: * module = '' # <<<<<<<<<<<<<< * * self._module = module */ - __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_s_); - __Pyx_DECREF_SET(__pyx_v_module, __pyx_kp_s_); + __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) + __Pyx_INCREF(__pyx_kp_s__5); + __Pyx_DECREF_SET(__pyx_v_module, __pyx_kp_s__5); - /* "hunter/_event.pyx":196 + /* "hunter/_event.pyx":213 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< @@ -4790,21 +5211,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":199 + /* "hunter/_event.pyx":216 * module = '' * * self._module = module # <<<<<<<<<<<<<< * return self._module * */ - __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) + __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_module); __Pyx_GIVEREF(__pyx_v_module); __Pyx_GOTREF(__pyx_v_self->_module); __Pyx_DECREF(__pyx_v_self->_module); __pyx_v_self->_module = __pyx_v_module; - /* "hunter/_event.pyx":194 + /* "hunter/_event.pyx":211 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< @@ -4813,20 +5234,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":200 + /* "hunter/_event.pyx":217 * * self._module = module * return self._module # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) + __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_module); __pyx_r = __pyx_v_self->_module; goto __pyx_L0; - /* "hunter/_event.pyx":193 + /* "hunter/_event.pyx":210 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -4848,7 +5269,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":203 +/* "hunter/_event.pyx":220 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -4886,54 +5307,54 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 203, 0, __PYX_ERR(0, 203, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 220, 0, __PYX_ERR(0, 220, __pyx_L1_error)); - /* "hunter/_event.pyx":204 + /* "hunter/_event.pyx":221 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< * filename = self.frame.f_code.co_filename * if not filename: */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) + __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_filename == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":205 + /* "hunter/_event.pyx":222 * def filename(self): * if self._filename is UNSET: * filename = self.frame.f_code.co_filename # <<<<<<<<<<<<<< * if not filename: * filename = self.frame.f_globals.get('__file__') */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) + __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_code->co_filename; __Pyx_INCREF(__pyx_t_3); __pyx_v_filename = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":206 + /* "hunter/_event.pyx":223 * if self._filename is UNSET: * filename = self.frame.f_code.co_filename * if not filename: # <<<<<<<<<<<<<< * filename = self.frame.f_globals.get('__file__') * if not filename: */ - __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 206, __pyx_L1_error) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":207 + /* "hunter/_event.pyx":224 * filename = self.frame.f_code.co_filename * if not filename: * filename = self.frame.f_globals.get('__file__') # <<<<<<<<<<<<<< * if not filename: * filename = '' */ - __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame->f_globals, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->frame->f_globals, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -4947,13 +5368,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_s_file) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_file); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":206 + /* "hunter/_event.pyx":223 * if self._filename is UNSET: * filename = self.frame.f_code.co_filename * if not filename: # <<<<<<<<<<<<<< @@ -4962,30 +5383,30 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":208 + /* "hunter/_event.pyx":225 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< * filename = '' * elif filename.endswith(('.pyc', '.pyo')): */ - __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) + __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":209 + /* "hunter/_event.pyx":226 * filename = self.frame.f_globals.get('__file__') * if not filename: * filename = '' # <<<<<<<<<<<<<< * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] */ - __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error)) - __Pyx_INCREF(__pyx_kp_s_); - __Pyx_DECREF_SET(__pyx_v_filename, __pyx_kp_s_); + __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) + __Pyx_INCREF(__pyx_kp_s__5); + __Pyx_DECREF_SET(__pyx_v_filename, __pyx_kp_s__5); - /* "hunter/_event.pyx":208 + /* "hunter/_event.pyx":225 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< @@ -4995,15 +5416,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":210 + /* "hunter/_event.pyx":227 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5015,29 +5436,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_tuple__3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__3); + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_tuple__7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__7); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":211 + /* "hunter/_event.pyx":228 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, -1L, NULL, NULL, &__pyx_slice__4, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_filename, 0, -1L, NULL, NULL, &__pyx_slice__8, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":210 + /* "hunter/_event.pyx":227 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< @@ -5047,15 +5468,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":212 + /* "hunter/_event.pyx":229 * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): */ - __Pyx_TraceLine(212,0,__PYX_ERR(0, 212, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5067,26 +5488,26 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_tuple__5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__5); + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_tuple__9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__9); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":213 + /* "hunter/_event.pyx":230 * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) # <<<<<<<<<<<<<< * for ext in ('.pyx', '.py'): * cyfilename = basename + ext */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 213, __pyx_L1_error) + __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5103,33 +5524,33 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_v_filename}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s__5, __pyx_v_filename}; + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s_, __pyx_v_filename}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_kp_s__5, __pyx_v_filename}; + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } - __Pyx_INCREF(__pyx_kp_s_); - __Pyx_GIVEREF(__pyx_kp_s_); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s_); + __Pyx_INCREF(__pyx_kp_s__5); + __Pyx_GIVEREF(__pyx_kp_s__5); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_kp_s__5); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_filename); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -5137,48 +5558,48 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ __pyx_v_basename = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":214 + /* "hunter/_event.pyx":231 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) - __pyx_t_3 = __pyx_tuple__6; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; + __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) + __pyx_t_3 = __pyx_tuple__10; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 231, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_ext, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":215 + /* "hunter/_event.pyx":232 * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): * cyfilename = basename + ext # <<<<<<<<<<<<<< * if exists(cyfilename): * filename = cyfilename */ - __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error)) - __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) + __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_cyfilename, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":216 + /* "hunter/_event.pyx":233 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< * filename = cyfilename * break */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L1_error) + __Pyx_TraceLine(233,0,__PYX_ERR(0, 233, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -5192,35 +5613,35 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_cyfilename) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_cyfilename); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":217 + /* "hunter/_event.pyx":234 * cyfilename = basename + ext * if exists(cyfilename): * filename = cyfilename # <<<<<<<<<<<<<< * break * */ - __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) + __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_cyfilename); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_v_cyfilename); - /* "hunter/_event.pyx":218 + /* "hunter/_event.pyx":235 * if exists(cyfilename): * filename = cyfilename * break # <<<<<<<<<<<<<< * * self._filename = filename */ - __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) + __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) goto __pyx_L7_break; - /* "hunter/_event.pyx":216 + /* "hunter/_event.pyx":233 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< @@ -5229,19 +5650,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":214 + /* "hunter/_event.pyx":231 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) + __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) } __pyx_L7_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":212 + /* "hunter/_event.pyx":229 * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -5251,21 +5672,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } __pyx_L5:; - /* "hunter/_event.pyx":220 + /* "hunter/_event.pyx":237 * break * * self._filename = filename # <<<<<<<<<<<<<< * return self._filename * */ - __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) + __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); __Pyx_GOTREF(__pyx_v_self->_filename); __Pyx_DECREF(__pyx_v_self->_filename); __pyx_v_self->_filename = __pyx_v_filename; - /* "hunter/_event.pyx":204 + /* "hunter/_event.pyx":221 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< @@ -5274,20 +5695,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":221 + /* "hunter/_event.pyx":238 * * self._filename = filename * return self._filename # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) + __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_filename); __pyx_r = __pyx_v_self->_filename; goto __pyx_L0; - /* "hunter/_event.pyx":203 + /* "hunter/_event.pyx":220 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5314,7 +5735,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":224 +/* "hunter/_event.pyx":241 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5343,29 +5764,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 224, 0, __PYX_ERR(0, 224, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 241, 0, __PYX_ERR(0, 241, __pyx_L1_error)); - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":242 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< * self._lineno = self.frame.f_lineno * return self._lineno */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) + __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_lineno == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":226 + /* "hunter/_event.pyx":243 * def lineno(self): * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno # <<<<<<<<<<<<<< * return self._lineno * */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_lineno); @@ -5373,7 +5794,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob __pyx_v_self->_lineno = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":242 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< @@ -5382,20 +5803,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":227 + /* "hunter/_event.pyx":244 * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno * return self._lineno # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) + __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_lineno); __pyx_r = __pyx_v_self->_lineno; goto __pyx_L0; - /* "hunter/_event.pyx":224 + /* "hunter/_event.pyx":241 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5415,7 +5836,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":230 +/* "hunter/_event.pyx":247 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5443,34 +5864,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ int __pyx_t_1; int __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 230, 0, __PYX_ERR(0, 230, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 247, 0, __PYX_ERR(0, 247, __pyx_L1_error)); - /* "hunter/_event.pyx":231 + /* "hunter/_event.pyx":248 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< * return self.frame.f_code * else: */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) + __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_code == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":232 + /* "hunter/_event.pyx":249 * def code(self): * if self._code is UNSET: * return self.frame.f_code # <<<<<<<<<<<<<< * else: * return self._code */ - __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) + __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->frame->f_code)); __pyx_r = ((PyObject *)__pyx_v_self->frame->f_code); goto __pyx_L0; - /* "hunter/_event.pyx":231 + /* "hunter/_event.pyx":248 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< @@ -5479,14 +5900,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ */ } - /* "hunter/_event.pyx":234 + /* "hunter/_event.pyx":251 * return self.frame.f_code * else: * return self._code # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) + __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_code); @@ -5494,7 +5915,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ goto __pyx_L0; } - /* "hunter/_event.pyx":230 + /* "hunter/_event.pyx":247 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5513,7 +5934,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_event.pyx":237 +/* "hunter/_event.pyx":254 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -5546,31 +5967,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 237, 0, __PYX_ERR(0, 237, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 254, 0, __PYX_ERR(0, 254, __pyx_L1_error)); - /* "hunter/_event.pyx":238 + /* "hunter/_event.pyx":255 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: */ - __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error)) + __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_stdlib == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":239 + /* "hunter/_event.pyx":256 * def stdlib(self): * if self._stdlib is UNSET: * module_parts = self.module.split('.') # <<<<<<<<<<<<<< * if 'pkg_resources' in module_parts: * # skip this over-vendored module */ - __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) + __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5583,41 +6004,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob __Pyx_DECREF_SET(__pyx_t_5, function); } } - __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_s__7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s__7); + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_s__11) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s__11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_module_parts = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":240 + /* "hunter/_event.pyx":257 * if self._stdlib is UNSET: * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: # <<<<<<<<<<<<<< * # skip this over-vendored module * self._stdlib = True */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_pkg_resources, __pyx_v_module_parts, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error)) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_pkg_resources, __pyx_v_module_parts, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 257, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":242 + /* "hunter/_event.pyx":259 * if 'pkg_resources' in module_parts: * # skip this over-vendored module * self._stdlib = True # <<<<<<<<<<<<<< * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): * # skip namedtuple exec garbage */ - __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error)) + __Pyx_TraceLine(259,0,__PYX_ERR(0, 259, __pyx_L1_error)) __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); __Pyx_GOTREF(__pyx_v_self->_stdlib); __Pyx_DECREF(__pyx_v_self->_stdlib); __pyx_v_self->_stdlib = Py_True; - /* "hunter/_event.pyx":240 + /* "hunter/_event.pyx":257 * if self._stdlib is UNSET: * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: # <<<<<<<<<<<<<< @@ -5627,26 +6048,26 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":243 + /* "hunter/_event.pyx":260 * # skip this over-vendored module * self._stdlib = True * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): # <<<<<<<<<<<<<< * # skip namedtuple exec garbage * self._stdlib = True */ - __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_string, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s_string, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -5661,39 +6082,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_n_s_namedtuple) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_s_namedtuple); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_module); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_site, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_site, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { - /* "hunter/_event.pyx":245 + /* "hunter/_event.pyx":262 * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): * # skip namedtuple exec garbage * self._stdlib = True # <<<<<<<<<<<<<< * elif self.filename.startswith(SITE_PACKAGES_PATHS): * # if it's in site-packages then its definitely not stdlib */ - __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L1_error)) + __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L1_error)) __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); __Pyx_GOTREF(__pyx_v_self->_stdlib); __Pyx_DECREF(__pyx_v_self->_stdlib); __pyx_v_self->_stdlib = Py_True; - /* "hunter/_event.pyx":243 + /* "hunter/_event.pyx":260 * # skip this over-vendored module * self._stdlib = True * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): # <<<<<<<<<<<<<< @@ -5703,20 +6124,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":246 + /* "hunter/_event.pyx":263 * # skip namedtuple exec garbage * self._stdlib = True * elif self.filename.startswith(SITE_PACKAGES_PATHS): # <<<<<<<<<<<<<< * # if it's in site-packages then its definitely not stdlib * self._stdlib = False */ - __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_TraceLine(263,0,__PYX_ERR(0, 263, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -5731,28 +6152,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":248 + /* "hunter/_event.pyx":265 * elif self.filename.startswith(SITE_PACKAGES_PATHS): * # if it's in site-packages then its definitely not stdlib * self._stdlib = False # <<<<<<<<<<<<<< * elif self.filename.startswith(SYS_PREFIX_PATHS): * self._stdlib = True */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) + __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L1_error)) __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); __Pyx_GOTREF(__pyx_v_self->_stdlib); __Pyx_DECREF(__pyx_v_self->_stdlib); __pyx_v_self->_stdlib = Py_False; - /* "hunter/_event.pyx":246 + /* "hunter/_event.pyx":263 * # skip namedtuple exec garbage * self._stdlib = True * elif self.filename.startswith(SITE_PACKAGES_PATHS): # <<<<<<<<<<<<<< @@ -5762,20 +6183,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":249 + /* "hunter/_event.pyx":266 * # if it's in site-packages then its definitely not stdlib * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): # <<<<<<<<<<<<<< * self._stdlib = True * else: */ - __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5790,28 +6211,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":250 + /* "hunter/_event.pyx":267 * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): * self._stdlib = True # <<<<<<<<<<<<<< * else: * self._stdlib = False */ - __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error)) + __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error)) __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); __Pyx_GOTREF(__pyx_v_self->_stdlib); __Pyx_DECREF(__pyx_v_self->_stdlib); __pyx_v_self->_stdlib = Py_True; - /* "hunter/_event.pyx":249 + /* "hunter/_event.pyx":266 * # if it's in site-packages then its definitely not stdlib * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): # <<<<<<<<<<<<<< @@ -5821,14 +6242,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":252 + /* "hunter/_event.pyx":269 * self._stdlib = True * else: * self._stdlib = False # <<<<<<<<<<<<<< * return self._stdlib * */ - __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error)) + __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); @@ -5838,7 +6259,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __pyx_L4:; - /* "hunter/_event.pyx":238 + /* "hunter/_event.pyx":255 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< @@ -5847,20 +6268,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":253 + /* "hunter/_event.pyx":270 * else: * self._stdlib = False * return self._stdlib # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L1_error)) + __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_stdlib); __pyx_r = __pyx_v_self->_stdlib; goto __pyx_L0; - /* "hunter/_event.pyx":237 + /* "hunter/_event.pyx":254 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -5884,7 +6305,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":256 +/* "hunter/_event.pyx":273 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -5944,28 +6365,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 256, 0, __PYX_ERR(0, 256, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 273, 0, __PYX_ERR(0, 273, __pyx_L1_error)); - /* "hunter/_event.pyx":259 + /* "hunter/_event.pyx":276 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< * try: * self._fullsource = None */ - __Pyx_TraceLine(259,0,__PYX_ERR(0, 259, __pyx_L1_error)) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_fullsource == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":260 + /* "hunter/_event.pyx":277 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< * self._fullsource = None * */ - __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __pyx_L1_error)) + __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -5975,64 +6396,64 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "hunter/_event.pyx":261 + /* "hunter/_event.pyx":278 * if self._fullsource is UNSET: * try: * self._fullsource = None # <<<<<<<<<<<<<< * * if self.kind == 'call' and self.frame.f_code.co_name != "": */ - __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L4_error)) + __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L4_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_fullsource); __Pyx_DECREF(__pyx_v_self->_fullsource); __pyx_v_self->_fullsource = Py_None; - /* "hunter/_event.pyx":263 + /* "hunter/_event.pyx":280 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< * lines = [] * try: */ - __Pyx_TraceLine(263,0,__PYX_ERR(0, 263, __pyx_L4_error)) - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->kind, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 263, __pyx_L4_error) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L4_error)) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->kind, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 280, __pyx_L4_error) __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L11_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->frame->f_code), __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 263, __pyx_L4_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->frame->f_code), __pyx_n_s_co_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_module_2, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 263, __pyx_L4_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_module_2, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 280, __pyx_L4_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = __pyx_t_6; __pyx_L11_bool_binop_done:; if (__pyx_t_2) { - /* "hunter/_event.pyx":264 + /* "hunter/_event.pyx":281 * * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] # <<<<<<<<<<<<<< * try: * for _, token, _, _, line in generate_tokens(partial( */ - __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __pyx_L4_error)) - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 264, __pyx_L4_error) + __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L4_error)) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_lines = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "hunter/_event.pyx":265 + /* "hunter/_event.pyx":282 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< * for _, token, _, _, line in generate_tokens(partial( * next, */ - __Pyx_TraceLine(265,0,__PYX_ERR(0, 265, __pyx_L4_error)) + __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6042,45 +6463,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "hunter/_event.pyx":266 + /* "hunter/_event.pyx":283 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L13_error)) - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 266, __pyx_L13_error) + __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 266, __pyx_L13_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_13); - /* "hunter/_event.pyx":267 + /* "hunter/_event.pyx":284 * try: * for _, token, _, _, line in generate_tokens(partial( * next, # <<<<<<<<<<<<<< * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): */ - __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L13_error)) - __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 267, __pyx_L13_error) + __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L13_error)) + __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 284, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_14); - /* "hunter/_event.pyx":268 + /* "hunter/_event.pyx":285 * for _, token, _, _, line in generate_tokens(partial( * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) # <<<<<<<<<<<<<< * )): * if token in ("def", "class", "lambda"): */ - __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L13_error)) - __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 268, __pyx_L13_error) + __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_18); - __pyx_t_19 = __Pyx_PyInt_SubtractObjC(__pyx_t_18, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_19 = __Pyx_PyInt_SubtractObjC(__pyx_t_18, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; @@ -6098,7 +6519,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_16)) { PyObject *__pyx_temp[5] = {__pyx_t_18, __pyx_t_17, __pyx_v_self->frame->f_globals, __pyx_t_19, __pyx_v_lines}; - __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_20, 4+__pyx_t_20); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_20, 4+__pyx_t_20); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; @@ -6108,7 +6529,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) { PyObject *__pyx_temp[5] = {__pyx_t_18, __pyx_t_17, __pyx_v_self->frame->f_globals, __pyx_t_19, __pyx_v_lines}; - __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_20, 4+__pyx_t_20); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_20, 4+__pyx_t_20); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; @@ -6116,7 +6537,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p } else #endif { - __pyx_t_21 = PyTuple_New(4+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(4+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_21); if (__pyx_t_18) { __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_18); __pyx_t_18 = NULL; @@ -6133,7 +6554,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_v_lines); __pyx_t_17 = 0; __pyx_t_19 = 0; - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 268, __pyx_L13_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6153,7 +6574,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_14, __pyx_t_15}; - __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -6163,7 +6584,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_t_14, __pyx_t_15}; - __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_20, 2+__pyx_t_20); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -6171,7 +6592,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p } else #endif { - __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_21); if (__pyx_t_16) { __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_16); __pyx_t_16 = NULL; @@ -6182,7 +6603,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_15); __pyx_t_14 = 0; __pyx_t_15 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_21, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_21, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6200,25 +6621,25 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_t_7 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L13_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":266 + /* "hunter/_event.pyx":283 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L13_error)) + __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L13_error)) if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_11 = __pyx_t_7; __Pyx_INCREF(__pyx_t_11); __pyx_t_22 = 0; __pyx_t_23 = NULL; } else { - __pyx_t_22 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_22 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_23 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_23 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 283, __pyx_L13_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -6226,17 +6647,17 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p if (likely(PyList_CheckExact(__pyx_t_11))) { if (__pyx_t_22 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_22); __Pyx_INCREF(__pyx_t_7); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_22); __Pyx_INCREF(__pyx_t_7); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(0, 283, __pyx_L13_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_11, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_11, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_22 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_22); __Pyx_INCREF(__pyx_t_7); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_22); __Pyx_INCREF(__pyx_t_7); __pyx_t_22++; if (unlikely(0 < 0)) __PYX_ERR(0, 283, __pyx_L13_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_11, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_11, __pyx_t_22); __pyx_t_22++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -6246,7 +6667,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 266, __pyx_L13_error) + else __PYX_ERR(0, 283, __pyx_L13_error) } break; } @@ -6258,7 +6679,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p if (unlikely(size != 5)) { if (size > 5) __Pyx_RaiseTooManyValuesError(5); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 266, __pyx_L13_error) + __PYX_ERR(0, 283, __pyx_L13_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6284,7 +6705,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p Py_ssize_t i; PyObject** temps[5] = {&__pyx_t_12,&__pyx_t_13,&__pyx_t_21,&__pyx_t_15,&__pyx_t_14}; for (i=0; i < 5; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 266, __pyx_L13_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -6294,7 +6715,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p } else { Py_ssize_t index = -1; PyObject** temps[5] = {&__pyx_t_12,&__pyx_t_13,&__pyx_t_21,&__pyx_t_15,&__pyx_t_14}; - __pyx_t_16 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 266, __pyx_L13_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 283, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_24 = Py_TYPE(__pyx_t_16)->tp_iternext; @@ -6303,7 +6724,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_16), 5) < 0) __PYX_ERR(0, 266, __pyx_L13_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_16), 5) < 0) __PYX_ERR(0, 283, __pyx_L13_error) __pyx_t_24 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L22_unpacking_done; @@ -6311,7 +6732,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_24 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 266, __pyx_L13_error) + __PYX_ERR(0, 283, __pyx_L13_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); @@ -6325,44 +6746,44 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_14); __pyx_t_14 = 0; - /* "hunter/_event.pyx":270 + /* "hunter/_event.pyx":287 * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): * if token in ("def", "class", "lambda"): # <<<<<<<<<<<<<< * self._fullsource = ''.join(lines) * break */ - __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L13_error)) + __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L13_error)) __Pyx_INCREF(__pyx_v_token); __pyx_t_7 = __pyx_v_token; - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_def, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 270, __pyx_L13_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_def, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 287, __pyx_L13_error) if (!__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L24_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_class, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 270, __pyx_L13_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_class, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 287, __pyx_L13_error) if (!__pyx_t_6) { } else { __pyx_t_2 = __pyx_t_6; goto __pyx_L24_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_lambda, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 270, __pyx_L13_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_lambda, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 287, __pyx_L13_error) __pyx_t_2 = __pyx_t_6; __pyx_L24_bool_binop_done:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { - /* "hunter/_event.pyx":271 + /* "hunter/_event.pyx":288 * )): * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) # <<<<<<<<<<<<<< * break * except TokenError: */ - __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __pyx_L13_error)) - __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 271, __pyx_L13_error) + __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L13_error)) + __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 288, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_fullsource); @@ -6370,17 +6791,17 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_v_self->_fullsource = __pyx_t_7; __pyx_t_7 = 0; - /* "hunter/_event.pyx":272 + /* "hunter/_event.pyx":289 * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) * break # <<<<<<<<<<<<<< * except TokenError: * pass */ - __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __pyx_L13_error)) + __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L13_error)) goto __pyx_L20_break; - /* "hunter/_event.pyx":270 + /* "hunter/_event.pyx":287 * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): * if token in ("def", "class", "lambda"): # <<<<<<<<<<<<<< @@ -6389,19 +6810,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":266 + /* "hunter/_event.pyx":283 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L13_error)) + __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L13_error)) } __pyx_L20_break:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":265 + /* "hunter/_event.pyx":282 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6426,16 +6847,16 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "hunter/_event.pyx":273 + /* "hunter/_event.pyx":290 * self._fullsource = ''.join(lines) * break * except TokenError: # <<<<<<<<<<<<<< * pass * if self._fullsource is None: */ - __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L15_except_error)) + __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L15_except_error)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_7, &__pyx_t_14); - __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_TokenError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 273, __pyx_L15_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_TokenError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 290, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_20 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_11, __pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -6448,7 +6869,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p goto __pyx_L15_except_error; __pyx_L15_except_error:; - /* "hunter/_event.pyx":265 + /* "hunter/_event.pyx":282 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6468,7 +6889,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L18_try_end:; } - /* "hunter/_event.pyx":263 + /* "hunter/_event.pyx":280 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< @@ -6477,31 +6898,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":275 + /* "hunter/_event.pyx":292 * except TokenError: * pass * if self._fullsource is None: # <<<<<<<<<<<<<< * self._fullsource = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: */ - __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L4_error)) + __Pyx_TraceLine(292,0,__PYX_ERR(0, 292, __pyx_L4_error)) __pyx_t_6 = (__pyx_v_self->_fullsource == Py_None); __pyx_t_2 = (__pyx_t_6 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":276 + /* "hunter/_event.pyx":293 * pass * if self._fullsource is None: * self._fullsource = getline(self.filename, self.lineno, self.frame.f_globals) # <<<<<<<<<<<<<< * except Exception as exc: * self._fullsource = "??? NO SOURCE: {!r}".format(exc) */ - __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L4_error)) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L4_error) + __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L4_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 276, __pyx_L4_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 276, __pyx_L4_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_21 = NULL; __pyx_t_20 = 0; @@ -6518,7 +6939,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_21, __pyx_t_11, __pyx_t_15, __pyx_v_self->frame->f_globals}; - __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 276, __pyx_L4_error) + __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -6528,7 +6949,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[4] = {__pyx_t_21, __pyx_t_11, __pyx_t_15, __pyx_v_self->frame->f_globals}; - __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 276, __pyx_L4_error) + __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_20, 3+__pyx_t_20); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -6536,7 +6957,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p } else #endif { - __pyx_t_13 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L4_error) + __pyx_t_13 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_21) { __Pyx_GIVEREF(__pyx_t_21); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_21); __pyx_t_21 = NULL; @@ -6550,7 +6971,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_20, __pyx_v_self->frame->f_globals); __pyx_t_11 = 0; __pyx_t_15 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 276, __pyx_L4_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 293, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -6561,7 +6982,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_v_self->_fullsource = __pyx_t_14; __pyx_t_14 = 0; - /* "hunter/_event.pyx":275 + /* "hunter/_event.pyx":292 * except TokenError: * pass * if self._fullsource is None: # <<<<<<<<<<<<<< @@ -6570,7 +6991,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":260 + /* "hunter/_event.pyx":277 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -6595,18 +7016,18 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "hunter/_event.pyx":277 + /* "hunter/_event.pyx":294 * if self._fullsource is None: * self._fullsource = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: # <<<<<<<<<<<<<< * self._fullsource = "??? NO SOURCE: {!r}".format(exc) * return self._fullsource */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L6_except_error)) + __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L6_except_error)) __pyx_t_20 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_20) { __Pyx_AddTraceback("hunter._event.Event.fullsource.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 277, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 294, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_13); @@ -6614,15 +7035,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_v_exc = __pyx_t_7; /*try:*/ { - /* "hunter/_event.pyx":278 + /* "hunter/_event.pyx":295 * self._fullsource = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: * self._fullsource = "??? NO SOURCE: {!r}".format(exc) # <<<<<<<<<<<<<< * return self._fullsource * */ - __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L33_error)) - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_NO_SOURCE_r, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 278, __pyx_L33_error) + __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L33_error)) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_NO_SOURCE_r, __pyx_n_s_format); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 295, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_21 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -6636,7 +7057,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p } __pyx_t_15 = (__pyx_t_21) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_21, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_v_exc); __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0; - if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 278, __pyx_L33_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 295, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GIVEREF(__pyx_t_15); @@ -6646,14 +7067,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_t_15 = 0; } - /* "hunter/_event.pyx":277 + /* "hunter/_event.pyx":294 * if self._fullsource is None: * self._fullsource = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: # <<<<<<<<<<<<<< * self._fullsource = "??? NO SOURCE: {!r}".format(exc) * return self._fullsource */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L33_error)) + __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L33_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -6710,7 +7131,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "hunter/_event.pyx":260 + /* "hunter/_event.pyx":277 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -6730,7 +7151,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L9_try_end:; } - /* "hunter/_event.pyx":259 + /* "hunter/_event.pyx":276 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< @@ -6739,20 +7160,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":279 + /* "hunter/_event.pyx":296 * except Exception as exc: * self._fullsource = "??? NO SOURCE: {!r}".format(exc) * return self._fullsource # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L1_error)) + __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_fullsource); __pyx_r = __pyx_v_self->_fullsource; goto __pyx_L0; - /* "hunter/_event.pyx":256 + /* "hunter/_event.pyx":273 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -6787,7 +7208,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":282 +/* "hunter/_event.pyx":299 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -6836,31 +7257,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 282, 0, __PYX_ERR(0, 282, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 299, 0, __PYX_ERR(0, 299, __pyx_L1_error)); - /* "hunter/_event.pyx":283 + /* "hunter/_event.pyx":300 * @property * def source(self): * if self._source is UNSET: # <<<<<<<<<<<<<< * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) */ - __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L1_error)) + __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->_source == __pyx_v_6hunter_6_event_UNSET); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":284 + /* "hunter/_event.pyx":301 * def source(self): * if self._source is UNSET: * if self.filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: */ - __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L1_error) + __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -6873,30 +7294,30 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __Pyx_DECREF_SET(__pyx_t_5, function); } } - __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_tuple__5) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_tuple__5); + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_tuple__9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_tuple__9); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":285 + /* "hunter/_event.pyx":302 * if self._source is UNSET: * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) # <<<<<<<<<<<<<< * try: * self._source = getline(self.filename, self.lineno, self.frame.f_globals) */ - __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_NO_SOURCE_not_reading_file, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_NO_SOURCE_not_reading_file, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_splitext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_splitext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_basename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_basename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -6911,7 +7332,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_7 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -6927,10 +7348,10 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -6946,7 +7367,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __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, 285, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -6955,7 +7376,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_v_self->_source = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":284 + /* "hunter/_event.pyx":301 * def source(self): * if self._source is UNSET: * if self.filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -6964,14 +7385,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":286 + /* "hunter/_event.pyx":303 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< * self._source = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: */ - __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L1_error)) + __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6981,19 +7402,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "hunter/_event.pyx":287 + /* "hunter/_event.pyx":304 * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: * self._source = getline(self.filename, self.lineno, self.frame.f_globals) # <<<<<<<<<<<<<< * except Exception as exc: * self._source = "??? NO SOURCE: {!r}".format(exc) */ - __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L5_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L5_error) + __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __pyx_L5_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 287, __pyx_L5_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 287, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lineno); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_14 = 0; @@ -7010,7 +7431,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_6, __pyx_t_4, __pyx_v_self->frame->f_globals}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -7020,7 +7441,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_6, __pyx_t_4, __pyx_v_self->frame->f_globals}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -7028,7 +7449,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 287, __pyx_L5_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -7042,7 +7463,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_v_self->frame->f_globals); __pyx_t_6 = 0; __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -7053,7 +7474,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_v_self->_source = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":286 + /* "hunter/_event.pyx":303 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7075,18 +7496,18 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "hunter/_event.pyx":288 + /* "hunter/_event.pyx":305 * try: * self._source = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: # <<<<<<<<<<<<<< * self._source = "??? NO SOURCE: {!r}".format(exc) * */ - __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L7_except_error)) + __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L7_except_error)) __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_14) { __Pyx_AddTraceback("hunter._event.Event.source.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 288, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 305, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); @@ -7094,15 +7515,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_v_exc = __pyx_t_5; /*try:*/ { - /* "hunter/_event.pyx":289 + /* "hunter/_event.pyx":306 * self._source = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: * self._source = "??? NO SOURCE: {!r}".format(exc) # <<<<<<<<<<<<<< * * return self._source */ - __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L16_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_NO_SOURCE_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 289, __pyx_L16_error) + __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __pyx_L16_error)) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_NO_SOURCE_r, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 306, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -7116,7 +7537,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob } __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_7, __pyx_v_exc) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_exc); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 289, __pyx_L16_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -7126,14 +7547,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_4 = 0; } - /* "hunter/_event.pyx":288 + /* "hunter/_event.pyx":305 * try: * self._source = getline(self.filename, self.lineno, self.frame.f_globals) * except Exception as exc: # <<<<<<<<<<<<<< * self._source = "??? NO SOURCE: {!r}".format(exc) * */ - __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L16_error)) + __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L16_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7187,7 +7608,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "hunter/_event.pyx":286 + /* "hunter/_event.pyx":303 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7207,7 +7628,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_L10_try_end:; } - /* "hunter/_event.pyx":283 + /* "hunter/_event.pyx":300 * @property * def source(self): * if self._source is UNSET: # <<<<<<<<<<<<<< @@ -7216,20 +7637,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":291 + /* "hunter/_event.pyx":308 * self._source = "??? NO SOURCE: {!r}".format(exc) * * return self._source # <<<<<<<<<<<<<< * * def __getitem__(self, item): */ - __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error)) + __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_source); __pyx_r = __pyx_v_self->_source; goto __pyx_L0; - /* "hunter/_event.pyx":282 + /* "hunter/_event.pyx":299 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7257,7 +7678,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":293 +/* "hunter/_event.pyx":310 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7266,42 +7687,42 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { +static PyObject *__pyx_pw_6hunter_6_event_5Event_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_4__getitem__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_8__getitem__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v_item)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_6_event_5Event_4__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_8__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 293, 0, __PYX_ERR(0, 293, __pyx_L1_error)); + __Pyx_TraceCall("__getitem__", __pyx_f[0], 310, 0, __PYX_ERR(0, 310, __pyx_L1_error)); - /* "hunter/_event.pyx":294 + /* "hunter/_event.pyx":311 * * def __getitem__(self, item): * return getattr(self, item) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __pyx_L1_error)) + __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_event.pyx":293 + /* "hunter/_event.pyx":310 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7645,19 +8066,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8detached___get__(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6hunter_6_event_5Event_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_6__reduce_cython__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_10__reduce_cython__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_6_event_5Event_6__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_10__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -8077,19 +8498,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6__reduce_cython__(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_6hunter_6_event_5Event_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_8__setstate_cython__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_12__setstate_cython__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_6_event_5Event_8__setstate_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_12__setstate_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -8130,7 +8551,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8__setstate_cython__(struct __p } static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "hunter/_event.pyx":297 +/* "hunter/_event.pyx":314 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -8180,19 +8601,19 @@ static PyObject *__pyx_pw_6hunter_6_event_1yield_lines(PyObject *__pyx_self, PyO case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_module_globals)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 1); __PYX_ERR(0, 297, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 1); __PYX_ERR(0, 314, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 2); __PYX_ERR(0, 297, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 2); __PYX_ERR(0, 314, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_collector)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 3); __PYX_ERR(0, 297, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 3); __PYX_ERR(0, 314, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -8202,7 +8623,7 @@ static PyObject *__pyx_pw_6hunter_6_event_1yield_lines(PyObject *__pyx_self, PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "yield_lines") < 0)) __PYX_ERR(0, 297, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "yield_lines") < 0)) __PYX_ERR(0, 314, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8224,13 +8645,13 @@ static PyObject *__pyx_pw_6hunter_6_event_1yield_lines(PyObject *__pyx_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 297, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 314, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._event.yield_lines", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_collector), (&PyList_Type), 1, "collector", 1))) __PYX_ERR(0, 297, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_collector), (&PyList_Type), 1, "collector", 1))) __PYX_ERR(0, 314, __pyx_L1_error) __pyx_r = __pyx_pf_6hunter_6_event_yield_lines(__pyx_self, __pyx_v_filename, __pyx_v_module_globals, __pyx_v_start, __pyx_v_collector, __pyx_v_limit); /* function exit code */ @@ -8251,7 +8672,7 @@ static PyObject *__pyx_pf_6hunter_6_event_yield_lines(CYTHON_UNUSED PyObject *__ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 297, __pyx_L1_error) + __PYX_ERR(0, 314, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8271,7 +8692,7 @@ static PyObject *__pyx_pf_6hunter_6_event_yield_lines(CYTHON_UNUSED PyObject *__ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_limit); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_limit); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_6_event_2generator, __pyx_codeobj__8, (PyObject *) __pyx_cur_scope, __pyx_n_s_yield_lines, __pyx_n_s_yield_lines, __pyx_n_s_hunter__event); if (unlikely(!gen)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_6_event_2generator, __pyx_codeobj__12, (PyObject *) __pyx_cur_scope, __pyx_n_s_yield_lines, __pyx_n_s_yield_lines, __pyx_n_s_hunter__event); if (unlikely(!gen)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8305,8 +8726,8 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py int __pyx_t_11; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("yield_lines", 0); - __Pyx_TraceFrameInit(__pyx_codeobj__8) - __Pyx_TraceCall("yield_lines", __pyx_f[0], 297, 0, __PYX_ERR(0, 297, __pyx_L1_error)); + __Pyx_TraceFrameInit(__pyx_codeobj__12) + __Pyx_TraceCall("yield_lines", __pyx_f[0], 314, 0, __PYX_ERR(0, 314, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; @@ -8316,39 +8737,39 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 297, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 314, __pyx_L1_error) - /* "hunter/_event.pyx":299 + /* "hunter/_event.pyx":316 * def yield_lines(filename, module_globals, start, list collector, * limit=10): * dedent = None # <<<<<<<<<<<<<< * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: */ - __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error)) + __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_dedent = Py_None; - /* "hunter/_event.pyx":300 + /* "hunter/_event.pyx":317 * limit=10): * dedent = None * amount = 0 # <<<<<<<<<<<<<< * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: */ - __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) + __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_amount = 0; - /* "hunter/_event.pyx":301 + /* "hunter/_event.pyx":318 * dedent = None * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: # <<<<<<<<<<<<<< * if dedent is None: * dedent = LEADING_WHITESPACE_RE.findall(line) */ - __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8365,7 +8786,7 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_filename, __pyx_cur_scope->__pyx_v_module_globals}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8373,13 +8794,13 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_filename, __pyx_cur_scope->__pyx_v_module_globals}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -8390,14 +8811,14 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_INCREF(__pyx_cur_scope->__pyx_v_module_globals); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_module_globals); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_cur_scope->__pyx_v_module_globals); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_cur_scope->__pyx_v_start, __pyx_cur_scope->__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_cur_scope->__pyx_v_start, __pyx_cur_scope->__pyx_v_limit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_cur_scope->__pyx_v_start, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0, &__pyx_cur_scope->__pyx_v_start, &__pyx_t_2, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -8405,9 +8826,9 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -8415,17 +8836,17 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 318, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 318, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -8435,7 +8856,7 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 301, __pyx_L1_error) + else __PYX_ERR(0, 318, __pyx_L1_error) } break; } @@ -8446,29 +8867,29 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":302 + /* "hunter/_event.pyx":319 * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: # <<<<<<<<<<<<<< * dedent = LEADING_WHITESPACE_RE.findall(line) * dedent = dedent[0] if dedent else "" */ - __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) + __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __pyx_L1_error)) __pyx_t_8 = (__pyx_cur_scope->__pyx_v_dedent == Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "hunter/_event.pyx":303 + /* "hunter/_event.pyx":320 * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: * dedent = LEADING_WHITESPACE_RE.findall(line) # <<<<<<<<<<<<<< * dedent = dedent[0] if dedent else "" * amount = len(dedent) */ - __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) + __Pyx_TraceLine(320,0,__PYX_ERR(0, 320, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -8483,7 +8904,7 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_cur_scope->__pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_line); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dedent); @@ -8491,41 +8912,41 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":304 + /* "hunter/_event.pyx":321 * if dedent is None: * dedent = LEADING_WHITESPACE_RE.findall(line) * dedent = dedent[0] if dedent else "" # <<<<<<<<<<<<<< * amount = len(dedent) * elif not line.startswith(dedent): */ - __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __pyx_L1_error)) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 304, __pyx_L1_error) + __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error)) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 321, __pyx_L1_error) if (__pyx_t_9) { - __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dedent, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_dedent, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } else { - __Pyx_INCREF(__pyx_kp_s_); - __pyx_t_5 = __pyx_kp_s_; + __Pyx_INCREF(__pyx_kp_s__5); + __pyx_t_5 = __pyx_kp_s__5; } __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_dedent); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_dedent, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":305 + /* "hunter/_event.pyx":322 * dedent = LEADING_WHITESPACE_RE.findall(line) * dedent = dedent[0] if dedent else "" * amount = len(dedent) # <<<<<<<<<<<<<< * elif not line.startswith(dedent): * break */ - __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error)) - __pyx_t_10 = PyObject_Length(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 305, __pyx_L1_error) + __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error)) + __pyx_t_10 = PyObject_Length(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 322, __pyx_L1_error) __pyx_cur_scope->__pyx_v_amount = __pyx_t_10; - /* "hunter/_event.pyx":302 + /* "hunter/_event.pyx":319 * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: # <<<<<<<<<<<<<< @@ -8535,15 +8956,15 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py goto __pyx_L6; } - /* "hunter/_event.pyx":306 + /* "hunter/_event.pyx":323 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< * break * collector.append(line) */ - __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) + __Pyx_TraceLine(323,0,__PYX_ERR(0, 323, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_startswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -8557,25 +8978,25 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_cur_scope->__pyx_v_dedent) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_dedent); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "hunter/_event.pyx":307 + /* "hunter/_event.pyx":324 * amount = len(dedent) * elif not line.startswith(dedent): * break # <<<<<<<<<<<<<< * collector.append(line) * yield line[amount:] */ - __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error)) + __Pyx_TraceLine(324,0,__PYX_ERR(0, 324, __pyx_L1_error)) goto __pyx_L5_break; - /* "hunter/_event.pyx":306 + /* "hunter/_event.pyx":323 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< @@ -8585,26 +9006,26 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py } __pyx_L6:; - /* "hunter/_event.pyx":308 + /* "hunter/_event.pyx":325 * elif not line.startswith(dedent): * break * collector.append(line) # <<<<<<<<<<<<<< * yield line[amount:] */ - __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) + __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error)) if (unlikely(__pyx_cur_scope->__pyx_v_collector == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 308, __pyx_L1_error) + __PYX_ERR(0, 325, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_collector, __pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_collector, __pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 325, __pyx_L1_error) - /* "hunter/_event.pyx":309 + /* "hunter/_event.pyx":326 * break * collector.append(line) * yield line[amount:] # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_line, __pyx_cur_scope->__pyx_v_amount, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) + __Pyx_TraceLine(326,0,__PYX_ERR(0, 326, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_line, __pyx_cur_scope->__pyx_v_amount, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -8625,22 +9046,22 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_XGOTREF(__pyx_t_2); __pyx_t_6 = __pyx_cur_scope->__pyx_t_1; __pyx_t_7 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 309, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 326, __pyx_L1_error) - /* "hunter/_event.pyx":301 + /* "hunter/_event.pyx":318 * dedent = None * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: # <<<<<<<<<<<<<< * if dedent is None: * dedent = LEADING_WHITESPACE_RE.findall(line) */ - __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L1_error)) + __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error)) } __pyx_L5_break:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "hunter/_event.pyx":297 + /* "hunter/_event.pyx":314 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -8760,7 +9181,7 @@ static PyObject *__pyx_pf_6hunter_6_event_3__pyx_unpickle_Event(CYTHON_UNUSED Py PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__9) + __Pyx_TraceFrameInit(__pyx_codeobj__13) __Pyx_RefNannySetupContext("__pyx_unpickle_Event", 0); __Pyx_TraceCall("__pyx_unpickle_Event", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -9537,8 +9958,10 @@ static PyObject *__pyx_getprop_6hunter_6_event_5Event_detached(PyObject *o, CYTH static PyMethodDef __pyx_methods_6hunter_6_event_Event[] = { {"detach", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_6_event_5Event_3detach, METH_VARARGS|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_7__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_9__setstate_cython__, METH_O, 0}, + {"set_frame", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_5set_frame, METH_O, 0}, + {"make_fake_event", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_7make_fake_event, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_11__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_13__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; @@ -9581,7 +10004,7 @@ static PySequenceMethods __pyx_tp_as_sequence_Event = { static PyMappingMethods __pyx_tp_as_mapping_Event = { 0, /*mp_length*/ - __pyx_pw_6hunter_6_event_5Event_5__getitem__, /*mp_subscript*/ + __pyx_pw_6hunter_6_event_5Event_9__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; @@ -9834,8 +10257,8 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, {&__pyx_n_s_CYTHON_SUFFIX_RE, __pyx_k_CYTHON_SUFFIX_RE, sizeof(__pyx_k_CYTHON_SUFFIX_RE), 0, 0, 1, 1}, + {&__pyx_kp_s_Depth_calls_and_threading_suppor, __pyx_k_Depth_calls_and_threading_suppor, sizeof(__pyx_k_Depth_calls_and_threading_suppor), 0, 0, 1, 0}, {&__pyx_n_s_Event, __pyx_k_Event, sizeof(__pyx_k_Event), 0, 0, 1, 1}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x36, __pyx_k_Incompatible_checksums_s_vs_0x36, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x36), 0, 0, 1, 0}, {&__pyx_n_s_LEADING_WHITESPACE_RE, __pyx_k_LEADING_WHITESPACE_RE, sizeof(__pyx_k_LEADING_WHITESPACE_RE), 0, 0, 1, 1}, @@ -9845,13 +10268,16 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_SITE_PACKAGES_PATHS, __pyx_k_SITE_PACKAGES_PATHS, sizeof(__pyx_k_SITE_PACKAGES_PATHS), 0, 0, 1, 1}, {&__pyx_n_s_SYS_PREFIX_PATHS, __pyx_k_SYS_PREFIX_PATHS, sizeof(__pyx_k_SYS_PREFIX_PATHS), 0, 0, 1, 1}, {&__pyx_n_s_TokenError, __pyx_k_TokenError, sizeof(__pyx_k_TokenError), 0, 0, 1, 1}, - {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0}, + {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, {&__pyx_n_s_amount, __pyx_k_amount, sizeof(__pyx_k_amount), 0, 0, 1, 1}, {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_basename, __pyx_k_basename, sizeof(__pyx_k_basename), 0, 0, 1, 1}, {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, + {&__pyx_n_s_calls, __pyx_k_calls, sizeof(__pyx_k_calls), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, @@ -9864,6 +10290,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_current_thread, __pyx_k_current_thread, sizeof(__pyx_k_current_thread), 0, 0, 1, 1}, {&__pyx_n_s_dedent, __pyx_k_dedent, sizeof(__pyx_k_dedent), 0, 0, 1, 1}, {&__pyx_n_s_def, __pyx_k_def, sizeof(__pyx_k_def), 0, 0, 1, 1}, + {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1}, @@ -9943,6 +10370,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_threadid, __pyx_k_threadid, sizeof(__pyx_k_threadid), 0, 0, 1, 1}, {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1}, + {&__pyx_n_s_threading_support, __pyx_k_threading_support, sizeof(__pyx_k_threading_support), 0, 0, 1, 1}, {&__pyx_n_s_threadname, __pyx_k_threadname, sizeof(__pyx_k_threadname), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_tokenize, __pyx_k_tokenize, sizeof(__pyx_k_tokenize), 0, 0, 1, 1}, @@ -9955,7 +10383,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 26, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 27, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 47, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -9965,93 +10394,104 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "hunter/_event.pyx":195 + /* "hunter/_event.pyx":47 + * if tracer is None: + * if UNSET in (depth, calls, threading_support): + * raise TypeError("Depth, calls and threading support need to be specified when creating and event") # <<<<<<<<<<<<<< + * else: + * depth = tracer.depth + */ + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Depth_calls_and_threading_suppor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "hunter/_event.pyx":212 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __pyx_tuple__2 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s_); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 212, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); - /* "hunter/_event.pyx":210 + /* "hunter/_event.pyx":227 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __pyx_tuple__3 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); - /* "hunter/_event.pyx":211 + /* "hunter/_event.pyx":228 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __pyx_slice__4 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 211, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__4); - __Pyx_GIVEREF(__pyx_slice__4); + __pyx_slice__8 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__8); + __Pyx_GIVEREF(__pyx_slice__8); - /* "hunter/_event.pyx":212 + /* "hunter/_event.pyx":229 * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): */ - __pyx_tuple__5 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 212, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__5); - __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_tuple__9 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); - /* "hunter/_event.pyx":214 + /* "hunter/_event.pyx":231 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __pyx_tuple__6 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 214, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__6); - __Pyx_GIVEREF(__pyx_tuple__6); + __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 231, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); - /* "hunter/_event.pyx":24 + /* "hunter/_event.pyx":25 * from .util import if_same_code * * __all__ = 'Event', # <<<<<<<<<<<<<< * * cdef object UNSET = object() */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_n_s_Event); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 24, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_Event); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); - /* "hunter/_event.pyx":297 + /* "hunter/_event.pyx":314 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __pyx_tuple__11 = PyTuple_Pack(8, __pyx_n_s_filename, __pyx_n_s_module_globals, __pyx_n_s_start, __pyx_n_s_collector, __pyx_n_s_limit, __pyx_n_s_dedent, __pyx_n_s_amount, __pyx_n_s_line); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 297, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__11); - __Pyx_GIVEREF(__pyx_tuple__11); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__11, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_hunter__event_pyx, __pyx_n_s_yield_lines, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 297, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(8, __pyx_n_s_filename, __pyx_n_s_module_globals, __pyx_n_s_start, __pyx_n_s_collector, __pyx_n_s_limit, __pyx_n_s_dedent, __pyx_n_s_amount, __pyx_n_s_line); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 314, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_hunter__event_pyx, __pyx_n_s_yield_lines, 314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 314, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_tuple__12 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); - __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__16 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Event, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -10109,18 +10549,18 @@ static int __Pyx_modinit_type_init_code(void) { /*--- Type init code ---*/ __pyx_vtabptr_6hunter_6_event_Event = &__pyx_vtable_6hunter_6_event_Event; __pyx_vtable_6hunter_6_event_Event.clone = (struct __pyx_obj_6hunter_6_event_Event *(*)(struct __pyx_obj_6hunter_6_event_Event *))__pyx_f_6hunter_6_event_5Event_clone; - if (PyType_Ready(&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 29, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 30, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_6_event_Event.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_6_event_Event.tp_dictoffset && __pyx_type_6hunter_6_event_Event.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6hunter_6_event_Event.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_6hunter_6_event_Event.tp_dict, __pyx_vtabptr_6hunter_6_event_Event) < 0) __PYX_ERR(0, 29, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 29, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 29, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_6hunter_6_event_Event.tp_dict, __pyx_vtabptr_6hunter_6_event_Event) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Event, (PyObject *)&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 30, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 30, __pyx_L1_error) __pyx_ptype_6hunter_6_event_Event = &__pyx_type_6hunter_6_event_Event; - if (PyType_Ready(&__pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines) < 0) __PYX_ERR(0, 297, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines) < 0) __PYX_ERR(0, 314, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines.tp_print = 0; #endif @@ -10152,16 +10592,26 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("types"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("types"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6hunter_7_tracer_CodeType = __Pyx_ImportType(__pyx_t_1, "types", "CodeType", sizeof(PyCodeObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_7_tracer_CodeType) __PYX_ERR(4, 9, __pyx_L1_error) + if (!__pyx_ptype_6hunter_7_tracer_CodeType) __PYX_ERR(6, 9, __pyx_L1_error) __pyx_ptype_6hunter_7_tracer_FrameType = __Pyx_ImportType(__pyx_t_1, "types", "FrameType", sizeof(PyFrameObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_7_tracer_FrameType) __PYX_ERR(4, 13, __pyx_L1_error) - __pyx_t_2 = PyImport_ImportModule("hunter._tracer"); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 28, __pyx_L1_error) + if (!__pyx_ptype_6hunter_7_tracer_FrameType) __PYX_ERR(6, 13, __pyx_L1_error) + __pyx_t_2 = PyImport_ImportModule("hunter._tracer"); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6hunter_7_tracer_Tracer = __Pyx_ImportType(__pyx_t_2, "hunter._tracer", "Tracer", sizeof(struct __pyx_obj_6hunter_7_tracer_Tracer), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_7_tracer_Tracer) __PYX_ERR(4, 28, __pyx_L1_error) + if (!__pyx_ptype_6hunter_7_tracer_Tracer) __PYX_ERR(6, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_RefNannyFinishContext(); @@ -10586,206 +11036,224 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":16 + /* "hunter/_event.pyx":17 * from ._tracer cimport Tracer * * from .const import SITE_PACKAGES_PATHS # <<<<<<<<<<<<<< * from .const import SYS_PREFIX_PATHS * from .util import CYTHON_SUFFIX_RE */ - __Pyx_TraceLine(16,0,__PYX_ERR(0, 16, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) + __Pyx_TraceLine(17,0,__PYX_ERR(0, 17, __pyx_L1_error)) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_SITE_PACKAGES_PATHS); __Pyx_GIVEREF(__pyx_n_s_SITE_PACKAGES_PATHS); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SITE_PACKAGES_PATHS); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_const, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_const, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SITE_PACKAGES_PATHS, __pyx_t_2) < 0) __PYX_ERR(0, 16, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SITE_PACKAGES_PATHS, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_event.pyx":17 + /* "hunter/_event.pyx":18 * * from .const import SITE_PACKAGES_PATHS * from .const import SYS_PREFIX_PATHS # <<<<<<<<<<<<<< * from .util import CYTHON_SUFFIX_RE * from .util import LEADING_WHITESPACE_RE */ - __Pyx_TraceLine(17,0,__PYX_ERR(0, 17, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error)) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_SYS_PREFIX_PATHS); __Pyx_GIVEREF(__pyx_n_s_SYS_PREFIX_PATHS); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SYS_PREFIX_PATHS); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_const, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_const, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYS_PREFIX_PATHS, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SYS_PREFIX_PATHS, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":18 + /* "hunter/_event.pyx":19 * from .const import SITE_PACKAGES_PATHS * from .const import SYS_PREFIX_PATHS * from .util import CYTHON_SUFFIX_RE # <<<<<<<<<<<<<< * from .util import LEADING_WHITESPACE_RE * from .util import get_func_in_mro */ - __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_TraceLine(19,0,__PYX_ERR(0, 19, __pyx_L1_error)) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_CYTHON_SUFFIX_RE); __Pyx_GIVEREF(__pyx_n_s_CYTHON_SUFFIX_RE); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CYTHON_SUFFIX_RE); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYTHON_SUFFIX_RE, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CYTHON_SUFFIX_RE, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_event.pyx":19 + /* "hunter/_event.pyx":20 * from .const import SYS_PREFIX_PATHS * from .util import CYTHON_SUFFIX_RE * from .util import LEADING_WHITESPACE_RE # <<<<<<<<<<<<<< * from .util import get_func_in_mro * from .util import get_main_thread */ - __Pyx_TraceLine(19,0,__PYX_ERR(0, 19, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __Pyx_TraceLine(20,0,__PYX_ERR(0, 20, __pyx_L1_error)) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_LEADING_WHITESPACE_RE); __Pyx_GIVEREF(__pyx_n_s_LEADING_WHITESPACE_RE); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_LEADING_WHITESPACE_RE); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_util, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_util, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LEADING_WHITESPACE_RE, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_LEADING_WHITESPACE_RE, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":20 + /* "hunter/_event.pyx":21 * from .util import CYTHON_SUFFIX_RE * from .util import LEADING_WHITESPACE_RE * from .util import get_func_in_mro # <<<<<<<<<<<<<< * from .util import get_main_thread * from .util import if_same_code */ - __Pyx_TraceLine(20,0,__PYX_ERR(0, 20, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __Pyx_TraceLine(21,0,__PYX_ERR(0, 21, __pyx_L1_error)) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_get_func_in_mro); __Pyx_GIVEREF(__pyx_n_s_get_func_in_mro); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_func_in_mro); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_func_in_mro, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_func_in_mro, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_event.pyx":21 + /* "hunter/_event.pyx":22 * from .util import LEADING_WHITESPACE_RE * from .util import get_func_in_mro * from .util import get_main_thread # <<<<<<<<<<<<<< * from .util import if_same_code * */ - __Pyx_TraceLine(21,0,__PYX_ERR(0, 21, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_TraceLine(22,0,__PYX_ERR(0, 22, __pyx_L1_error)) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_get_main_thread); __Pyx_GIVEREF(__pyx_n_s_get_main_thread); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_main_thread); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_util, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_util, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_main_thread, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_main_thread, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_event.pyx":22 + /* "hunter/_event.pyx":23 * from .util import get_func_in_mro * from .util import get_main_thread * from .util import if_same_code # <<<<<<<<<<<<<< * * __all__ = 'Event', */ - __Pyx_TraceLine(22,0,__PYX_ERR(0, 22, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __Pyx_TraceLine(23,0,__PYX_ERR(0, 23, __pyx_L1_error)) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_if_same_code); __Pyx_GIVEREF(__pyx_n_s_if_same_code); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_if_same_code); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_util, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_if_same_code, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_if_same_code, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_event.pyx":24 + /* "hunter/_event.pyx":25 * from .util import if_same_code * * __all__ = 'Event', # <<<<<<<<<<<<<< * * cdef object UNSET = object() */ - __Pyx_TraceLine(24,0,__PYX_ERR(0, 24, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__10) < 0) __PYX_ERR(0, 24, __pyx_L1_error) + __Pyx_TraceLine(25,0,__PYX_ERR(0, 25, __pyx_L1_error)) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__14) < 0) __PYX_ERR(0, 25, __pyx_L1_error) - /* "hunter/_event.pyx":26 + /* "hunter/_event.pyx":27 * __all__ = 'Event', * * cdef object UNSET = object() # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(26,0,__PYX_ERR(0, 26, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) + __Pyx_TraceLine(27,0,__PYX_ERR(0, 27, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_6hunter_6_event_UNSET); __Pyx_DECREF_SET(__pyx_v_6hunter_6_event_UNSET, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_event.pyx":100 + /* "hunter/_event.pyx":44 + * Needed for the ``calls`` and ``depth`` fields. + * """ + * def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): # <<<<<<<<<<<<<< + * if tracer is None: + * if UNSET in (depth, calls, threading_support): + */ + __Pyx_TraceLine(44,0,__PYX_ERR(0, 44, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); + __pyx_k_ = __pyx_v_6hunter_6_event_UNSET; + __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); + __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); + __pyx_k__2 = __pyx_v_6hunter_6_event_UNSET; + __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); + __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); + __pyx_k__3 = __pyx_v_6hunter_6_event_UNSET; + __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); + + /* "hunter/_event.pyx":109 * return event * * cdef inline Event clone(self): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * event.arg = self.arg */ - __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error)) + __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) - /* "hunter/_event.pyx":297 + /* "hunter/_event.pyx":314 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_6_event_1yield_lines, NULL, __pyx_n_s_hunter__event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 297, __pyx_L1_error) + __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error)) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_6_event_1yield_lines, NULL, __pyx_n_s_hunter__event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_yield_lines, __pyx_t_1) < 0) __PYX_ERR(0, 297, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yield_lines, __pyx_t_1) < 0) __PYX_ERR(0, 314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":1 @@ -11128,47 +11596,226 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, __Pyx_ErrRestoreInState(tstate, type, value, traceback); return tstate->use_tracing && retval; } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; + Py_XDECREF(type); + Py_XDECREF(value); + Py_XDECREF(traceback); + return -1; + } +} +static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { + PyCodeObject *py_code = 0; +#if PY_MAJOR_VERSION >= 3 + py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno); + if (likely(py_code)) { + py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS; + } +#else + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + py_funcname = PyString_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + py_srcfile = PyString_FromString(srcfile); + if (unlikely(!py_srcfile)) goto bad; + py_code = PyCode_New( + 0, + 0, + 0, + CO_OPTIMIZED | CO_NEWLOCALS, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + firstlineno, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); +#endif + return py_code; +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; } -} -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyCodeObject *py_code = 0; -#if PY_MAJOR_VERSION >= 3 - py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno); - if (likely(py_code)) { - py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS; + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); #else - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - py_funcname = PyString_FromString(funcname); - if (unlikely(!py_funcname)) goto bad; - py_srcfile = PyString_FromString(srcfile); - if (unlikely(!py_srcfile)) goto bad; - py_code = PyCode_New( - 0, - 0, - 0, - CO_OPTIMIZED | CO_NEWLOCALS, - __pyx_empty_bytes, /*PyObject *code,*/ - __pyx_empty_tuple, /*PyObject *consts,*/ - __pyx_empty_tuple, /*PyObject *names,*/ - __pyx_empty_tuple, /*PyObject *varnames,*/ - __pyx_empty_tuple, /*PyObject *freevars,*/ - __pyx_empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - firstlineno, - __pyx_empty_bytes /*PyObject *lnotab*/ - ); -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } #endif - return py_code; + } +bad: + Py_XDECREF(owned_instance); + return; } #endif @@ -11326,26 +11973,6 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #endif #endif -/* PyObjectCall */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = func->ob_type->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { @@ -12775,165 +13402,6 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { return value; } -/* RaiseException */ -#if PY_MAJOR_VERSION < 3 -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, - CYTHON_UNUSED PyObject *cause) { - __Pyx_PyThreadState_declare - Py_XINCREF(type); - if (!value || value == Py_None) - value = NULL; - else - Py_INCREF(value); - if (!tb || tb == Py_None) - tb = NULL; - else { - Py_INCREF(tb); - if (!PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto raise_error; - } - } - if (PyType_Check(type)) { -#if CYTHON_COMPILING_IN_PYPY - if (!value) { - Py_INCREF(Py_None); - value = Py_None; - } -#endif - PyErr_NormalizeException(&type, &value, &tb); - } else { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto raise_error; - } - value = type; - type = (PyObject*) Py_TYPE(type); - Py_INCREF(type); - if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto raise_error; - } - } - __Pyx_PyThreadState_assign - __Pyx_ErrRestore(type, value, tb); - return; -raise_error: - Py_XDECREF(value); - Py_XDECREF(type); - Py_XDECREF(tb); - return; -} -#else -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - PyObject* owned_instance = NULL; - if (tb == Py_None) { - tb = 0; - } else if (tb && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto bad; - } - if (value == Py_None) - value = 0; - if (PyExceptionInstance_Check(type)) { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto bad; - } - value = type; - type = (PyObject*) Py_TYPE(value); - } else if (PyExceptionClass_Check(type)) { - PyObject *instance_class = NULL; - if (value && PyExceptionInstance_Check(value)) { - instance_class = (PyObject*) Py_TYPE(value); - if (instance_class != type) { - int is_subclass = PyObject_IsSubclass(instance_class, type); - if (!is_subclass) { - instance_class = NULL; - } else if (unlikely(is_subclass == -1)) { - goto bad; - } else { - type = instance_class; - } - } - } - if (!instance_class) { - PyObject *args; - if (!value) - args = PyTuple_New(0); - else if (PyTuple_Check(value)) { - Py_INCREF(value); - args = value; - } else - args = PyTuple_Pack(1, value); - if (!args) - goto bad; - owned_instance = PyObject_Call(type, args, NULL); - Py_DECREF(args); - if (!owned_instance) - goto bad; - value = owned_instance; - if (!PyExceptionInstance_Check(value)) { - PyErr_Format(PyExc_TypeError, - "calling %R should have returned an instance of " - "BaseException, not %R", - type, Py_TYPE(value)); - goto bad; - } - } - } else { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto bad; - } - if (cause) { - PyObject *fixed_cause; - if (cause == Py_None) { - fixed_cause = NULL; - } else if (PyExceptionClass_Check(cause)) { - fixed_cause = PyObject_CallObject(cause, NULL); - if (fixed_cause == NULL) - goto bad; - } else if (PyExceptionInstance_Check(cause)) { - fixed_cause = cause; - Py_INCREF(fixed_cause); - } else { - PyErr_SetString(PyExc_TypeError, - "exception causes must derive from " - "BaseException"); - goto bad; - } - PyException_SetCause(value, fixed_cause); - } - PyErr_SetObject(type, value); - if (tb) { -#if CYTHON_COMPILING_IN_PYPY - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); - Py_INCREF(tb); - PyErr_Restore(tmp_type, tmp_value, tb); - Py_XDECREF(tmp_tb); -#else - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } -#endif - } -bad: - Py_XDECREF(owned_instance); - return; -} -#endif - /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { diff --git a/src/hunter/_event.pyx b/src/hunter/_event.pyx index 60fc24f..0b35768 100644 --- a/src/hunter/_event.pyx +++ b/src/hunter/_event.pyx @@ -10,6 +10,7 @@ from tokenize import TokenError from tokenize import generate_tokens from cpython.pythread cimport PyThread_get_thread_ident +from cpython cimport bool from ._tracer cimport Tracer @@ -40,13 +41,21 @@ cdef class Event: tracer (:class:`hunter.tracer.Tracer`): The :class:`~hunter.tracer.Tracer` instance that created the event. Needed for the ``calls`` and ``depth`` fields. """ - def __init__(self, FrameType frame, str kind, object arg, Tracer tracer): + def __init__(self, FrameType frame, str kind, object arg, Tracer tracer=None, object depth=UNSET, object calls=UNSET, object threading_support=UNSET): + if tracer is None: + if UNSET in (depth, calls, threading_support): + raise TypeError("Depth, calls and threading support need to be specified when creating and event") + else: + depth = tracer.depth + calls = tracer.calls + threading_support = tracer.threading_support + self.arg = arg self.frame = frame self.kind = kind - self.depth = tracer.depth - self.calls = tracer.calls - self.threading_support = tracer.threading_support + self.depth = depth + self.calls = calls + self.threading_support = threading_support self.detached = False self._code = UNSET @@ -121,6 +130,14 @@ cdef class Event: event._thread = self._thread return event + def set_frame(self, frame): + self.frame = frame + + def make_fake_event(self): + self._locals = {} + self._globals = {} + self.detached = True + @property def threadid(self): cdef long current diff --git a/src/hunter/_predicates.c b/src/hunter/_predicates.c index 5cacc09..101f123 100644 --- a/src/hunter/_predicates.c +++ b/src/hunter/_predicates.c @@ -595,6 +595,7 @@ static CYTHON_INLINE float __PYX_NAN() { /* Early includes */ #include #include +#include "pythread.h" #include "frameobject.h" #include "pystate.h" #ifdef _OPENMP @@ -809,6 +810,8 @@ static const char *__pyx_f[] = { "src/hunter/_predicates.pxd", "stringsource", ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_tracer.pxd", "src/hunter/_event.pxd", }; @@ -822,6 +825,7 @@ struct __pyx_obj_6hunter_11_predicates_Or; struct __pyx_obj_6hunter_11_predicates_Not; struct __pyx_obj_6hunter_11_predicates_When; struct __pyx_obj_6hunter_11_predicates_From; +struct __pyx_obj_6hunter_11_predicates_Backlog; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct____str__; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_1_genexpr; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_2_genexpr; @@ -982,7 +986,27 @@ struct __pyx_obj_6hunter_11_predicates_From { }; -/* "hunter/_predicates.pyx":137 +/* "hunter/_predicates.pxd":52 + * + * @cython.final + * cdef class Backlog: # <<<<<<<<<<<<<< + * cdef: + * object condition + */ +struct __pyx_obj_6hunter_11_predicates_Backlog { + PyObject_HEAD + PyObject *condition; + int size; + int stack; + PyBoolObject *vars; + PyBoolObject *strip; + PyObject *action; + PyObject *_filter; + PyObject *queue; +}; + + +/* "hunter/_predicates.pyx":140 * self.query_gte = tuple(sorted(query_gte.items())) * * def __str__(self): # <<<<<<<<<<<<<< @@ -995,7 +1019,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct____str__ { }; -/* "hunter/_predicates.pyx":140 +/* "hunter/_predicates.pyx":143 * return 'Query(%s)' % ( * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) # <<<<<<<<<<<<<< @@ -1023,7 +1047,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_2_genexpr { }; -/* "hunter/_predicates.pyx":156 +/* "hunter/_predicates.pyx":159 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -1036,7 +1060,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_3___repr__ { }; -/* "hunter/_predicates.pyx":158 +/* "hunter/_predicates.pyx":161 * def __repr__(self): * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ # <<<<<<<<<<<<<< @@ -1053,7 +1077,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_4_genexpr { }; -/* "hunter/_predicates.pyx":268 +/* "hunter/_predicates.pyx":271 * """ * * def __init__(self, condition, *actions): # <<<<<<<<<<<<<< @@ -1066,7 +1090,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_5___init__ { }; -/* "hunter/_predicates.pyx":273 +/* "hunter/_predicates.pyx":276 * self.condition = condition * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action # <<<<<<<<<<<<<< @@ -1082,7 +1106,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_6_genexpr { }; -/* "hunter/_predicates.pyx":276 +/* "hunter/_predicates.pyx":279 * for action in actions) * * def __str__(self): # <<<<<<<<<<<<<< @@ -1095,7 +1119,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_7___str__ { }; -/* "hunter/_predicates.pyx":279 +/* "hunter/_predicates.pyx":282 * return 'When(%s, %s)' % ( * self.condition, * ', '.join(repr(p) for p in self.actions) # <<<<<<<<<<<<<< @@ -1111,7 +1135,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr { }; -/* "hunter/_predicates.pyx":401 +/* "hunter/_predicates.pyx":543 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1124,7 +1148,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ { }; -/* "hunter/_predicates.pyx":402 +/* "hunter/_predicates.pyx":544 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1140,7 +1164,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr { }; -/* "hunter/_predicates.pyx":454 +/* "hunter/_predicates.pyx":596 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1153,7 +1177,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ { }; -/* "hunter/_predicates.pyx":455 +/* "hunter/_predicates.pyx":597 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1798,18 +1822,14 @@ static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* k #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #endif -/* ListExtend.proto */ -static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject* none = _PyList_Extend((PyListObject*)L, v); - if (unlikely(!none)) - return -1; - Py_DECREF(none); - return 0; -#else - return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); -#endif -} +/* ExtTypeTest.proto */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* ImportFrom.proto */ +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS @@ -1828,11 +1848,24 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif -/* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); +/* PyObjectCallMethod1.proto */ +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); +/* append.proto */ +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); + +/* ListExtend.proto */ +static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject* none = _PyList_Extend((PyListObject*)L, v); + if (unlikely(!none)) + return -1; + Py_DECREF(none); + return 0; +#else + return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); +#endif +} /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); @@ -1945,9 +1978,6 @@ static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject * static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif -/* PyObjectCallMethod1.proto */ -static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); - /* CoroutineBase.proto */ typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); #if CYTHON_USE_EXC_INFO_STACK @@ -2032,21 +2062,89 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cython' */ -/* Module declarations from 'libc.string' */ - -/* Module declarations from 'libc.stdio' */ +/* Module declarations from 'cpython.version' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; -/* Module declarations from 'cpython' */ +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libc.stdio' */ /* Module declarations from 'cpython.object' */ +/* Module declarations from 'cpython.ref' */ + +/* Module declarations from 'cpython.exc' */ + +/* Module declarations from 'cpython.module' */ + +/* Module declarations from 'cpython.mem' */ + +/* Module declarations from 'cpython.tuple' */ + +/* Module declarations from 'cpython.list' */ + +/* Module declarations from 'cpython.sequence' */ + +/* Module declarations from 'cpython.mapping' */ + +/* Module declarations from 'cpython.iterator' */ + +/* Module declarations from 'cpython.number' */ + +/* Module declarations from 'cpython.int' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.bool' */ +static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0; + +/* Module declarations from 'cpython.long' */ + +/* Module declarations from 'cpython.float' */ + +/* Module declarations from '__builtin__' */ + +/* Module declarations from 'cpython.complex' */ +static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0; + +/* Module declarations from 'cpython.string' */ + +/* Module declarations from 'cpython.unicode' */ + +/* Module declarations from 'cpython.dict' */ + +/* Module declarations from 'cpython.instance' */ + +/* Module declarations from 'cpython.function' */ + +/* Module declarations from 'cpython.method' */ + +/* Module declarations from 'cpython.weakref' */ + +/* Module declarations from 'cpython.getargs' */ + +/* Module declarations from 'cpython.pythread' */ + /* Module declarations from 'cpython.pystate' */ +/* Module declarations from 'cpython.cobject' */ + +/* Module declarations from 'cpython.oldbuffer' */ + +/* Module declarations from 'cpython.set' */ + +/* Module declarations from 'cpython.buffer' */ + +/* Module declarations from 'cpython.bytes' */ + +/* Module declarations from 'cpython.pycapsule' */ + +/* Module declarations from 'cpython' */ + /* Module declarations from 'types' */ /* Module declarations from 'hunter._tracer' */ @@ -2064,6 +2162,7 @@ static PyTypeObject *__pyx_ptype_6hunter_11_predicates_Or = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates_Not = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates_When = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates_From = 0; +static PyTypeObject *__pyx_ptype_6hunter_11_predicates_Backlog = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates___pyx_scope_struct____str__ = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_1_genexpr = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_2_genexpr = 0; @@ -2086,9 +2185,11 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_6hunter_11_predicates_Query *, struct __pyx_obj_6hunter_6_event_Event *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_When_call(struct __pyx_obj_6hunter_11_predicates_When *, struct __pyx_obj_6hunter_6_event_Event *); /*proto*/ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject *, struct __pyx_obj_6hunter_6_event_Event *); /*proto*/ +static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(struct __pyx_obj_6hunter_11_predicates_Backlog *, struct __pyx_obj_6hunter_6_event_Event *); /*proto*/ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(struct __pyx_obj_6hunter_11_predicates_Query *, PyObject *); /*proto*/ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(struct __pyx_obj_6hunter_11_predicates_When *, PyObject *); /*proto*/ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(struct __pyx_obj_6hunter_11_predicates_From *, PyObject *); /*proto*/ +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state(struct __pyx_obj_6hunter_11_predicates_Backlog *, PyObject *); /*proto*/ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(struct __pyx_obj_6hunter_11_predicates_And *, PyObject *); /*proto*/ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(struct __pyx_obj_6hunter_11_predicates_Or *, PyObject *); /*proto*/ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(struct __pyx_obj_6hunter_11_predicates_Not *, PyObject *); /*proto*/ @@ -2123,6 +2224,7 @@ static const char __pyx_k_From[] = "From"; static const char __pyx_k_Or_s[] = "Or(%s)"; static const char __pyx_k_When[] = "When"; static const char __pyx_k_args[] = "args"; +static const char __pyx_k_call[] = "call"; static const char __pyx_k_code[] = "code"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_gt_2[] = "_gt"; @@ -2133,36 +2235,52 @@ static const char __pyx_k_lt_2[] = "_lt"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_send[] = "send"; +static const char __pyx_k_size[] = "size"; static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_vars[] = "vars"; static const char __pyx_k_And_s[] = "And(%s)"; static const char __pyx_k_Not_s[] = "Not(%s)"; static const char __pyx_k_Query[] = "Query"; static const char __pyx_k_calls[] = "calls"; static const char __pyx_k_chain[] = "chain"; +static const char __pyx_k_clear[] = "clear"; static const char __pyx_k_close[] = "close"; static const char __pyx_k_depth[] = "depth"; +static const char __pyx_k_deque[] = "deque"; static const char __pyx_k_event[] = "event"; static const char __pyx_k_frame[] = "frame"; static const char __pyx_k_gte_2[] = "_gte"; static const char __pyx_k_items[] = "items"; static const char __pyx_k_lte_2[] = "_lte"; static const char __pyx_k_match[] = "match"; +static const char __pyx_k_merge[] = "_merge"; static const char __pyx_k_regex[] = "regex"; static const char __pyx_k_s_s_r[] = "%s%s=%r"; static const char __pyx_k_split[] = "split"; +static const char __pyx_k_stack[] = "stack"; +static const char __pyx_k_strip[] = "strip"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_Action[] = "Action"; +static const char __pyx_k_action[] = "action"; +static const char __pyx_k_append[] = "append"; +static const char __pyx_k_detach[] = "detach"; +static const char __pyx_k_f_back[] = "f_back"; +static const char __pyx_k_filter[] = "filter"; +static const char __pyx_k_hunter[] = "hunter"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_lineno[] = "lineno"; static const char __pyx_k_locals[] = "locals"; +static const char __pyx_k_maxlen[] = "maxlen"; static const char __pyx_k_module[] = "module"; static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_source[] = "source"; static const char __pyx_k_stdlib[] = "stdlib"; static const char __pyx_k_update[] = "update"; +static const char __pyx_k_Backlog[] = "Backlog"; static const char __pyx_k_Query_s[] = "Query(%s)"; static const char __pyx_k_actions[] = "actions"; +static const char __pyx_k_cleanup[] = "cleanup"; static const char __pyx_k_compile[] = "compile"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_globals[] = "globals"; @@ -2178,14 +2296,17 @@ static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_pyx_type[] = "__pyx_type"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_threadid[] = "threadid"; +static const char __pyx_k_try_repr[] = "try_repr"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_condition[] = "condition"; static const char __pyx_k_itertools[] = "itertools"; static const char __pyx_k_predicate[] = "predicate"; static const char __pyx_k_pyx_state[] = "__pyx_state"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_set_frame[] = "set_frame"; static const char __pyx_k_watermark[] = "watermark"; static const char __pyx_k_ValueError[] = "ValueError"; +static const char __pyx_k_appendleft[] = "appendleft"; static const char __pyx_k_contains_2[] = "_contains"; static const char __pyx_k_endswith_2[] = "_endswith"; static const char __pyx_k_fullsource[] = "fullsource"; @@ -2198,6 +2319,7 @@ static const char __pyx_k_query_lt_r[] = "query_lt=%r"; static const char __pyx_k_startswith[] = "startswith"; static const char __pyx_k_threadname[] = "threadname"; static const char __pyx_k_PickleError[] = "PickleError"; +static const char __pyx_k_collections[] = "collections"; static const char __pyx_k_query_gte_r[] = "query_gte=%r"; static const char __pyx_k_query_lte_r[] = "query_lte=%r"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; @@ -2205,6 +2327,7 @@ static const char __pyx_k_startswith_2[] = "_startswith"; static const char __pyx_k_stringsource[] = "stringsource"; static const char __pyx_k_query_regex_r[] = "query_regex=%r"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_make_fake_event[] = "make_fake_event"; static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError"; static const char __pyx_k_pyx_unpickle_Or[] = "__pyx_unpickle_Or"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; @@ -2212,25 +2335,32 @@ static const char __pyx_k_pyx_unpickle_And[] = "__pyx_unpickle_And"; static const char __pyx_k_pyx_unpickle_Not[] = "__pyx_unpickle_Not"; static const char __pyx_k_query_contains_r[] = "query_contains=%r"; static const char __pyx_k_query_endswith_r[] = "query_endswith=%r"; +static const char __pyx_k_ColorStreamAction[] = "ColorStreamAction"; static const char __pyx_k_pyx_unpickle_From[] = "__pyx_unpickle_From"; static const char __pyx_k_pyx_unpickle_When[] = "__pyx_unpickle_When"; +static const char __pyx_k_threading_support[] = "threading_support"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_hunter__predicates[] = "hunter._predicates"; static const char __pyx_k_pyx_unpickle_Query[] = "__pyx_unpickle_Query"; static const char __pyx_k_query_startswith_r[] = "query_startswith=%r"; static const char __pyx_k_From_s_s_watermark_s[] = "From(%s, %s, watermark=%s)"; +static const char __pyx_k_pyx_unpickle_Backlog[] = "__pyx_unpickle_Backlog"; static const char __pyx_k_str___locals_genexpr[] = "__str__..genexpr"; static const char __pyx_k_init___locals_genexpr[] = "__init__..genexpr"; static const char __pyx_k_repr___locals_genexpr[] = "__repr__..genexpr"; static const char __pyx_k_hunter__predicates_Query_s[] = ""; static const char __pyx_k_Must_give_at_least_one_action[] = "Must give at least one action."; static const char __pyx_k_str___locals_genexpr_locals_ge[] = "__str__..genexpr..genexpr"; +static const char __pyx_k_Backlog_s_size_s_stack_s_vars_s[] = "Backlog(%s, size=%s, stack=%s, vars=%s, action=%s, filter=%s)"; static const char __pyx_k_hunter__predicates_And_predicat[] = ""; static const char __pyx_k_hunter__predicates_From_conditi[] = ""; static const char __pyx_k_hunter__predicates_Not_predicat[] = ""; static const char __pyx_k_hunter__predicates_Or_predicate[] = ""; static const char __pyx_k_hunter__predicates_When_conditi[] = ""; +static const char __pyx_k_hunter_predicates_Backlog_condi[] = ""; +static const char __pyx_k_Action_r_must_be_a_ColorStreamAc[] = "Action %r must be a ColorStreamAction."; static const char __pyx_k_Incompatible_checksums_s_vs_0x1a[] = "Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))"; +static const char __pyx_k_Incompatible_checksums_s_vs_0x3a[] = "Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))"; static const char __pyx_k_Incompatible_checksums_s_vs_0x4e[] = "Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xaa[] = "Incompatible checksums (%s vs 0xaa8cbda = (predicates))"; static const char __pyx_k_Incompatible_checksums_s_vs_0xb5[] = "Incompatible checksums (%s vs 0xb55b71c = (actions, condition))"; @@ -2241,11 +2371,16 @@ static const char __pyx_k_Value_r_for_r_is_invalid_Must_be[] = "Value %r for %r static const char __pyx_k_Unexpected_argument_r_Must_be_on_2[] = "Unexpected argument %r. Must be one of %s."; static PyObject *__pyx_n_s_; static PyObject *__pyx_n_s_Action; +static PyObject *__pyx_kp_s_Action_r_must_be_a_ColorStreamAc; static PyObject *__pyx_n_s_And; static PyObject *__pyx_kp_s_And_s; +static PyObject *__pyx_n_s_Backlog; +static PyObject *__pyx_kp_s_Backlog_s_size_s_stack_s_vars_s; +static PyObject *__pyx_n_s_ColorStreamAction; static PyObject *__pyx_n_s_From; static PyObject *__pyx_kp_s_From_s_s_watermark_s; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x1a; +static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x3a; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x4e; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xaa; static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb5; @@ -2269,26 +2404,37 @@ static PyObject *__pyx_kp_s_When_s_s; static PyObject *__pyx_kp_s__2; static PyObject *__pyx_kp_s__3; static PyObject *__pyx_kp_s__4; +static PyObject *__pyx_n_s_action; static PyObject *__pyx_n_s_actions; static PyObject *__pyx_n_s_all; +static PyObject *__pyx_n_s_append; +static PyObject *__pyx_n_s_appendleft; static PyObject *__pyx_n_s_arg; static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_call; static PyObject *__pyx_n_s_calls; static PyObject *__pyx_n_s_chain; +static PyObject *__pyx_n_s_cleanup; +static PyObject *__pyx_n_s_clear; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_code; +static PyObject *__pyx_n_s_collections; static PyObject *__pyx_n_s_compile; static PyObject *__pyx_n_s_condition; static PyObject *__pyx_n_s_contains; static PyObject *__pyx_n_s_contains_2; static PyObject *__pyx_n_s_depth; +static PyObject *__pyx_n_s_deque; +static PyObject *__pyx_n_s_detach; static PyObject *__pyx_n_s_dict; static PyObject *__pyx_n_s_endswith; static PyObject *__pyx_n_s_endswith_2; static PyObject *__pyx_n_s_event; static PyObject *__pyx_n_s_ew; +static PyObject *__pyx_n_s_f_back; static PyObject *__pyx_n_s_filename; +static PyObject *__pyx_n_s_filter; static PyObject *__pyx_n_s_frame; static PyObject *__pyx_n_s_fullsource; static PyObject *__pyx_n_s_function; @@ -2300,6 +2446,7 @@ static PyObject *__pyx_n_s_gt_2; static PyObject *__pyx_n_s_gte; static PyObject *__pyx_n_s_gte_2; static PyObject *__pyx_n_s_has; +static PyObject *__pyx_n_s_hunter; static PyObject *__pyx_n_s_hunter__predicates; static PyObject *__pyx_kp_s_hunter__predicates_And_predicat; static PyObject *__pyx_kp_s_hunter__predicates_From_conditi; @@ -2307,6 +2454,7 @@ static PyObject *__pyx_kp_s_hunter__predicates_Not_predicat; static PyObject *__pyx_kp_s_hunter__predicates_Or_predicate; static PyObject *__pyx_kp_s_hunter__predicates_Query_s; static PyObject *__pyx_kp_s_hunter__predicates_When_conditi; +static PyObject *__pyx_kp_s_hunter_predicates_Backlog_condi; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_in; static PyObject *__pyx_n_s_in_2; @@ -2324,7 +2472,10 @@ static PyObject *__pyx_n_s_lt_2; static PyObject *__pyx_n_s_lte; static PyObject *__pyx_n_s_lte_2; static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_make_fake_event; static PyObject *__pyx_n_s_match; +static PyObject *__pyx_n_s_maxlen; +static PyObject *__pyx_n_s_merge; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_new; @@ -2336,6 +2487,7 @@ static PyObject *__pyx_n_s_pyx_result; static PyObject *__pyx_n_s_pyx_state; static PyObject *__pyx_n_s_pyx_type; static PyObject *__pyx_n_s_pyx_unpickle_And; +static PyObject *__pyx_n_s_pyx_unpickle_Backlog; static PyObject *__pyx_n_s_pyx_unpickle_From; static PyObject *__pyx_n_s_pyx_unpickle_Not; static PyObject *__pyx_n_s_pyx_unpickle_Or; @@ -2362,22 +2514,29 @@ static PyObject *__pyx_n_s_repr___locals_genexpr; static PyObject *__pyx_n_s_rx; static PyObject *__pyx_kp_s_s_s_r; static PyObject *__pyx_n_s_send; +static PyObject *__pyx_n_s_set_frame; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_setstate_cython; +static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_source; static PyObject *__pyx_n_s_split; +static PyObject *__pyx_n_s_stack; static PyObject *__pyx_n_s_startswith; static PyObject *__pyx_n_s_startswith_2; static PyObject *__pyx_n_s_stdlib; static PyObject *__pyx_n_s_str___locals_genexpr; static PyObject *__pyx_n_s_str___locals_genexpr_locals_ge; static PyObject *__pyx_kp_s_stringsource; +static PyObject *__pyx_n_s_strip; static PyObject *__pyx_n_s_sw; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_threadid; +static PyObject *__pyx_n_s_threading_support; static PyObject *__pyx_n_s_threadname; static PyObject *__pyx_n_s_throw; +static PyObject *__pyx_n_s_try_repr; static PyObject *__pyx_n_s_update; +static PyObject *__pyx_n_s_vars; static PyObject *__pyx_n_s_watermark; static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunter_11_predicates_Query *__pyx_v_self, PyObject *__pyx_v_query); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___7genexpr_genexpr(PyObject *__pyx_self); /* proto */ @@ -2434,6 +2593,20 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12origin_depth___get__(str static PyObject *__pyx_pf_6hunter_11_predicates_4From_12origin_calls___get__(struct __pyx_obj_6hunter_11_predicates_From *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_4From_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_From *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_4From_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_From *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_condition, PyObject *__pyx_v_size, PyObject *__pyx_v_stack, PyObject *__pyx_v_vars, PyObject *__pyx_v_strip, PyObject *__pyx_v_action, PyObject *__pyx_v_filter); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_2__call__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_event); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_20__rand__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_22filter(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_26__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v_predicates); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self); /* proto */ @@ -2475,15 +2648,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_And(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_Or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_6hunter_11_predicates_Query(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates_And(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates_Or(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates_Not(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates_When(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates_From(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_6hunter_11_predicates_Backlog(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct____str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -2499,13 +2674,16 @@ static PyObject *__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_11___str_ static PyObject *__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0}; static PyObject *__pyx_int_0; +static PyObject *__pyx_int_10; +static PyObject *__pyx_int_100; static PyObject *__pyx_int_28104183; +static PyObject *__pyx_int_61357180; static PyObject *__pyx_int_82616482; static PyObject *__pyx_int_178834394; static PyObject *__pyx_int_190166812; static PyObject *__pyx_int_258412278; +static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple__5; -static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; @@ -2514,15 +2692,18 @@ static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__22; static PyObject *__pyx_codeobj__6; static PyObject *__pyx_codeobj__7; static PyObject *__pyx_codeobj__8; static PyObject *__pyx_codeobj__9; static PyObject *__pyx_codeobj__10; static PyObject *__pyx_codeobj__11; +static PyObject *__pyx_codeobj__12; /* Late includes */ -/* "hunter/_predicates.pyx":44 +/* "hunter/_predicates.pyx":47 * See :class:`hunter.event.Event` for fields that can be filtered on. * """ * def __init__(self, **query): # <<<<<<<<<<<<<< @@ -2592,148 +2773,148 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt int __pyx_t_14; int __pyx_t_15; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 44, 0, __PYX_ERR(0, 44, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 47, 0, __PYX_ERR(0, 47, __pyx_L1_error)); - /* "hunter/_predicates.pyx":68 + /* "hunter/_predicates.pyx":71 * ``threadname``. * """ * query_eq = {} # <<<<<<<<<<<<<< * query_startswith = {} * query_endswith = {} */ - __Pyx_TraceLine(68,0,__PYX_ERR(0, 68, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_eq = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":69 + /* "hunter/_predicates.pyx":72 * """ * query_eq = {} * query_startswith = {} # <<<<<<<<<<<<<< * query_endswith = {} * query_in = {} */ - __Pyx_TraceLine(69,0,__PYX_ERR(0, 69, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) + __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_startswith = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":70 + /* "hunter/_predicates.pyx":73 * query_eq = {} * query_startswith = {} * query_endswith = {} # <<<<<<<<<<<<<< * query_in = {} * query_contains = {} */ - __Pyx_TraceLine(70,0,__PYX_ERR(0, 70, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) + __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_endswith = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":71 + /* "hunter/_predicates.pyx":74 * query_startswith = {} * query_endswith = {} * query_in = {} # <<<<<<<<<<<<<< * query_contains = {} * query_regex = {} */ - __Pyx_TraceLine(71,0,__PYX_ERR(0, 71, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error) + __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_in = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":72 + /* "hunter/_predicates.pyx":75 * query_endswith = {} * query_in = {} * query_contains = {} # <<<<<<<<<<<<<< * query_regex = {} * query_lt = {} */ - __Pyx_TraceLine(72,0,__PYX_ERR(0, 72, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error) + __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_contains = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":73 + /* "hunter/_predicates.pyx":76 * query_in = {} * query_contains = {} * query_regex = {} # <<<<<<<<<<<<<< * query_lt = {} * query_lte = {} */ - __Pyx_TraceLine(73,0,__PYX_ERR(0, 73, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error) + __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_regex = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":74 + /* "hunter/_predicates.pyx":77 * query_contains = {} * query_regex = {} * query_lt = {} # <<<<<<<<<<<<<< * query_lte = {} * query_gt = {} */ - __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error) + __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_lt = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":75 + /* "hunter/_predicates.pyx":78 * query_regex = {} * query_lt = {} * query_lte = {} # <<<<<<<<<<<<<< * query_gt = {} * query_gte = {} */ - __Pyx_TraceLine(75,0,__PYX_ERR(0, 75, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 75, __pyx_L1_error) + __Pyx_TraceLine(78,0,__PYX_ERR(0, 78, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_lte = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":76 + /* "hunter/_predicates.pyx":79 * query_lt = {} * query_lte = {} * query_gt = {} # <<<<<<<<<<<<<< * query_gte = {} * */ - __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_gt = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":77 + /* "hunter/_predicates.pyx":80 * query_lte = {} * query_gt = {} * query_gte = {} # <<<<<<<<<<<<<< * * for key, value in query.items(): */ - __Pyx_TraceLine(77,0,__PYX_ERR(0, 77, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error) + __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_gte = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":79 + /* "hunter/_predicates.pyx":82 * query_gte = {} * * for key, value in query.items(): # <<<<<<<<<<<<<< * parts = [p for p in key.split('_') if p] * count = len(parts) */ - __Pyx_TraceLine(79,0,__PYX_ERR(0, 79, __pyx_L1_error)) + __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error)) __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_query, 1, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_query, 1, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; @@ -2741,7 +2922,7 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt 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, 79, __pyx_L1_error) + if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -2749,18 +2930,18 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "hunter/_predicates.pyx":80 + /* "hunter/_predicates.pyx":83 * * for key, value in query.items(): * parts = [p for p in key.split('_') if p] # <<<<<<<<<<<<<< * count = len(parts) * if count > 2: */ - __Pyx_TraceLine(80,0,__PYX_ERR(0, 80, __pyx_L1_error)) + __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error)) { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_key, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -2774,16 +2955,16 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt } __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_n_s_) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_n_s_); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L7_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L7_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -2791,17 +2972,17 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt if (likely(PyList_CheckExact(__pyx_t_8))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 83, __pyx_L7_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 83, __pyx_L7_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -2811,7 +2992,7 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 80, __pyx_L7_error) + else __PYX_ERR(0, 83, __pyx_L7_error) } break; } @@ -2819,9 +3000,9 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_p, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_7genexpr__pyx_v_p); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 80, __pyx_L7_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_7genexpr__pyx_v_p); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 83, __pyx_L7_error) if (__pyx_t_12) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_7genexpr__pyx_v_p))) __PYX_ERR(0, 80, __pyx_L7_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_7genexpr__pyx_v_p))) __PYX_ERR(0, 83, __pyx_L7_error) } } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -2835,37 +3016,37 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_XDECREF_SET(__pyx_v_parts, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "hunter/_predicates.pyx":81 + /* "hunter/_predicates.pyx":84 * for key, value in query.items(): * parts = [p for p in key.split('_') if p] * count = len(parts) # <<<<<<<<<<<<<< * if count > 2: * raise TypeError('Unexpected argument %r. Must be one of %s with optional operators like: %s' % ( */ - __Pyx_TraceLine(81,0,__PYX_ERR(0, 81, __pyx_L1_error)) - __pyx_t_10 = PyList_GET_SIZE(__pyx_v_parts); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 81, __pyx_L1_error) + __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error)) + __pyx_t_10 = PyList_GET_SIZE(__pyx_v_parts); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 84, __pyx_L1_error) __pyx_v_count = __pyx_t_10; - /* "hunter/_predicates.pyx":82 + /* "hunter/_predicates.pyx":85 * parts = [p for p in key.split('_') if p] * count = len(parts) * if count > 2: # <<<<<<<<<<<<<< * raise TypeError('Unexpected argument %r. Must be one of %s with optional operators like: %s' % ( * key, ALLOWED_KEYS, ALLOWED_OPERATORS */ - __Pyx_TraceLine(82,0,__PYX_ERR(0, 82, __pyx_L1_error)) + __Pyx_TraceLine(85,0,__PYX_ERR(0, 85, __pyx_L1_error)) __pyx_t_12 = ((__pyx_v_count > 2) != 0); if (unlikely(__pyx_t_12)) { - /* "hunter/_predicates.pyx":84 + /* "hunter/_predicates.pyx":87 * if count > 2: * raise TypeError('Unexpected argument %r. Must be one of %s with optional operators like: %s' % ( * key, ALLOWED_KEYS, ALLOWED_OPERATORS # <<<<<<<<<<<<<< * )) * elif count == 2: */ - __Pyx_TraceLine(84,0,__PYX_ERR(0, 84, __pyx_L1_error)) - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error)) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); @@ -2877,25 +3058,25 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_GIVEREF(__pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS); - /* "hunter/_predicates.pyx":83 + /* "hunter/_predicates.pyx":86 * count = len(parts) * if count > 2: * raise TypeError('Unexpected argument %r. Must be one of %s with optional operators like: %s' % ( # <<<<<<<<<<<<<< * key, ALLOWED_KEYS, ALLOWED_OPERATORS * )) */ - __Pyx_TraceLine(83,0,__PYX_ERR(0, 83, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_argument_r_Must_be_on, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_argument_r_Must_be_on, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 83, __pyx_L1_error) + __PYX_ERR(0, 86, __pyx_L1_error) - /* "hunter/_predicates.pyx":82 + /* "hunter/_predicates.pyx":85 * parts = [p for p in key.split('_') if p] * count = len(parts) * if count > 2: # <<<<<<<<<<<<<< @@ -2904,32 +3085,32 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt */ } - /* "hunter/_predicates.pyx":86 + /* "hunter/_predicates.pyx":89 * key, ALLOWED_KEYS, ALLOWED_OPERATORS * )) * elif count == 2: # <<<<<<<<<<<<<< * prefix, operator = parts * if operator in ('startswith', 'sw'): */ - __Pyx_TraceLine(86,0,__PYX_ERR(0, 86, __pyx_L1_error)) + __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error)) __pyx_t_12 = ((__pyx_v_count == 2) != 0); if (__pyx_t_12) { - /* "hunter/_predicates.pyx":87 + /* "hunter/_predicates.pyx":90 * )) * elif count == 2: * prefix, operator = parts # <<<<<<<<<<<<<< * if operator in ('startswith', 'sw'): * if not isinstance(value, basestring): */ - __Pyx_TraceLine(87,0,__PYX_ERR(0, 87, __pyx_L1_error)) + __Pyx_TraceLine(90,0,__PYX_ERR(0, 90, __pyx_L1_error)) if (1) { PyObject* sequence = __pyx_v_parts; 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, 87, __pyx_L1_error) + __PYX_ERR(0, 90, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(sequence, 0); @@ -2937,9 +3118,9 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 87, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -2948,49 +3129,49 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_XDECREF_SET(__pyx_v_operator, __pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":88 + /* "hunter/_predicates.pyx":91 * elif count == 2: * prefix, operator = parts * if operator in ('startswith', 'sw'): # <<<<<<<<<<<<<< * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): */ - __Pyx_TraceLine(88,0,__PYX_ERR(0, 88, __pyx_L1_error)) + __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_operator); __pyx_t_8 = __pyx_v_operator; - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_startswith, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_startswith, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 91, __pyx_L1_error) if (!__pyx_t_13) { } else { __pyx_t_12 = __pyx_t_13; goto __pyx_L14_bool_binop_done; } - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_sw, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_sw, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 91, __pyx_L1_error) __pyx_t_12 = __pyx_t_13; __pyx_L14_bool_binop_done:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = (__pyx_t_12 != 0); if (__pyx_t_13) { - /* "hunter/_predicates.pyx":89 + /* "hunter/_predicates.pyx":92 * prefix, operator = parts * if operator in ('startswith', 'sw'): * if not isinstance(value, basestring): # <<<<<<<<<<<<<< * if not isinstance(value, (list, set, tuple)): * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) */ - __Pyx_TraceLine(89,0,__PYX_ERR(0, 89, __pyx_L1_error)) + __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error)) __pyx_t_13 = __Pyx_PyBaseString_Check(__pyx_v_value); __pyx_t_12 = ((!(__pyx_t_13 != 0)) != 0); if (__pyx_t_12) { - /* "hunter/_predicates.pyx":90 + /* "hunter/_predicates.pyx":93 * if operator in ('startswith', 'sw'): * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): # <<<<<<<<<<<<<< * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) * value = tuple(value) */ - __Pyx_TraceLine(90,0,__PYX_ERR(0, 90, __pyx_L1_error)) + __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error)) __pyx_t_13 = PyList_Check(__pyx_v_value); __pyx_t_14 = (__pyx_t_13 != 0); if (!__pyx_t_14) { @@ -3012,15 +3193,15 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_t_14 = ((!(__pyx_t_12 != 0)) != 0); if (unlikely(__pyx_t_14)) { - /* "hunter/_predicates.pyx":91 + /* "hunter/_predicates.pyx":94 * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) # <<<<<<<<<<<<<< * value = tuple(value) * mapping = query_startswith */ - __Pyx_TraceLine(91,0,__PYX_ERR(0, 91, __pyx_L1_error)) - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error)) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); @@ -3028,17 +3209,17 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_key); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Value_r_for_r_is_invalid_Must_be, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Value_r_for_r_is_invalid_Must_be, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 91, __pyx_L1_error) + __PYX_ERR(0, 94, __pyx_L1_error) - /* "hunter/_predicates.pyx":90 + /* "hunter/_predicates.pyx":93 * if operator in ('startswith', 'sw'): * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): # <<<<<<<<<<<<<< @@ -3047,20 +3228,20 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt */ } - /* "hunter/_predicates.pyx":92 + /* "hunter/_predicates.pyx":95 * if not isinstance(value, (list, set, tuple)): * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) * value = tuple(value) # <<<<<<<<<<<<<< * mapping = query_startswith * elif operator in ('endswith', 'ew'): */ - __Pyx_TraceLine(92,0,__PYX_ERR(0, 92, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 92, __pyx_L1_error) + __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":89 + /* "hunter/_predicates.pyx":92 * prefix, operator = parts * if operator in ('startswith', 'sw'): * if not isinstance(value, basestring): # <<<<<<<<<<<<<< @@ -3069,18 +3250,18 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt */ } - /* "hunter/_predicates.pyx":93 + /* "hunter/_predicates.pyx":96 * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) * value = tuple(value) * mapping = query_startswith # <<<<<<<<<<<<<< * elif operator in ('endswith', 'ew'): * if not isinstance(value, basestring): */ - __Pyx_TraceLine(93,0,__PYX_ERR(0, 93, __pyx_L1_error)) + __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_startswith); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_startswith); - /* "hunter/_predicates.pyx":88 + /* "hunter/_predicates.pyx":91 * elif count == 2: * prefix, operator = parts * if operator in ('startswith', 'sw'): # <<<<<<<<<<<<<< @@ -3090,49 +3271,49 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":94 + /* "hunter/_predicates.pyx":97 * value = tuple(value) * mapping = query_startswith * elif operator in ('endswith', 'ew'): # <<<<<<<<<<<<<< * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): */ - __Pyx_TraceLine(94,0,__PYX_ERR(0, 94, __pyx_L1_error)) + __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_operator); __pyx_t_8 = __pyx_v_operator; - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_endswith, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_endswith, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 97, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_14 = __pyx_t_12; goto __pyx_L21_bool_binop_done; } - __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_ew, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_ew, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 97, __pyx_L1_error) __pyx_t_14 = __pyx_t_12; __pyx_L21_bool_binop_done:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = (__pyx_t_14 != 0); if (__pyx_t_12) { - /* "hunter/_predicates.pyx":95 + /* "hunter/_predicates.pyx":98 * mapping = query_startswith * elif operator in ('endswith', 'ew'): * if not isinstance(value, basestring): # <<<<<<<<<<<<<< * if not isinstance(value, (list, set, tuple)): * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) */ - __Pyx_TraceLine(95,0,__PYX_ERR(0, 95, __pyx_L1_error)) + __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error)) __pyx_t_12 = __Pyx_PyBaseString_Check(__pyx_v_value); __pyx_t_14 = ((!(__pyx_t_12 != 0)) != 0); if (__pyx_t_14) { - /* "hunter/_predicates.pyx":96 + /* "hunter/_predicates.pyx":99 * elif operator in ('endswith', 'ew'): * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): # <<<<<<<<<<<<<< * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) * value = tuple(value) */ - __Pyx_TraceLine(96,0,__PYX_ERR(0, 96, __pyx_L1_error)) + __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error)) __pyx_t_12 = PyList_Check(__pyx_v_value); __pyx_t_13 = (__pyx_t_12 != 0); if (!__pyx_t_13) { @@ -3154,15 +3335,15 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_t_13 = ((!(__pyx_t_14 != 0)) != 0); if (unlikely(__pyx_t_13)) { - /* "hunter/_predicates.pyx":97 + /* "hunter/_predicates.pyx":100 * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) # <<<<<<<<<<<<<< * value = tuple(value) * mapping = query_endswith */ - __Pyx_TraceLine(97,0,__PYX_ERR(0, 97, __pyx_L1_error)) - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 97, __pyx_L1_error) + __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error)) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); @@ -3170,17 +3351,17 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_key); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Value_r_for_r_is_invalid_Must_be, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Value_r_for_r_is_invalid_Must_be, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 97, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 97, __pyx_L1_error) + __PYX_ERR(0, 100, __pyx_L1_error) - /* "hunter/_predicates.pyx":96 + /* "hunter/_predicates.pyx":99 * elif operator in ('endswith', 'ew'): * if not isinstance(value, basestring): * if not isinstance(value, (list, set, tuple)): # <<<<<<<<<<<<<< @@ -3189,20 +3370,20 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt */ } - /* "hunter/_predicates.pyx":98 + /* "hunter/_predicates.pyx":101 * if not isinstance(value, (list, set, tuple)): * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) * value = tuple(value) # <<<<<<<<<<<<<< * mapping = query_endswith * elif operator == 'in': */ - __Pyx_TraceLine(98,0,__PYX_ERR(0, 98, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 98, __pyx_L1_error) + __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":95 + /* "hunter/_predicates.pyx":98 * mapping = query_startswith * elif operator in ('endswith', 'ew'): * if not isinstance(value, basestring): # <<<<<<<<<<<<<< @@ -3211,18 +3392,18 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt */ } - /* "hunter/_predicates.pyx":99 + /* "hunter/_predicates.pyx":102 * raise ValueError('Value %r for %r is invalid. Must be a string, list, tuple or set.' % (value, key)) * value = tuple(value) * mapping = query_endswith # <<<<<<<<<<<<<< * elif operator == 'in': * mapping = query_in */ - __Pyx_TraceLine(99,0,__PYX_ERR(0, 99, __pyx_L1_error)) + __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_endswith); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_endswith); - /* "hunter/_predicates.pyx":94 + /* "hunter/_predicates.pyx":97 * value = tuple(value) * mapping = query_startswith * elif operator in ('endswith', 'ew'): # <<<<<<<<<<<<<< @@ -3232,29 +3413,29 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":100 + /* "hunter/_predicates.pyx":103 * value = tuple(value) * mapping = query_endswith * elif operator == 'in': # <<<<<<<<<<<<<< * mapping = query_in * elif operator in ('contains', 'has'): */ - __Pyx_TraceLine(100,0,__PYX_ERR(0, 100, __pyx_L1_error)) - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_in, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 100, __pyx_L1_error) + __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error)) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_in, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 103, __pyx_L1_error) if (__pyx_t_13) { - /* "hunter/_predicates.pyx":101 + /* "hunter/_predicates.pyx":104 * mapping = query_endswith * elif operator == 'in': * mapping = query_in # <<<<<<<<<<<<<< * elif operator in ('contains', 'has'): * mapping = query_contains */ - __Pyx_TraceLine(101,0,__PYX_ERR(0, 101, __pyx_L1_error)) + __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_in); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_in); - /* "hunter/_predicates.pyx":100 + /* "hunter/_predicates.pyx":103 * value = tuple(value) * mapping = query_endswith * elif operator == 'in': # <<<<<<<<<<<<<< @@ -3264,41 +3445,41 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":102 + /* "hunter/_predicates.pyx":105 * elif operator == 'in': * mapping = query_in * elif operator in ('contains', 'has'): # <<<<<<<<<<<<<< * mapping = query_contains * elif operator in ('regex', 'rx'): */ - __Pyx_TraceLine(102,0,__PYX_ERR(0, 102, __pyx_L1_error)) + __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_operator); __pyx_t_8 = __pyx_v_operator; - __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_contains, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_contains, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 105, __pyx_L1_error) if (!__pyx_t_14) { } else { __pyx_t_13 = __pyx_t_14; goto __pyx_L28_bool_binop_done; } - __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_has, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_14 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_has, Py_EQ)); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 105, __pyx_L1_error) __pyx_t_13 = __pyx_t_14; __pyx_L28_bool_binop_done:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = (__pyx_t_13 != 0); if (__pyx_t_14) { - /* "hunter/_predicates.pyx":103 + /* "hunter/_predicates.pyx":106 * mapping = query_in * elif operator in ('contains', 'has'): * mapping = query_contains # <<<<<<<<<<<<<< * elif operator in ('regex', 'rx'): * value = re.compile(value) */ - __Pyx_TraceLine(103,0,__PYX_ERR(0, 103, __pyx_L1_error)) + __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_contains); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_contains); - /* "hunter/_predicates.pyx":102 + /* "hunter/_predicates.pyx":105 * elif operator == 'in': * mapping = query_in * elif operator in ('contains', 'has'): # <<<<<<<<<<<<<< @@ -3308,40 +3489,40 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":104 + /* "hunter/_predicates.pyx":107 * elif operator in ('contains', 'has'): * mapping = query_contains * elif operator in ('regex', 'rx'): # <<<<<<<<<<<<<< * value = re.compile(value) * mapping = query_regex */ - __Pyx_TraceLine(104,0,__PYX_ERR(0, 104, __pyx_L1_error)) + __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_operator); __pyx_t_8 = __pyx_v_operator; - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_regex, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_regex, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 107, __pyx_L1_error) if (!__pyx_t_13) { } else { __pyx_t_14 = __pyx_t_13; goto __pyx_L30_bool_binop_done; } - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_rx, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_rx, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 107, __pyx_L1_error) __pyx_t_14 = __pyx_t_13; __pyx_L30_bool_binop_done:; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_13 = (__pyx_t_14 != 0); if (__pyx_t_13) { - /* "hunter/_predicates.pyx":105 + /* "hunter/_predicates.pyx":108 * mapping = query_contains * elif operator in ('regex', 'rx'): * value = re.compile(value) # <<<<<<<<<<<<<< * mapping = query_regex * elif operator == 'lt': */ - __Pyx_TraceLine(105,0,__PYX_ERR(0, 105, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 105, __pyx_L1_error) + __Pyx_TraceLine(108,0,__PYX_ERR(0, 108, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_re); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -3356,24 +3537,24 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt } __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 105, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":106 + /* "hunter/_predicates.pyx":109 * elif operator in ('regex', 'rx'): * value = re.compile(value) * mapping = query_regex # <<<<<<<<<<<<<< * elif operator == 'lt': * mapping = query_lt */ - __Pyx_TraceLine(106,0,__PYX_ERR(0, 106, __pyx_L1_error)) + __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_regex); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_regex); - /* "hunter/_predicates.pyx":104 + /* "hunter/_predicates.pyx":107 * elif operator in ('contains', 'has'): * mapping = query_contains * elif operator in ('regex', 'rx'): # <<<<<<<<<<<<<< @@ -3383,29 +3564,29 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":107 + /* "hunter/_predicates.pyx":110 * value = re.compile(value) * mapping = query_regex * elif operator == 'lt': # <<<<<<<<<<<<<< * mapping = query_lt * elif operator == 'lte': */ - __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_lt, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 107, __pyx_L1_error) + __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error)) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_lt, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 110, __pyx_L1_error) if (__pyx_t_13) { - /* "hunter/_predicates.pyx":108 + /* "hunter/_predicates.pyx":111 * mapping = query_regex * elif operator == 'lt': * mapping = query_lt # <<<<<<<<<<<<<< * elif operator == 'lte': * mapping = query_lte */ - __Pyx_TraceLine(108,0,__PYX_ERR(0, 108, __pyx_L1_error)) + __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_lt); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_lt); - /* "hunter/_predicates.pyx":107 + /* "hunter/_predicates.pyx":110 * value = re.compile(value) * mapping = query_regex * elif operator == 'lt': # <<<<<<<<<<<<<< @@ -3415,29 +3596,29 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":109 + /* "hunter/_predicates.pyx":112 * elif operator == 'lt': * mapping = query_lt * elif operator == 'lte': # <<<<<<<<<<<<<< * mapping = query_lte * elif operator == 'gt': */ - __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_lte, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error)) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_lte, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 112, __pyx_L1_error) if (__pyx_t_13) { - /* "hunter/_predicates.pyx":110 + /* "hunter/_predicates.pyx":113 * mapping = query_lt * elif operator == 'lte': * mapping = query_lte # <<<<<<<<<<<<<< * elif operator == 'gt': * mapping = query_gt */ - __Pyx_TraceLine(110,0,__PYX_ERR(0, 110, __pyx_L1_error)) + __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_lte); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_lte); - /* "hunter/_predicates.pyx":109 + /* "hunter/_predicates.pyx":112 * elif operator == 'lt': * mapping = query_lt * elif operator == 'lte': # <<<<<<<<<<<<<< @@ -3447,29 +3628,29 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":111 + /* "hunter/_predicates.pyx":114 * elif operator == 'lte': * mapping = query_lte * elif operator == 'gt': # <<<<<<<<<<<<<< * mapping = query_gt * elif operator == 'gte': */ - __Pyx_TraceLine(111,0,__PYX_ERR(0, 111, __pyx_L1_error)) - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_gt, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error)) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_gt, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 114, __pyx_L1_error) if (__pyx_t_13) { - /* "hunter/_predicates.pyx":112 + /* "hunter/_predicates.pyx":115 * mapping = query_lte * elif operator == 'gt': * mapping = query_gt # <<<<<<<<<<<<<< * elif operator == 'gte': * mapping = query_gte */ - __Pyx_TraceLine(112,0,__PYX_ERR(0, 112, __pyx_L1_error)) + __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_gt); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_gt); - /* "hunter/_predicates.pyx":111 + /* "hunter/_predicates.pyx":114 * elif operator == 'lte': * mapping = query_lte * elif operator == 'gt': # <<<<<<<<<<<<<< @@ -3479,29 +3660,29 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":113 + /* "hunter/_predicates.pyx":116 * elif operator == 'gt': * mapping = query_gt * elif operator == 'gte': # <<<<<<<<<<<<<< * mapping = query_gte * else: */ - __Pyx_TraceLine(113,0,__PYX_ERR(0, 113, __pyx_L1_error)) - __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_gte, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 113, __pyx_L1_error) + __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) + __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_v_operator, __pyx_n_s_gte, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 116, __pyx_L1_error) if (likely(__pyx_t_13)) { - /* "hunter/_predicates.pyx":114 + /* "hunter/_predicates.pyx":117 * mapping = query_gt * elif operator == 'gte': * mapping = query_gte # <<<<<<<<<<<<<< * else: * raise TypeError('Unexpected operator %r. Must be one of %s.' % (operator, ALLOWED_OPERATORS)) */ - __Pyx_TraceLine(114,0,__PYX_ERR(0, 114, __pyx_L1_error)) + __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_query_gte); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_gte); - /* "hunter/_predicates.pyx":113 + /* "hunter/_predicates.pyx":116 * elif operator == 'gt': * mapping = query_gt * elif operator == 'gte': # <<<<<<<<<<<<<< @@ -3511,16 +3692,16 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L13; } - /* "hunter/_predicates.pyx":116 + /* "hunter/_predicates.pyx":119 * mapping = query_gte * else: * raise TypeError('Unexpected operator %r. Must be one of %s.' % (operator, ALLOWED_OPERATORS)) # <<<<<<<<<<<<<< * else: * mapping = query_eq */ - __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) + __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) /*else*/ { - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_operator); __Pyx_GIVEREF(__pyx_v_operator); @@ -3528,19 +3709,19 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_INCREF(__pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS); __Pyx_GIVEREF(__pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_operator_r_Must_be_on, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_operator_r_Must_be_on, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 116, __pyx_L1_error) + __PYX_ERR(0, 119, __pyx_L1_error) } __pyx_L13:; - /* "hunter/_predicates.pyx":86 + /* "hunter/_predicates.pyx":89 * key, ALLOWED_KEYS, ALLOWED_OPERATORS * )) * elif count == 2: # <<<<<<<<<<<<<< @@ -3550,52 +3731,52 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt goto __pyx_L12; } - /* "hunter/_predicates.pyx":118 + /* "hunter/_predicates.pyx":121 * raise TypeError('Unexpected operator %r. Must be one of %s.' % (operator, ALLOWED_OPERATORS)) * else: * mapping = query_eq # <<<<<<<<<<<<<< * prefix = key * */ - __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error)) + __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(__pyx_v_query_eq); __Pyx_XDECREF_SET(__pyx_v_mapping, __pyx_v_query_eq); - /* "hunter/_predicates.pyx":119 + /* "hunter/_predicates.pyx":122 * else: * mapping = query_eq * prefix = key # <<<<<<<<<<<<<< * * if prefix not in ALLOWED_KEYS: */ - __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) + __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_key); __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_v_key); } __pyx_L12:; - /* "hunter/_predicates.pyx":121 + /* "hunter/_predicates.pyx":124 * prefix = key * * if prefix not in ALLOWED_KEYS: # <<<<<<<<<<<<<< * raise TypeError('Unexpected argument %r. Must be one of %s.' % (key, ALLOWED_KEYS)) * */ - __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) - __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_prefix, __pyx_v_6hunter_11_predicates_ALLOWED_KEYS, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 121, __pyx_L1_error) + __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error)) + __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_prefix, __pyx_v_6hunter_11_predicates_ALLOWED_KEYS, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 124, __pyx_L1_error) __pyx_t_14 = (__pyx_t_13 != 0); if (unlikely(__pyx_t_14)) { - /* "hunter/_predicates.pyx":122 + /* "hunter/_predicates.pyx":125 * * if prefix not in ALLOWED_KEYS: * raise TypeError('Unexpected argument %r. Must be one of %s.' % (key, ALLOWED_KEYS)) # <<<<<<<<<<<<<< * * mapping[prefix] = value */ - __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 122, __pyx_L1_error) + __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); @@ -3603,17 +3784,17 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __Pyx_INCREF(__pyx_v_6hunter_11_predicates_ALLOWED_KEYS); __Pyx_GIVEREF(__pyx_v_6hunter_11_predicates_ALLOWED_KEYS); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_6hunter_11_predicates_ALLOWED_KEYS); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_argument_r_Must_be_on_2, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_argument_r_Must_be_on_2, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 122, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 122, __pyx_L1_error) + __PYX_ERR(0, 125, __pyx_L1_error) - /* "hunter/_predicates.pyx":121 + /* "hunter/_predicates.pyx":124 * prefix = key * * if prefix not in ALLOWED_KEYS: # <<<<<<<<<<<<<< @@ -3622,39 +3803,39 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt */ } - /* "hunter/_predicates.pyx":124 + /* "hunter/_predicates.pyx":127 * raise TypeError('Unexpected argument %r. Must be one of %s.' % (key, ALLOWED_KEYS)) * * mapping[prefix] = value # <<<<<<<<<<<<<< * * self.query_eq = tuple(sorted(query_eq.items())) */ - __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error)) - if (unlikely(PyDict_SetItem(__pyx_v_mapping, __pyx_v_prefix, __pyx_v_value) < 0)) __PYX_ERR(0, 124, __pyx_L1_error) + __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) + if (unlikely(PyDict_SetItem(__pyx_v_mapping, __pyx_v_prefix, __pyx_v_value) < 0)) __PYX_ERR(0, 127, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":126 + /* "hunter/_predicates.pyx":129 * mapping[prefix] = value * * self.query_eq = tuple(sorted(query_eq.items())) # <<<<<<<<<<<<<< * self.query_startswith = tuple(sorted(query_startswith.items())) * self.query_endswith = tuple(sorted(query_endswith.items())) */ - __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_eq); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __pyx_L1_error) + __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_eq); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 129, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 126, __pyx_L1_error) + __PYX_ERR(0, 129, __pyx_L1_error) } - __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -3663,27 +3844,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_eq = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":127 + /* "hunter/_predicates.pyx":130 * * self.query_eq = tuple(sorted(query_eq.items())) * self.query_startswith = tuple(sorted(query_startswith.items())) # <<<<<<<<<<<<<< * self.query_endswith = tuple(sorted(query_endswith.items())) * self.query_in = tuple(sorted(query_in.items())) */ - __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_query_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) + __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_query_startswith); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 130, __pyx_L1_error) if (unlikely(__pyx_t_5 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 127, __pyx_L1_error) + __PYX_ERR(0, 130, __pyx_L1_error) } - __pyx_t_8 = PyList_AsTuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error) + __pyx_t_8 = PyList_AsTuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_8); @@ -3692,27 +3873,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_startswith = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":128 + /* "hunter/_predicates.pyx":131 * self.query_eq = tuple(sorted(query_eq.items())) * self.query_startswith = tuple(sorted(query_startswith.items())) * self.query_endswith = tuple(sorted(query_endswith.items())) # <<<<<<<<<<<<<< * self.query_in = tuple(sorted(query_in.items())) * self.query_contains = tuple(sorted(query_contains.items())) */ - __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_query_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 128, __pyx_L1_error) + __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_query_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 131, __pyx_L1_error) if (unlikely(__pyx_t_8 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 128, __pyx_L1_error) + __PYX_ERR(0, 131, __pyx_L1_error) } - __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -3721,27 +3902,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_endswith = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":129 + /* "hunter/_predicates.pyx":132 * self.query_startswith = tuple(sorted(query_startswith.items())) * self.query_endswith = tuple(sorted(query_endswith.items())) * self.query_in = tuple(sorted(query_in.items())) # <<<<<<<<<<<<<< * self.query_contains = tuple(sorted(query_contains.items())) * self.query_regex = tuple(sorted(query_regex.items())) */ - __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_in); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 129, __pyx_L1_error) + __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_in); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 129, __pyx_L1_error) + __PYX_ERR(0, 132, __pyx_L1_error) } - __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -3750,27 +3931,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_in = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":130 + /* "hunter/_predicates.pyx":133 * self.query_endswith = tuple(sorted(query_endswith.items())) * self.query_in = tuple(sorted(query_in.items())) * self.query_contains = tuple(sorted(query_contains.items())) # <<<<<<<<<<<<<< * self.query_regex = tuple(sorted(query_regex.items())) * self.query_lt = tuple(sorted(query_lt.items())) */ - __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_query_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error) + __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_query_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 133, __pyx_L1_error) if (unlikely(__pyx_t_5 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 130, __pyx_L1_error) + __PYX_ERR(0, 133, __pyx_L1_error) } - __pyx_t_8 = PyList_AsTuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 130, __pyx_L1_error) + __pyx_t_8 = PyList_AsTuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_8); @@ -3779,27 +3960,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_contains = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":131 + /* "hunter/_predicates.pyx":134 * self.query_in = tuple(sorted(query_in.items())) * self.query_contains = tuple(sorted(query_contains.items())) * self.query_regex = tuple(sorted(query_regex.items())) # <<<<<<<<<<<<<< * self.query_lt = tuple(sorted(query_lt.items())) * self.query_lte = tuple(sorted(query_lte.items())) */ - __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_query_regex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error) + __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_query_regex); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 134, __pyx_L1_error) if (unlikely(__pyx_t_8 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 131, __pyx_L1_error) + __PYX_ERR(0, 134, __pyx_L1_error) } - __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -3808,27 +3989,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_regex = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":132 + /* "hunter/_predicates.pyx":135 * self.query_contains = tuple(sorted(query_contains.items())) * self.query_regex = tuple(sorted(query_regex.items())) * self.query_lt = tuple(sorted(query_lt.items())) # <<<<<<<<<<<<<< * self.query_lte = tuple(sorted(query_lte.items())) * self.query_gt = tuple(sorted(query_gt.items())) */ - __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_lt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error) + __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_lt); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 135, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 132, __pyx_L1_error) + __PYX_ERR(0, 135, __pyx_L1_error) } - __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -3837,27 +4018,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_lt = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":133 + /* "hunter/_predicates.pyx":136 * self.query_regex = tuple(sorted(query_regex.items())) * self.query_lt = tuple(sorted(query_lt.items())) * self.query_lte = tuple(sorted(query_lte.items())) # <<<<<<<<<<<<<< * self.query_gt = tuple(sorted(query_gt.items())) * self.query_gte = tuple(sorted(query_gte.items())) */ - __Pyx_TraceLine(133,0,__PYX_ERR(0, 133, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_query_lte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __Pyx_TraceLine(136,0,__PYX_ERR(0, 136, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_query_lte); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_8 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_5); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 136, __pyx_L1_error) if (unlikely(__pyx_t_5 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 133, __pyx_L1_error) + __PYX_ERR(0, 136, __pyx_L1_error) } - __pyx_t_8 = PyList_AsTuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_8 = PyList_AsTuple(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_8); @@ -3866,27 +4047,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_lte = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":134 + /* "hunter/_predicates.pyx":137 * self.query_lt = tuple(sorted(query_lt.items())) * self.query_lte = tuple(sorted(query_lte.items())) * self.query_gt = tuple(sorted(query_gt.items())) # <<<<<<<<<<<<<< * self.query_gte = tuple(sorted(query_gte.items())) * */ - __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_query_gt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error) + __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyDict_Items(__pyx_v_query_gt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_8); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 137, __pyx_L1_error) if (unlikely(__pyx_t_8 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 134, __pyx_L1_error) + __PYX_ERR(0, 137, __pyx_L1_error) } - __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) + __pyx_t_1 = PyList_AsTuple(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -3895,27 +4076,27 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_gt = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":135 + /* "hunter/_predicates.pyx":138 * self.query_lte = tuple(sorted(query_lte.items())) * self.query_gt = tuple(sorted(query_gt.items())) * self.query_gte = tuple(sorted(query_gte.items())) # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) - __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_gte); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 135, __pyx_L1_error) + __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyDict_Items(__pyx_v_query_gte); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_5 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_15 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 138, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 135, __pyx_L1_error) + __PYX_ERR(0, 138, __pyx_L1_error) } - __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_5 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -3924,7 +4105,7 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt __pyx_v_self->query_gte = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":44 + /* "hunter/_predicates.pyx":47 * See :class:`hunter.event.Event` for fields that can be filtered on. * """ * def __init__(self, **query): # <<<<<<<<<<<<<< @@ -3966,7 +4147,7 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt return __pyx_r; } -/* "hunter/_predicates.pyx":137 +/* "hunter/_predicates.pyx":140 * self.query_gte = tuple(sorted(query_gte.items())) * * def __str__(self): # <<<<<<<<<<<<<< @@ -3989,7 +4170,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5Query_3__str__(PyObject *__pyx_ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "hunter/_predicates.pyx":140 +/* "hunter/_predicates.pyx":143 * return 'Query(%s)' % ( * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) # <<<<<<<<<<<<<< @@ -4006,7 +4187,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___7genexpr_genexpr if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_2_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 140, __pyx_L1_error) + __PYX_ERR(0, 143, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4014,7 +4195,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___7genexpr_genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr_locals_ge, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr_locals_ge, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4045,7 +4226,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 140, 0, __PYX_ERR(0, 140, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 143, 0, __PYX_ERR(0, 143, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; @@ -4055,32 +4236,32 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 140, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapping)) { __Pyx_RaiseClosureNameError("mapping"); __PYX_ERR(0, 140, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 143, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapping)) { __Pyx_RaiseClosureNameError("mapping"); __PYX_ERR(0, 143, __pyx_L1_error) } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapping)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapping)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapping; __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_outer_scope->__pyx_v_mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_mapping); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 143, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 143, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -4090,7 +4271,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 140, __pyx_L1_error) + else __PYX_ERR(0, 143, __pyx_L1_error) } break; } @@ -4102,7 +4283,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 140, __pyx_L1_error) + __PYX_ERR(0, 143, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -4115,15 +4296,15 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -4131,7 +4312,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 140, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 143, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L7_unpacking_done; @@ -4139,7 +4320,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 140, __pyx_L1_error) + __PYX_ERR(0, 143, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key); @@ -4150,8 +4331,8 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kind)) { __Pyx_RaiseClosureNameError("kind"); __PYX_ERR(0, 140, __pyx_L1_error) } - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_kind)) { __Pyx_RaiseClosureNameError("kind"); __PYX_ERR(0, 143, __pyx_L1_error) } + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key); @@ -4162,7 +4343,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_cur_scope->__pyx_v_value); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_r, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s_r, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_6; @@ -4184,7 +4365,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera __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, 140, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 143, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -4220,7 +4401,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___genexpr(PyObject if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 140, __pyx_L1_error) + __PYX_ERR(0, 143, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4228,7 +4409,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___genexpr(PyObject __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_5Query_7__str___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_5Query_7__str___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4264,7 +4445,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx int __pyx_t_13; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 140, 0, __PYX_ERR(0, 140, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 143, 0, __PYX_ERR(0, 143, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; @@ -4274,18 +4455,18 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 140, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 143, __pyx_L1_error) - /* "hunter/_predicates.pyx":142 + /* "hunter/_predicates.pyx":145 * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) * for kind, mapping in [ * ('', self.query_eq), # <<<<<<<<<<<<<< * ('_in', self.query_in), * ('_contains', self.query_contains), */ - __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 142, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error) + __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 145, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_s__2); __Pyx_GIVEREF(__pyx_kp_s__2); @@ -4294,16 +4475,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_eq); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_eq); - /* "hunter/_predicates.pyx":143 + /* "hunter/_predicates.pyx":146 * for kind, mapping in [ * ('', self.query_eq), * ('_in', self.query_in), # <<<<<<<<<<<<<< * ('_contains', self.query_contains), * ('_startswith', self.query_startswith), */ - __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 143, __pyx_L1_error) } - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 146, __pyx_L1_error) } + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_in_2); __Pyx_GIVEREF(__pyx_n_s_in_2); @@ -4312,16 +4493,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_in); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_in); - /* "hunter/_predicates.pyx":144 + /* "hunter/_predicates.pyx":147 * ('', self.query_eq), * ('_in', self.query_in), * ('_contains', self.query_contains), # <<<<<<<<<<<<<< * ('_startswith', self.query_startswith), * ('_endswith', self.query_endswith), */ - __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 144, __pyx_L1_error) } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 147, __pyx_L1_error) } + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_contains_2); __Pyx_GIVEREF(__pyx_n_s_contains_2); @@ -4330,16 +4511,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_contains); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_contains); - /* "hunter/_predicates.pyx":145 + /* "hunter/_predicates.pyx":148 * ('_in', self.query_in), * ('_contains', self.query_contains), * ('_startswith', self.query_startswith), # <<<<<<<<<<<<<< * ('_endswith', self.query_endswith), * ('_regex', self.query_regex), */ - __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 145, __pyx_L1_error) } - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error) + __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 148, __pyx_L1_error) } + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_startswith_2); __Pyx_GIVEREF(__pyx_n_s_startswith_2); @@ -4348,16 +4529,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_startswith); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_startswith); - /* "hunter/_predicates.pyx":146 + /* "hunter/_predicates.pyx":149 * ('_contains', self.query_contains), * ('_startswith', self.query_startswith), * ('_endswith', self.query_endswith), # <<<<<<<<<<<<<< * ('_regex', self.query_regex), * ('_lt', self.query_lt), */ - __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 146, __pyx_L1_error) } - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) + __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 149, __pyx_L1_error) } + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_endswith_2); __Pyx_GIVEREF(__pyx_n_s_endswith_2); @@ -4366,16 +4547,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_endswith); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_endswith); - /* "hunter/_predicates.pyx":147 + /* "hunter/_predicates.pyx":150 * ('_startswith', self.query_startswith), * ('_endswith', self.query_endswith), * ('_regex', self.query_regex), # <<<<<<<<<<<<<< * ('_lt', self.query_lt), * ('_lte', self.query_lte), */ - __Pyx_TraceLine(147,0,__PYX_ERR(0, 147, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 147, __pyx_L1_error) } - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 150, __pyx_L1_error) } + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_regex_2); __Pyx_GIVEREF(__pyx_n_s_regex_2); @@ -4384,16 +4565,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_regex); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_regex); - /* "hunter/_predicates.pyx":148 + /* "hunter/_predicates.pyx":151 * ('_endswith', self.query_endswith), * ('_regex', self.query_regex), * ('_lt', self.query_lt), # <<<<<<<<<<<<<< * ('_lte', self.query_lte), * ('_gt', self.query_gt), */ - __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 148, __pyx_L1_error) } - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error) + __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 151, __pyx_L1_error) } + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_n_s_lt_2); __Pyx_GIVEREF(__pyx_n_s_lt_2); @@ -4402,16 +4583,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lt); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lt); - /* "hunter/_predicates.pyx":149 + /* "hunter/_predicates.pyx":152 * ('_regex', self.query_regex), * ('_lt', self.query_lt), * ('_lte', self.query_lte), # <<<<<<<<<<<<<< * ('_gt', self.query_gt), * ('_gte', self.query_gte), */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 149, __pyx_L1_error) } - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error) + __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 152, __pyx_L1_error) } + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_n_s_lte_2); __Pyx_GIVEREF(__pyx_n_s_lte_2); @@ -4420,16 +4601,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lte); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lte); - /* "hunter/_predicates.pyx":150 + /* "hunter/_predicates.pyx":153 * ('_lt', self.query_lt), * ('_lte', self.query_lte), * ('_gt', self.query_gt), # <<<<<<<<<<<<<< * ('_gte', self.query_gte), * ] if mapping */ - __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 150, __pyx_L1_error) } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 153, __pyx_L1_error) } + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_n_s_gt_2); __Pyx_GIVEREF(__pyx_n_s_gt_2); @@ -4438,16 +4619,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gt); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gt); - /* "hunter/_predicates.pyx":151 + /* "hunter/_predicates.pyx":154 * ('_lte', self.query_lte), * ('_gt', self.query_gt), * ('_gte', self.query_gte), # <<<<<<<<<<<<<< * ] if mapping * ) */ - __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 151, __pyx_L1_error) } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 151, __pyx_L1_error) + __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 154, __pyx_L1_error) } + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_n_s_gte_2); __Pyx_GIVEREF(__pyx_n_s_gte_2); @@ -4456,15 +4637,15 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gte); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gte); - /* "hunter/_predicates.pyx":141 + /* "hunter/_predicates.pyx":144 * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) * for kind, mapping in [ # <<<<<<<<<<<<<< * ('', self.query_eq), * ('_in', self.query_in), */ - __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) - __pyx_t_11 = PyTuple_New(10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) + __pyx_t_11 = PyTuple_New(10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); @@ -4501,9 +4682,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx for (;;) { if (__pyx_t_12 >= 10) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 144, __pyx_L1_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif if (likely(__pyx_t_11 != Py_None)) { @@ -4512,7 +4693,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 141, __pyx_L1_error) + __PYX_ERR(0, 144, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); @@ -4520,14 +4701,14 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 141, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 144, __pyx_L1_error) } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_kind); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_kind, __pyx_t_9); @@ -4538,28 +4719,28 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":152 + /* "hunter/_predicates.pyx":155 * ('_gt', self.query_gt), * ('_gte', self.query_gte), * ] if mapping # <<<<<<<<<<<<<< * ) * ) */ - __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_mapping); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 152, __pyx_L1_error) + __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error)) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_mapping); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 155, __pyx_L1_error) if (__pyx_t_13) { - /* "hunter/_predicates.pyx":140 + /* "hunter/_predicates.pyx":143 * return 'Query(%s)' % ( * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) # <<<<<<<<<<<<<< * for kind, mapping in [ * ('', self.query_eq), */ - __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) - __pyx_t_11 = __pyx_pf_6hunter_11_predicates_5Query_7__str___7genexpr_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) + __pyx_t_11 = __pyx_pf_6hunter_11_predicates_5Query_7__str___7genexpr_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_8; @@ -4579,9 +4760,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_10); __pyx_t_12 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 140, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 143, __pyx_L1_error) - /* "hunter/_predicates.pyx":152 + /* "hunter/_predicates.pyx":155 * ('_gt', self.query_gt), * ('_gte', self.query_gte), * ] if mapping # <<<<<<<<<<<<<< @@ -4590,19 +4771,19 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx */ } - /* "hunter/_predicates.pyx":141 + /* "hunter/_predicates.pyx":144 * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) * for kind, mapping in [ # <<<<<<<<<<<<<< * ('', self.query_eq), * ('_in', self.query_in), */ - __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) + __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "hunter/_predicates.pyx":140 + /* "hunter/_predicates.pyx":143 * return 'Query(%s)' % ( * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) # <<<<<<<<<<<<<< @@ -4638,7 +4819,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx return __pyx_r; } -/* "hunter/_predicates.pyx":137 +/* "hunter/_predicates.pyx":140 * self.query_gte = tuple(sorted(query_gte.items())) * * def __str__(self): # <<<<<<<<<<<<<< @@ -4658,64 +4839,64 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_2__str__(struct __pyx_obj if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct____str__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 137, __pyx_L1_error) + __PYX_ERR(0, 140, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__str__", __pyx_f[0], 137, 0, __PYX_ERR(0, 137, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 140, 0, __PYX_ERR(0, 140, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "hunter/_predicates.pyx":138 + /* "hunter/_predicates.pyx":141 * * def __str__(self): * return 'Query(%s)' % ( # <<<<<<<<<<<<<< * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) */ - __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) + __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":140 + /* "hunter/_predicates.pyx":143 * return 'Query(%s)' % ( * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) # <<<<<<<<<<<<<< * for kind, mapping in [ * ('', self.query_eq), */ - __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) - __pyx_t_1 = __pyx_pf_6hunter_11_predicates_5Query_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error) + __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) + __pyx_t_1 = __pyx_pf_6hunter_11_predicates_5Query_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "hunter/_predicates.pyx":139 + /* "hunter/_predicates.pyx":142 * def __str__(self): * return 'Query(%s)' % ( * ', '.join( # <<<<<<<<<<<<<< * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) * for kind, mapping in [ */ - __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":138 + /* "hunter/_predicates.pyx":141 * * def __str__(self): * return 'Query(%s)' % ( # <<<<<<<<<<<<<< * ', '.join( * ', '.join('%s%s=%r' % (key, kind, value) for key, value in mapping) */ - __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Query_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) + __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Query_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __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; - /* "hunter/_predicates.pyx":137 + /* "hunter/_predicates.pyx":140 * self.query_gte = tuple(sorted(query_gte.items())) * * def __str__(self): # <<<<<<<<<<<<<< @@ -4737,7 +4918,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_2__str__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":156 +/* "hunter/_predicates.pyx":159 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -4759,7 +4940,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5Query_5__repr__(PyObject *__pyx } static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "hunter/_predicates.pyx":158 +/* "hunter/_predicates.pyx":161 * def __repr__(self): * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ # <<<<<<<<<<<<<< @@ -4776,7 +4957,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8__repr___genexpr(PyObjec if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_4_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 158, __pyx_L1_error) + __PYX_ERR(0, 161, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -4784,7 +4965,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8__repr___genexpr(PyObjec __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_repr___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_repr___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -4820,7 +5001,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p int __pyx_t_13; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 158, 0, __PYX_ERR(0, 158, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 161, 0, __PYX_ERR(0, 161, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; @@ -4830,18 +5011,18 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 158, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 161, __pyx_L1_error) - /* "hunter/_predicates.pyx":159 + /* "hunter/_predicates.pyx":162 * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ * ('query_eq=%r', self.query_eq), # <<<<<<<<<<<<<< * ('query_in=%r', self.query_in), * ('query_contains=%r', self.query_contains), */ - __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 159, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) + __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 162, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_s_query_eq_r); __Pyx_GIVEREF(__pyx_kp_s_query_eq_r); @@ -4850,16 +5031,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_eq); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_eq); - /* "hunter/_predicates.pyx":160 + /* "hunter/_predicates.pyx":163 * fmt % (mapping,) for fmt, mapping in [ * ('query_eq=%r', self.query_eq), * ('query_in=%r', self.query_in), # <<<<<<<<<<<<<< * ('query_contains=%r', self.query_contains), * ('query_startswith=%r', self.query_startswith), */ - __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 160, __pyx_L1_error) } - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) + __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 163, __pyx_L1_error) } + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_s_query_in_r); __Pyx_GIVEREF(__pyx_kp_s_query_in_r); @@ -4868,16 +5049,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_in); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_in); - /* "hunter/_predicates.pyx":161 + /* "hunter/_predicates.pyx":164 * ('query_eq=%r', self.query_eq), * ('query_in=%r', self.query_in), * ('query_contains=%r', self.query_contains), # <<<<<<<<<<<<<< * ('query_startswith=%r', self.query_startswith), * ('query_endswith=%r', self.query_endswith), */ - __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 161, __pyx_L1_error) } - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 164, __pyx_L1_error) } + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_kp_s_query_contains_r); __Pyx_GIVEREF(__pyx_kp_s_query_contains_r); @@ -4886,16 +5067,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_contains); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_contains); - /* "hunter/_predicates.pyx":162 + /* "hunter/_predicates.pyx":165 * ('query_in=%r', self.query_in), * ('query_contains=%r', self.query_contains), * ('query_startswith=%r', self.query_startswith), # <<<<<<<<<<<<<< * ('query_endswith=%r', self.query_endswith), * ('query_regex=%r', self.query_regex), */ - __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 162, __pyx_L1_error) } - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) + __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 165, __pyx_L1_error) } + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_query_startswith_r); __Pyx_GIVEREF(__pyx_kp_s_query_startswith_r); @@ -4904,16 +5085,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_startswith); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_startswith); - /* "hunter/_predicates.pyx":163 + /* "hunter/_predicates.pyx":166 * ('query_contains=%r', self.query_contains), * ('query_startswith=%r', self.query_startswith), * ('query_endswith=%r', self.query_endswith), # <<<<<<<<<<<<<< * ('query_regex=%r', self.query_regex), * ('query_lt=%r', self.query_lt), */ - __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 163, __pyx_L1_error) } - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 166, __pyx_L1_error) } + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_kp_s_query_endswith_r); __Pyx_GIVEREF(__pyx_kp_s_query_endswith_r); @@ -4922,16 +5103,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_endswith); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_endswith); - /* "hunter/_predicates.pyx":164 + /* "hunter/_predicates.pyx":167 * ('query_startswith=%r', self.query_startswith), * ('query_endswith=%r', self.query_endswith), * ('query_regex=%r', self.query_regex), # <<<<<<<<<<<<<< * ('query_lt=%r', self.query_lt), * ('query_lte=%r', self.query_lte), */ - __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 164, __pyx_L1_error) } - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 164, __pyx_L1_error) + __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 167, __pyx_L1_error) } + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_query_regex_r); __Pyx_GIVEREF(__pyx_kp_s_query_regex_r); @@ -4940,16 +5121,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_regex); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_regex); - /* "hunter/_predicates.pyx":165 + /* "hunter/_predicates.pyx":168 * ('query_endswith=%r', self.query_endswith), * ('query_regex=%r', self.query_regex), * ('query_lt=%r', self.query_lt), # <<<<<<<<<<<<<< * ('query_lte=%r', self.query_lte), * ('query_gt=%r', self.query_gt), */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 165, __pyx_L1_error) } - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 165, __pyx_L1_error) + __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 168, __pyx_L1_error) } + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_kp_s_query_lt_r); __Pyx_GIVEREF(__pyx_kp_s_query_lt_r); @@ -4958,16 +5139,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lt); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lt); - /* "hunter/_predicates.pyx":166 + /* "hunter/_predicates.pyx":169 * ('query_regex=%r', self.query_regex), * ('query_lt=%r', self.query_lt), * ('query_lte=%r', self.query_lte), # <<<<<<<<<<<<<< * ('query_gt=%r', self.query_gt), * ('query_gte=%r', self.query_gte), */ - __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 166, __pyx_L1_error) } - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 166, __pyx_L1_error) + __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 169, __pyx_L1_error) } + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_kp_s_query_lte_r); __Pyx_GIVEREF(__pyx_kp_s_query_lte_r); @@ -4976,16 +5157,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lte); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_lte); - /* "hunter/_predicates.pyx":167 + /* "hunter/_predicates.pyx":170 * ('query_lt=%r', self.query_lt), * ('query_lte=%r', self.query_lte), * ('query_gt=%r', self.query_gt), # <<<<<<<<<<<<<< * ('query_gte=%r', self.query_gte), * */ - __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 167, __pyx_L1_error) } - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 170, __pyx_L1_error) } + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_kp_s_query_gt_r); __Pyx_GIVEREF(__pyx_kp_s_query_gt_r); @@ -4994,16 +5175,16 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gt); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gt); - /* "hunter/_predicates.pyx":168 + /* "hunter/_predicates.pyx":171 * ('query_lte=%r', self.query_lte), * ('query_gt=%r', self.query_gt), * ('query_gte=%r', self.query_gte), # <<<<<<<<<<<<<< * * ] if mapping */ - __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 168, __pyx_L1_error) } - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 171, __pyx_L1_error) } + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_kp_s_query_gte_r); __Pyx_GIVEREF(__pyx_kp_s_query_gte_r); @@ -5012,15 +5193,15 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gte); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->query_gte); - /* "hunter/_predicates.pyx":158 + /* "hunter/_predicates.pyx":161 * def __repr__(self): * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ # <<<<<<<<<<<<<< * ('query_eq=%r', self.query_eq), * ('query_in=%r', self.query_in), */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) - __pyx_t_11 = PyTuple_New(10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) + __pyx_t_11 = PyTuple_New(10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); @@ -5057,9 +5238,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p for (;;) { if (__pyx_t_12 >= 10) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_12); __Pyx_INCREF(__pyx_t_11); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 161, __pyx_L1_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_10, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif if (likely(__pyx_t_11 != Py_None)) { @@ -5068,7 +5249,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 158, __pyx_L1_error) + __PYX_ERR(0, 161, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); @@ -5076,14 +5257,14 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 161, __pyx_L1_error) } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fmt); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fmt, __pyx_t_9); @@ -5094,31 +5275,31 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "hunter/_predicates.pyx":170 + /* "hunter/_predicates.pyx":173 * ('query_gte=%r', self.query_gte), * * ] if mapping # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_mapping); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 170, __pyx_L1_error) + __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error)) + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_mapping); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) if (__pyx_t_13) { - /* "hunter/_predicates.pyx":158 + /* "hunter/_predicates.pyx":161 * def __repr__(self): * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ # <<<<<<<<<<<<<< * ('query_eq=%r', self.query_eq), * ('query_in=%r', self.query_in), */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mapping); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_mapping); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_mapping); - __pyx_t_8 = PyNumber_Remainder(__pyx_cur_scope->__pyx_v_fmt, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 158, __pyx_L1_error) + __pyx_t_8 = PyNumber_Remainder(__pyx_cur_scope->__pyx_v_fmt, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_8; @@ -5138,9 +5319,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_10); __pyx_t_12 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 158, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 161, __pyx_L1_error) - /* "hunter/_predicates.pyx":170 + /* "hunter/_predicates.pyx":173 * ('query_gte=%r', self.query_gte), * * ] if mapping # <<<<<<<<<<<<<< @@ -5149,14 +5330,14 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p */ } - /* "hunter/_predicates.pyx":158 + /* "hunter/_predicates.pyx":161 * def __repr__(self): * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ # <<<<<<<<<<<<<< * ('query_eq=%r', self.query_eq), * ('query_in=%r', self.query_in), */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) + __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -5189,7 +5370,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p return __pyx_r; } -/* "hunter/_predicates.pyx":156 +/* "hunter/_predicates.pyx":159 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5209,55 +5390,55 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_4__repr__(struct __pyx_ob if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_3___repr__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 156, __pyx_L1_error) + __PYX_ERR(0, 159, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__repr__", __pyx_f[0], 156, 0, __PYX_ERR(0, 156, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 159, 0, __PYX_ERR(0, 159, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "hunter/_predicates.pyx":157 + /* "hunter/_predicates.pyx":160 * * def __repr__(self): * return '' % ' '.join( # <<<<<<<<<<<<<< * fmt % (mapping,) for fmt, mapping in [ * ('query_eq=%r', self.query_eq), */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) + __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":158 + /* "hunter/_predicates.pyx":161 * def __repr__(self): * return '' % ' '.join( * fmt % (mapping,) for fmt, mapping in [ # <<<<<<<<<<<<<< * ('query_eq=%r', self.query_eq), * ('query_in=%r', self.query_in), */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) - __pyx_t_1 = __pyx_pf_6hunter_11_predicates_5Query_8__repr___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 158, __pyx_L1_error) + __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) + __pyx_t_1 = __pyx_pf_6hunter_11_predicates_5Query_8__repr___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "hunter/_predicates.pyx":157 + /* "hunter/_predicates.pyx":160 * * def __repr__(self): * return '' % ' '.join( # <<<<<<<<<<<<<< * fmt % (mapping,) for fmt, mapping in [ * ('query_eq=%r', self.query_eq), */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_Query_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_Query_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __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; - /* "hunter/_predicates.pyx":156 + /* "hunter/_predicates.pyx":159 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -5279,7 +5460,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_4__repr__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pyx":173 +/* "hunter/_predicates.pyx":176 * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -5308,46 +5489,46 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 173, 0, __PYX_ERR(0, 173, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 176, 0, __PYX_ERR(0, 176, __pyx_L1_error)); - /* "hunter/_predicates.pyx":174 + /* "hunter/_predicates.pyx":177 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, Query) * and self.query_eq == ( other).query_eq */ - __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error)) + __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":175 + /* "hunter/_predicates.pyx":178 * def __eq__(self, other): * return ( * isinstance(other, Query) # <<<<<<<<<<<<<< * and self.query_eq == ( other).query_eq * and self.query_startswith == ( other).query_startswith */ - __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L1_error)) + __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Query); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":176 + /* "hunter/_predicates.pyx":179 * return ( * isinstance(other, Query) * and self.query_eq == ( other).query_eq # <<<<<<<<<<<<<< * and self.query_startswith == ( other).query_startswith * and self.query_endswith == ( other).query_endswith */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_eq, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_eq, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_eq, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_eq, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 179, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5357,16 +5538,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":177 + /* "hunter/_predicates.pyx":180 * isinstance(other, Query) * and self.query_eq == ( other).query_eq * and self.query_startswith == ( other).query_startswith # <<<<<<<<<<<<<< * and self.query_endswith == ( other).query_endswith * and self.query_in == ( other).query_in */ - __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_startswith, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_startswith, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 177, __pyx_L1_error) + __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_startswith, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_startswith, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5376,16 +5557,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":178 + /* "hunter/_predicates.pyx":181 * and self.query_eq == ( other).query_eq * and self.query_startswith == ( other).query_startswith * and self.query_endswith == ( other).query_endswith # <<<<<<<<<<<<<< * and self.query_in == ( other).query_in * and self.query_contains == ( other).query_contains */ - __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_endswith, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_endswith, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 178, __pyx_L1_error) + __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_endswith, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_endswith, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 181, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5395,16 +5576,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":179 + /* "hunter/_predicates.pyx":182 * and self.query_startswith == ( other).query_startswith * and self.query_endswith == ( other).query_endswith * and self.query_in == ( other).query_in # <<<<<<<<<<<<<< * and self.query_contains == ( other).query_contains * and self.query_regex == ( other).query_regex */ - __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_in, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_in, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_in, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_in, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5414,16 +5595,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":180 + /* "hunter/_predicates.pyx":183 * and self.query_endswith == ( other).query_endswith * and self.query_in == ( other).query_in * and self.query_contains == ( other).query_contains # <<<<<<<<<<<<<< * and self.query_regex == ( other).query_regex * and self.query_lt == (other).query_lt */ - __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_contains, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_contains, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_contains, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_contains, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 183, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5433,16 +5614,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":181 + /* "hunter/_predicates.pyx":184 * and self.query_in == ( other).query_in * and self.query_contains == ( other).query_contains * and self.query_regex == ( other).query_regex # <<<<<<<<<<<<<< * and self.query_lt == (other).query_lt * and self.query_lte == (other).query_lte */ - __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_regex, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_regex, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_regex, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_regex, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5452,16 +5633,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":182 + /* "hunter/_predicates.pyx":185 * and self.query_contains == ( other).query_contains * and self.query_regex == ( other).query_regex * and self.query_lt == (other).query_lt # <<<<<<<<<<<<<< * and self.query_lte == (other).query_lte * and self.query_gt == (other).query_gt */ - __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_lt, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_lt, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_lt, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_lt, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 185, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5471,16 +5652,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":183 + /* "hunter/_predicates.pyx":186 * and self.query_regex == ( other).query_regex * and self.query_lt == (other).query_lt * and self.query_lte == (other).query_lte # <<<<<<<<<<<<<< * and self.query_gt == (other).query_gt * and self.query_gte == (other).query_gte */ - __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_lte, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_lte, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_lte, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_lte, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5490,16 +5671,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":184 + /* "hunter/_predicates.pyx":187 * and self.query_lt == (other).query_lt * and self.query_lte == (other).query_lte * and self.query_gt == (other).query_gt # <<<<<<<<<<<<<< * and self.query_gte == (other).query_gte * ) */ - __Pyx_TraceLine(184,0,__PYX_ERR(0, 184, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_gt, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_gt, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) + __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_gt, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_gt, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 187, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -5509,15 +5690,15 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":185 + /* "hunter/_predicates.pyx":188 * and self.query_lte == (other).query_lte * and self.query_gt == (other).query_gt * and self.query_gte == (other).query_gte # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(185,0,__PYX_ERR(0, 185, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_gte, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_gte, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) + __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->query_gte, ((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_other)->query_gte, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -5526,7 +5707,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":173 + /* "hunter/_predicates.pyx":176 * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -5547,7 +5728,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":188 +/* "hunter/_predicates.pyx":191 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -5575,17 +5756,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_5Query_8__hash__(struct __pyx_ob PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 188, 0, __PYX_ERR(0, 188, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 191, 0, __PYX_ERR(0, 191, __pyx_L1_error)); - /* "hunter/_predicates.pyx":190 + /* "hunter/_predicates.pyx":193 * def __hash__(self): * return hash(( * 'Query', # <<<<<<<<<<<<<< * self.query_eq, * self.query_in, */ - __Pyx_TraceLine(190,0,__PYX_ERR(0, 190, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Query); __Pyx_GIVEREF(__pyx_n_s_Query); @@ -5621,20 +5802,20 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_5Query_8__hash__(struct __pyx_ob __Pyx_GIVEREF(__pyx_v_self->query_gte); PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_v_self->query_gte); - /* "hunter/_predicates.pyx":189 + /* "hunter/_predicates.pyx":192 * * def __hash__(self): * return hash(( # <<<<<<<<<<<<<< * 'Query', * self.query_eq, */ - __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 189, __pyx_L1_error) + __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __pyx_L1_error)) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":188 + /* "hunter/_predicates.pyx":191 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -5654,7 +5835,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_5Query_8__hash__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pyx":203 +/* "hunter/_predicates.pyx":206 * )) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -5688,7 +5869,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5Query_11__call__(PyObject *__py else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 203, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 206, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -5699,13 +5880,13 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5Query_11__call__(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 203, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 206, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._predicates.Query.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 203, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 206, __pyx_L1_error) __pyx_r = __pyx_pf_6hunter_11_predicates_5Query_10__call__(((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_self), __pyx_v_event); /* function exit code */ @@ -5723,24 +5904,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_10__call__(struct __pyx_o __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 203, 0, __PYX_ERR(0, 203, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 206, 0, __PYX_ERR(0, 206, __pyx_L1_error)); - /* "hunter/_predicates.pyx":204 + /* "hunter/_predicates.pyx":207 * * def __call__(self, Event event): * return fast_Query_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) + __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Query_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Query_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":203 + /* "hunter/_predicates.pyx":206 * )) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -5760,7 +5941,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_10__call__(struct __pyx_o return __pyx_r; } -/* "hunter/_predicates.pyx":206 +/* "hunter/_predicates.pyx":209 * return fast_Query_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -5788,18 +5969,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_12__or__(PyObject *__pyx_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 206, 0, __PYX_ERR(0, 206, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 209, 0, __PYX_ERR(0, 209, __pyx_L1_error)); - /* "hunter/_predicates.pyx":207 + /* "hunter/_predicates.pyx":210 * * def __or__(self, other): * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) + __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -5807,14 +5988,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_12__or__(PyObject *__pyx_ __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __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; - /* "hunter/_predicates.pyx":206 + /* "hunter/_predicates.pyx":209 * return fast_Query_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -5835,7 +6016,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_12__or__(PyObject *__pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":209 +/* "hunter/_predicates.pyx":212 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -5863,18 +6044,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_14__and__(PyObject *__pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 209, 0, __PYX_ERR(0, 209, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error)); - /* "hunter/_predicates.pyx":210 + /* "hunter/_predicates.pyx":213 * * def __and__(self, other): * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L1_error)) + __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -5882,14 +6063,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_14__and__(PyObject *__pyx __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __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; - /* "hunter/_predicates.pyx":209 + /* "hunter/_predicates.pyx":212 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -5910,7 +6091,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_14__and__(PyObject *__pyx return __pyx_r; } -/* "hunter/_predicates.pyx":212 +/* "hunter/_predicates.pyx":215 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -5937,24 +6118,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_16__invert__(struct __pyx __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 215, 0, __PYX_ERR(0, 215, __pyx_L1_error)); - /* "hunter/_predicates.pyx":213 + /* "hunter/_predicates.pyx":216 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef fast_Query_call(Query self, Event event): */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) + __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":212 + /* "hunter/_predicates.pyx":215 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -6801,7 +6982,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_20__setstate_cython__(str return __pyx_r; } -/* "hunter/_predicates.pyx":215 +/* "hunter/_predicates.pyx":218 * return Not(self) * * cdef fast_Query_call(Query self, Event event): # <<<<<<<<<<<<<< @@ -6826,27 +7007,27 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ int __pyx_t_8; int __pyx_t_9; __Pyx_RefNannySetupContext("fast_Query_call", 0); - __Pyx_TraceCall("fast_Query_call", __pyx_f[0], 215, 0, __PYX_ERR(0, 215, __pyx_L1_error)); + __Pyx_TraceCall("fast_Query_call", __pyx_f[0], 218, 0, __PYX_ERR(0, 218, __pyx_L1_error)); - /* "hunter/_predicates.pyx":216 + /* "hunter/_predicates.pyx":219 * * cdef fast_Query_call(Query self, Event event): * for key, value in self.query_eq: # <<<<<<<<<<<<<< * evalue = event[key] * if evalue != value: */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) + __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_eq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 216, __pyx_L1_error) + __PYX_ERR(0, 219, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_eq; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 219, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -6855,7 +7036,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 216, __pyx_L1_error) + __PYX_ERR(0, 219, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6868,15 +7049,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -6884,7 +7065,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 216, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 219, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -6892,7 +7073,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 216, __pyx_L1_error) + __PYX_ERR(0, 219, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); @@ -6900,47 +7081,47 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":217 + /* "hunter/_predicates.pyx":220 * cdef fast_Query_call(Query self, Event event): * for key, value in self.query_eq: * evalue = event[key] # <<<<<<<<<<<<<< * if evalue != value: * return False */ - __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":218 + /* "hunter/_predicates.pyx":221 * for key, value in self.query_eq: * evalue = event[key] * if evalue != value: # <<<<<<<<<<<<<< * return False * for key, value in self.query_in: */ - __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) + __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - /* "hunter/_predicates.pyx":219 + /* "hunter/_predicates.pyx":222 * evalue = event[key] * if evalue != value: * return False # <<<<<<<<<<<<<< * for key, value in self.query_in: * evalue = event[key] */ - __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) + __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":218 + /* "hunter/_predicates.pyx":221 * for key, value in self.query_eq: * evalue = event[key] * if evalue != value: # <<<<<<<<<<<<<< @@ -6949,36 +7130,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":216 + /* "hunter/_predicates.pyx":219 * * cdef fast_Query_call(Query self, Event event): * for key, value in self.query_eq: # <<<<<<<<<<<<<< * evalue = event[key] * if evalue != value: */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) + __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":220 + /* "hunter/_predicates.pyx":223 * if evalue != value: * return False * for key, value in self.query_in: # <<<<<<<<<<<<<< * evalue = event[key] * if evalue not in value: */ - __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_in == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 220, __pyx_L1_error) + __PYX_ERR(0, 223, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_in; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 223, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -6987,7 +7168,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 220, __pyx_L1_error) + __PYX_ERR(0, 223, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7000,15 +7181,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7016,7 +7197,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 220, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 223, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L11_unpacking_done; @@ -7024,7 +7205,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 220, __pyx_L1_error) + __PYX_ERR(0, 223, __pyx_L1_error) __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -7032,46 +7213,46 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "hunter/_predicates.pyx":221 + /* "hunter/_predicates.pyx":224 * return False * for key, value in self.query_in: * evalue = event[key] # <<<<<<<<<<<<<< * if evalue not in value: * return False */ - __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":222 + /* "hunter/_predicates.pyx":225 * for key, value in self.query_in: * evalue = event[key] * if evalue not in value: # <<<<<<<<<<<<<< * return False * for key, value in self.query_contains: */ - __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_evalue, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_evalue, __pyx_v_value, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 225, __pyx_L1_error) __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "hunter/_predicates.pyx":223 + /* "hunter/_predicates.pyx":226 * evalue = event[key] * if evalue not in value: * return False # <<<<<<<<<<<<<< * for key, value in self.query_contains: * evalue = event[key] */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) + __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":222 + /* "hunter/_predicates.pyx":225 * for key, value in self.query_in: * evalue = event[key] * if evalue not in value: # <<<<<<<<<<<<<< @@ -7080,36 +7261,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":220 + /* "hunter/_predicates.pyx":223 * if evalue != value: * return False * for key, value in self.query_in: # <<<<<<<<<<<<<< * evalue = event[key] * if evalue not in value: */ - __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":224 + /* "hunter/_predicates.pyx":227 * if evalue not in value: * return False * for key, value in self.query_contains: # <<<<<<<<<<<<<< * evalue = event[key] * if value not in evalue: */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) + __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_contains == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 227, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_contains; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 227, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7118,7 +7299,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 227, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7131,15 +7312,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7147,7 +7328,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 227, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L16_unpacking_done; @@ -7155,7 +7336,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 227, __pyx_L1_error) __pyx_L16_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); @@ -7163,46 +7344,46 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":225 + /* "hunter/_predicates.pyx":228 * return False * for key, value in self.query_contains: * evalue = event[key] # <<<<<<<<<<<<<< * if value not in evalue: * return False */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":226 + /* "hunter/_predicates.pyx":229 * for key, value in self.query_contains: * evalue = event[key] * if value not in evalue: # <<<<<<<<<<<<<< * return False * for key, value in self.query_startswith: */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_evalue, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_value, __pyx_v_evalue, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":227 + /* "hunter/_predicates.pyx":230 * evalue = event[key] * if value not in evalue: * return False # <<<<<<<<<<<<<< * for key, value in self.query_startswith: * evalue = event[key] */ - __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) + __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":226 + /* "hunter/_predicates.pyx":229 * for key, value in self.query_contains: * evalue = event[key] * if value not in evalue: # <<<<<<<<<<<<<< @@ -7211,36 +7392,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":224 + /* "hunter/_predicates.pyx":227 * if evalue not in value: * return False * for key, value in self.query_contains: # <<<<<<<<<<<<<< * evalue = event[key] * if value not in evalue: */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) + __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":228 + /* "hunter/_predicates.pyx":231 * if value not in evalue: * return False * for key, value in self.query_startswith: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue.startswith(value): */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) + __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_startswith == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 228, __pyx_L1_error) + __PYX_ERR(0, 231, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_startswith; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 231, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7249,7 +7430,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 228, __pyx_L1_error) + __PYX_ERR(0, 231, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7262,15 +7443,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7278,7 +7459,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L20_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 228, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 231, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L21_unpacking_done; @@ -7286,7 +7467,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 228, __pyx_L1_error) + __PYX_ERR(0, 231, __pyx_L1_error) __pyx_L21_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -7294,28 +7475,28 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "hunter/_predicates.pyx":229 + /* "hunter/_predicates.pyx":232 * return False * for key, value in self.query_startswith: * evalue = event[key] # <<<<<<<<<<<<<< * if not evalue.startswith(value): * return False */ - __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":230 + /* "hunter/_predicates.pyx":233 * for key, value in self.query_startswith: * evalue = event[key] * if not evalue.startswith(value): # <<<<<<<<<<<<<< * return False * for key, value in self.query_endswith: */ - __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_evalue, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_TraceLine(233,0,__PYX_ERR(0, 233, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_evalue, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -7329,29 +7510,29 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_value); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 230, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 233, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "hunter/_predicates.pyx":231 + /* "hunter/_predicates.pyx":234 * evalue = event[key] * if not evalue.startswith(value): * return False # <<<<<<<<<<<<<< * for key, value in self.query_endswith: * evalue = event[key] */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) + __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":230 + /* "hunter/_predicates.pyx":233 * for key, value in self.query_startswith: * evalue = event[key] * if not evalue.startswith(value): # <<<<<<<<<<<<<< @@ -7360,36 +7541,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":228 + /* "hunter/_predicates.pyx":231 * if value not in evalue: * return False * for key, value in self.query_startswith: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue.startswith(value): */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) + __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":232 + /* "hunter/_predicates.pyx":235 * if not evalue.startswith(value): * return False * for key, value in self.query_endswith: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue.endswith(value): */ - __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) + __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_endswith == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 232, __pyx_L1_error) + __PYX_ERR(0, 235, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_endswith; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 235, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7398,7 +7579,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 232, __pyx_L1_error) + __PYX_ERR(0, 235, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7411,15 +7592,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7427,7 +7608,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L25_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 232, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 235, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L26_unpacking_done; @@ -7435,7 +7616,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 232, __pyx_L1_error) + __PYX_ERR(0, 235, __pyx_L1_error) __pyx_L26_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); @@ -7443,28 +7624,28 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":233 + /* "hunter/_predicates.pyx":236 * return False * for key, value in self.query_endswith: * evalue = event[key] # <<<<<<<<<<<<<< * if not evalue.endswith(value): * return False */ - __Pyx_TraceLine(233,0,__PYX_ERR(0, 233, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":234 + /* "hunter/_predicates.pyx":237 * for key, value in self.query_endswith: * evalue = event[key] * if not evalue.endswith(value): # <<<<<<<<<<<<<< * return False * for key, value in self.query_regex: */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_evalue, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_evalue, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -7478,29 +7659,29 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_value); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":235 + /* "hunter/_predicates.pyx":238 * evalue = event[key] * if not evalue.endswith(value): * return False # <<<<<<<<<<<<<< * for key, value in self.query_regex: * evalue = event[key] */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) + __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":234 + /* "hunter/_predicates.pyx":237 * for key, value in self.query_endswith: * evalue = event[key] * if not evalue.endswith(value): # <<<<<<<<<<<<<< @@ -7509,36 +7690,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":232 + /* "hunter/_predicates.pyx":235 * if not evalue.startswith(value): * return False * for key, value in self.query_endswith: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue.endswith(value): */ - __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) + __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":236 + /* "hunter/_predicates.pyx":239 * if not evalue.endswith(value): * return False * for key, value in self.query_regex: # <<<<<<<<<<<<<< * evalue = event[key] * if not value.match(evalue): */ - __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L1_error)) + __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_regex == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 236, __pyx_L1_error) + __PYX_ERR(0, 239, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_regex; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 239, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7547,7 +7728,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 236, __pyx_L1_error) + __PYX_ERR(0, 239, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7560,15 +7741,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7576,7 +7757,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L30_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 236, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 239, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L31_unpacking_done; @@ -7584,7 +7765,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 236, __pyx_L1_error) + __PYX_ERR(0, 239, __pyx_L1_error) __pyx_L31_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -7592,28 +7773,28 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "hunter/_predicates.pyx":237 + /* "hunter/_predicates.pyx":240 * return False * for key, value in self.query_regex: * evalue = event[key] # <<<<<<<<<<<<<< * if not value.match(evalue): * return False */ - __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":238 + /* "hunter/_predicates.pyx":241 * for key, value in self.query_regex: * evalue = event[key] * if not value.match(evalue): # <<<<<<<<<<<<<< * return False * for key, value in self.query_gt: */ - __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) + __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -7627,29 +7808,29 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_evalue) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_evalue); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "hunter/_predicates.pyx":239 + /* "hunter/_predicates.pyx":242 * evalue = event[key] * if not value.match(evalue): * return False # <<<<<<<<<<<<<< * for key, value in self.query_gt: * evalue = event[key] */ - __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error)) + __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":238 + /* "hunter/_predicates.pyx":241 * for key, value in self.query_regex: * evalue = event[key] * if not value.match(evalue): # <<<<<<<<<<<<<< @@ -7658,36 +7839,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":236 + /* "hunter/_predicates.pyx":239 * if not evalue.endswith(value): * return False * for key, value in self.query_regex: # <<<<<<<<<<<<<< * evalue = event[key] * if not value.match(evalue): */ - __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L1_error)) + __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":240 + /* "hunter/_predicates.pyx":243 * if not value.match(evalue): * return False * for key, value in self.query_gt: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue > value: */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) + __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_gt == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 240, __pyx_L1_error) + __PYX_ERR(0, 243, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_gt; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 243, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7696,7 +7877,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 240, __pyx_L1_error) + __PYX_ERR(0, 243, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7709,15 +7890,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7725,7 +7906,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L35_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 240, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 243, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L36_unpacking_done; @@ -7733,7 +7914,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 240, __pyx_L1_error) + __PYX_ERR(0, 243, __pyx_L1_error) __pyx_L36_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); @@ -7741,48 +7922,48 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":241 + /* "hunter/_predicates.pyx":244 * return False * for key, value in self.query_gt: * evalue = event[key] # <<<<<<<<<<<<<< * if not evalue > value: * return False */ - __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":242 + /* "hunter/_predicates.pyx":245 * for key, value in self.query_gt: * evalue = event[key] * if not evalue > value: # <<<<<<<<<<<<<< * return False * for key, value in self.query_gte: */ - __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 242, __pyx_L1_error) + __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":243 + /* "hunter/_predicates.pyx":246 * evalue = event[key] * if not evalue > value: * return False # <<<<<<<<<<<<<< * for key, value in self.query_gte: * evalue = event[key] */ - __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) + __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":242 + /* "hunter/_predicates.pyx":245 * for key, value in self.query_gt: * evalue = event[key] * if not evalue > value: # <<<<<<<<<<<<<< @@ -7791,36 +7972,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":240 + /* "hunter/_predicates.pyx":243 * if not value.match(evalue): * return False * for key, value in self.query_gt: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue > value: */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) + __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":244 + /* "hunter/_predicates.pyx":247 * if not evalue > value: * return False * for key, value in self.query_gte: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue >= value: */ - __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) + __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_gte == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 244, __pyx_L1_error) + __PYX_ERR(0, 247, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_gte; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 247, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7829,7 +8010,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 244, __pyx_L1_error) + __PYX_ERR(0, 247, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7842,15 +8023,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7858,7 +8039,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L40_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 244, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 247, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L41_unpacking_done; @@ -7866,7 +8047,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 244, __pyx_L1_error) + __PYX_ERR(0, 247, __pyx_L1_error) __pyx_L41_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -7874,48 +8055,48 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "hunter/_predicates.pyx":245 + /* "hunter/_predicates.pyx":248 * return False * for key, value in self.query_gte: * evalue = event[key] # <<<<<<<<<<<<<< * if not evalue >= value: * return False */ - __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error) + __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":246 + /* "hunter/_predicates.pyx":249 * for key, value in self.query_gte: * evalue = event[key] * if not evalue >= value: # <<<<<<<<<<<<<< * return False * for key, value in self.query_lt: */ - __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 246, __pyx_L1_error) + __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "hunter/_predicates.pyx":247 + /* "hunter/_predicates.pyx":250 * evalue = event[key] * if not evalue >= value: * return False # <<<<<<<<<<<<<< * for key, value in self.query_lt: * evalue = event[key] */ - __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error)) + __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":246 + /* "hunter/_predicates.pyx":249 * for key, value in self.query_gte: * evalue = event[key] * if not evalue >= value: # <<<<<<<<<<<<<< @@ -7924,36 +8105,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":244 + /* "hunter/_predicates.pyx":247 * if not evalue > value: * return False * for key, value in self.query_gte: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue >= value: */ - __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) + __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":248 + /* "hunter/_predicates.pyx":251 * if not evalue >= value: * return False * for key, value in self.query_lt: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue < value: */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) + __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_lt == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 248, __pyx_L1_error) + __PYX_ERR(0, 251, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_lt; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 251, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -7962,7 +8143,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 248, __pyx_L1_error) + __PYX_ERR(0, 251, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -7975,15 +8156,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7991,7 +8172,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L45_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 248, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 251, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L46_unpacking_done; @@ -7999,7 +8180,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 248, __pyx_L1_error) + __PYX_ERR(0, 251, __pyx_L1_error) __pyx_L46_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4); @@ -8007,48 +8188,48 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":249 + /* "hunter/_predicates.pyx":252 * return False * for key, value in self.query_lt: * evalue = event[key] # <<<<<<<<<<<<<< * if not evalue < value: * return False */ - __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) + __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":250 + /* "hunter/_predicates.pyx":253 * for key, value in self.query_lt: * evalue = event[key] * if not evalue < value: # <<<<<<<<<<<<<< * return False * for key, value in self.query_lte: */ - __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":251 + /* "hunter/_predicates.pyx":254 * evalue = event[key] * if not evalue < value: * return False # <<<<<<<<<<<<<< * for key, value in self.query_lte: * evalue = event[key] */ - __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) + __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":250 + /* "hunter/_predicates.pyx":253 * for key, value in self.query_lt: * evalue = event[key] * if not evalue < value: # <<<<<<<<<<<<<< @@ -8057,36 +8238,36 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":248 + /* "hunter/_predicates.pyx":251 * if not evalue >= value: * return False * for key, value in self.query_lt: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue < value: */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) + __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":252 + /* "hunter/_predicates.pyx":255 * if not evalue < value: * return False * for key, value in self.query_lte: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue <= value: */ - __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error)) + __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L1_error)) if (unlikely(__pyx_v_self->query_lte == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 252, __pyx_L1_error) + __PYX_ERR(0, 255, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->query_lte; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 255, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -8095,7 +8276,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 252, __pyx_L1_error) + __PYX_ERR(0, 255, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8108,15 +8289,15 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 252, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -8124,7 +8305,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L50_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 252, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 255, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L51_unpacking_done; @@ -8132,7 +8313,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 252, __pyx_L1_error) + __PYX_ERR(0, 255, __pyx_L1_error) __pyx_L51_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5); @@ -8140,48 +8321,48 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "hunter/_predicates.pyx":253 + /* "hunter/_predicates.pyx":256 * return False * for key, value in self.query_lte: * evalue = event[key] # <<<<<<<<<<<<<< * if not evalue <= value: * return False */ - __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_event), __pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_evalue, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":254 + /* "hunter/_predicates.pyx":257 * for key, value in self.query_lte: * evalue = event[key] * if not evalue <= value: # <<<<<<<<<<<<<< * return False * */ - __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 254, __pyx_L1_error) + __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_evalue, __pyx_v_value, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "hunter/_predicates.pyx":255 + /* "hunter/_predicates.pyx":258 * evalue = event[key] * if not evalue <= value: * return False # <<<<<<<<<<<<<< * * return True */ - __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L1_error)) + __Pyx_TraceLine(258,0,__PYX_ERR(0, 258, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":254 + /* "hunter/_predicates.pyx":257 * for key, value in self.query_lte: * evalue = event[key] * if not evalue <= value: # <<<<<<<<<<<<<< @@ -8190,31 +8371,31 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ */ } - /* "hunter/_predicates.pyx":252 + /* "hunter/_predicates.pyx":255 * if not evalue < value: * return False * for key, value in self.query_lte: # <<<<<<<<<<<<<< * evalue = event[key] * if not evalue <= value: */ - __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error)) + __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":257 + /* "hunter/_predicates.pyx":260 * return False * * return True # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __pyx_L1_error)) + __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; - /* "hunter/_predicates.pyx":215 + /* "hunter/_predicates.pyx":218 * return Not(self) * * cdef fast_Query_call(Query self, Event event): # <<<<<<<<<<<<<< @@ -8241,7 +8422,7 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":268 +/* "hunter/_predicates.pyx":271 * """ * * def __init__(self, condition, *actions): # <<<<<<<<<<<<<< @@ -8287,7 +8468,7 @@ static int __pyx_pw_6hunter_11_predicates_4When_1__init__(PyObject *__pyx_v_self } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 268, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) __PYX_ERR(0, 271, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -8298,7 +8479,7 @@ static int __pyx_pw_6hunter_11_predicates_4When_1__init__(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 268, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 271, __pyx_L3_error) __pyx_L3_error:; __Pyx_CLEAR(__pyx_v_actions); __Pyx_AddTraceback("hunter._predicates.When.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -8314,7 +8495,7 @@ static int __pyx_pw_6hunter_11_predicates_4When_1__init__(PyObject *__pyx_v_self } static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "hunter/_predicates.pyx":273 +/* "hunter/_predicates.pyx":276 * self.condition = condition * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action # <<<<<<<<<<<<<< @@ -8331,7 +8512,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_8__init___genexpr(PyObject if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_6_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 273, __pyx_L1_error) + __PYX_ERR(0, 276, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8339,7 +8520,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_8__init___genexpr(PyObject __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_4When_8__init___2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_4When_8__init___2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8371,7 +8552,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py int __pyx_t_9; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 273, 0, __PYX_ERR(0, 273, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 276, 0, __PYX_ERR(0, 276, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L8_resume_from_yield; @@ -8381,28 +8562,28 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 273, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 276, __pyx_L1_error) - /* "hunter/_predicates.pyx":274 + /* "hunter/_predicates.pyx":277 * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action * for action in actions) # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error)) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_actions)) { __Pyx_RaiseClosureNameError("actions"); __PYX_ERR(0, 274, __pyx_L1_error) } + __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_actions)) { __Pyx_RaiseClosureNameError("actions"); __PYX_ERR(0, 277, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_actions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 274, __pyx_L1_error) + __PYX_ERR(0, 277, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_actions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 277, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 274, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_action); @@ -8410,17 +8591,17 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":273 + /* "hunter/_predicates.pyx":276 * self.condition = condition * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action # <<<<<<<<<<<<<< * for action in actions) * */ - __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_inspect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_inspect); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isclass); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isclass); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -8435,19 +8616,19 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_cur_scope->__pyx_v_action) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_cur_scope->__pyx_v_action); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { } else { __pyx_t_4 = __pyx_t_8; goto __pyx_L6_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Action); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Action); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PyObject_IsSubclass(__pyx_cur_scope->__pyx_v_action, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_8 = PyObject_IsSubclass(__pyx_cur_scope->__pyx_v_action, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = (__pyx_t_8 != 0); __pyx_t_4 = __pyx_t_9; @@ -8466,7 +8647,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = __pyx_t_5; @@ -8492,21 +8673,21 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py __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, 273, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 276, __pyx_L1_error) - /* "hunter/_predicates.pyx":274 + /* "hunter/_predicates.pyx":277 * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action * for action in actions) # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error)) + __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "hunter/_predicates.pyx":273 + /* "hunter/_predicates.pyx":276 * self.condition = condition * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action # <<<<<<<<<<<<<< @@ -8536,7 +8717,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py return __pyx_r; } -/* "hunter/_predicates.pyx":268 +/* "hunter/_predicates.pyx":271 * """ * * def __init__(self, condition, *actions): # <<<<<<<<<<<<<< @@ -8558,42 +8739,42 @@ static int __pyx_pf_6hunter_11_predicates_4When___init__(struct __pyx_obj_6hunte if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_5___init__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 268, __pyx_L1_error) + __PYX_ERR(0, 271, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__init__", __pyx_f[0], 268, 0, __PYX_ERR(0, 268, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 271, 0, __PYX_ERR(0, 271, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_actions = __pyx_v_actions; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_actions); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_actions); - /* "hunter/_predicates.pyx":269 + /* "hunter/_predicates.pyx":272 * * def __init__(self, condition, *actions): * if not actions: # <<<<<<<<<<<<<< * raise TypeError('Must give at least one action.') * self.condition = condition */ - __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error)) + __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __pyx_L1_error)) __pyx_t_1 = (PyTuple_GET_SIZE(__pyx_cur_scope->__pyx_v_actions) != 0); __pyx_t_2 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_2)) { - /* "hunter/_predicates.pyx":270 + /* "hunter/_predicates.pyx":273 * def __init__(self, condition, *actions): * if not actions: * raise TypeError('Must give at least one action.') # <<<<<<<<<<<<<< * self.condition = condition * self.actions = tuple( */ - __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error) + __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __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, 270, __pyx_L1_error) + __PYX_ERR(0, 273, __pyx_L1_error) - /* "hunter/_predicates.pyx":269 + /* "hunter/_predicates.pyx":272 * * def __init__(self, condition, *actions): * if not actions: # <<<<<<<<<<<<<< @@ -8602,40 +8783,40 @@ static int __pyx_pf_6hunter_11_predicates_4When___init__(struct __pyx_obj_6hunte */ } - /* "hunter/_predicates.pyx":271 + /* "hunter/_predicates.pyx":274 * if not actions: * raise TypeError('Must give at least one action.') * self.condition = condition # <<<<<<<<<<<<<< * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action */ - __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __pyx_L1_error)) + __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_condition); __Pyx_GIVEREF(__pyx_v_condition); __Pyx_GOTREF(__pyx_v_self->condition); __Pyx_DECREF(__pyx_v_self->condition); __pyx_v_self->condition = __pyx_v_condition; - /* "hunter/_predicates.pyx":273 + /* "hunter/_predicates.pyx":276 * self.condition = condition * self.actions = tuple( * action() if inspect.isclass(action) and issubclass(action, Action) else action # <<<<<<<<<<<<<< * for action in actions) * */ - __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L1_error)) - __pyx_t_3 = __pyx_pf_6hunter_11_predicates_4When_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error)) + __pyx_t_3 = __pyx_pf_6hunter_11_predicates_4When_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "hunter/_predicates.pyx":272 + /* "hunter/_predicates.pyx":275 * raise TypeError('Must give at least one action.') * self.condition = condition * self.actions = tuple( # <<<<<<<<<<<<<< * action() if inspect.isclass(action) and issubclass(action, Action) else action * for action in actions) */ - __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 272, __pyx_L1_error) + __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -8644,7 +8825,7 @@ static int __pyx_pf_6hunter_11_predicates_4When___init__(struct __pyx_obj_6hunte __pyx_v_self->actions = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "hunter/_predicates.pyx":268 + /* "hunter/_predicates.pyx":271 * """ * * def __init__(self, condition, *actions): # <<<<<<<<<<<<<< @@ -8667,7 +8848,7 @@ static int __pyx_pf_6hunter_11_predicates_4When___init__(struct __pyx_obj_6hunte return __pyx_r; } -/* "hunter/_predicates.pyx":276 +/* "hunter/_predicates.pyx":279 * for action in actions) * * def __str__(self): # <<<<<<<<<<<<<< @@ -8689,7 +8870,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_4When_3__str__(PyObject *__pyx_v } static PyObject *__pyx_gb_6hunter_11_predicates_4When_7__str___2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "hunter/_predicates.pyx":279 +/* "hunter/_predicates.pyx":282 * return 'When(%s, %s)' % ( * self.condition, * ', '.join(repr(p) for p in self.actions) # <<<<<<<<<<<<<< @@ -8706,7 +8887,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_7__str___genexpr(PyObject if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 279, __pyx_L1_error) + __PYX_ERR(0, 282, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8714,7 +8895,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_7__str___genexpr(PyObject __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_4When_7__str___2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_4When_7__str___2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8740,7 +8921,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_7__str___2generator4(__pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 279, 0, __PYX_ERR(0, 279, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 282, 0, __PYX_ERR(0, 282, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; @@ -8750,26 +8931,26 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_7__str___2generator4(__pyx return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 279, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 279, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 282, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 282, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->actions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 279, __pyx_L1_error) + __PYX_ERR(0, 282, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->actions; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 282, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Repr(__pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -8788,7 +8969,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_7__str___2generator4(__pyx __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, 279, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 282, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -8812,7 +8993,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_7__str___2generator4(__pyx return __pyx_r; } -/* "hunter/_predicates.pyx":276 +/* "hunter/_predicates.pyx":279 * for action in actions) * * def __str__(self): # <<<<<<<<<<<<<< @@ -8832,48 +9013,48 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_2__str__(struct __pyx_obj_ if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_7___str__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 276, __pyx_L1_error) + __PYX_ERR(0, 279, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__str__", __pyx_f[0], 276, 0, __PYX_ERR(0, 276, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 279, 0, __PYX_ERR(0, 279, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "hunter/_predicates.pyx":277 + /* "hunter/_predicates.pyx":280 * * def __str__(self): * return 'When(%s, %s)' % ( # <<<<<<<<<<<<<< * self.condition, * ', '.join(repr(p) for p in self.actions) */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":279 + /* "hunter/_predicates.pyx":282 * return 'When(%s, %s)' % ( * self.condition, * ', '.join(repr(p) for p in self.actions) # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L1_error)) - __pyx_t_1 = __pyx_pf_6hunter_11_predicates_4When_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L1_error)) + __pyx_t_1 = __pyx_pf_6hunter_11_predicates_4When_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":278 + /* "hunter/_predicates.pyx":281 * def __str__(self): * return 'When(%s, %s)' % ( * self.condition, # <<<<<<<<<<<<<< * ', '.join(repr(p) for p in self.actions) * ) */ - __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self->condition); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self->condition); @@ -8882,22 +9063,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_2__str__(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":277 + /* "hunter/_predicates.pyx":280 * * def __str__(self): * return 'When(%s, %s)' % ( # <<<<<<<<<<<<<< * self.condition, * ', '.join(repr(p) for p in self.actions) */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_When_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_When_s_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __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; - /* "hunter/_predicates.pyx":276 + /* "hunter/_predicates.pyx":279 * for action in actions) * * def __str__(self): # <<<<<<<<<<<<<< @@ -8919,7 +9100,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_2__str__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":282 +/* "hunter/_predicates.pyx":285 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -8947,18 +9128,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_4__repr__(struct __pyx_obj PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 282, 0, __PYX_ERR(0, 282, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 285, 0, __PYX_ERR(0, 285, __pyx_L1_error)); - /* "hunter/_predicates.pyx":283 + /* "hunter/_predicates.pyx":286 * * def __repr__(self): * return '' % (self.condition, self.actions) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L1_error)) + __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->condition); __Pyx_GIVEREF(__pyx_v_self->condition); @@ -8966,14 +9147,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_4__repr__(struct __pyx_obj __Pyx_INCREF(__pyx_v_self->actions); __Pyx_GIVEREF(__pyx_v_self->actions); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->actions); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_When_conditi, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_When_conditi, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __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; - /* "hunter/_predicates.pyx":282 + /* "hunter/_predicates.pyx":285 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -8994,7 +9175,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_4__repr__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":285 +/* "hunter/_predicates.pyx":288 * return '' % (self.condition, self.actions) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -9023,46 +9204,46 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_6__eq__(struct __pyx_obj_6 int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 285, 0, __PYX_ERR(0, 285, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 288, 0, __PYX_ERR(0, 288, __pyx_L1_error)); - /* "hunter/_predicates.pyx":286 + /* "hunter/_predicates.pyx":289 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, When) * and self.condition == ( other).condition */ - __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L1_error)) + __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":287 + /* "hunter/_predicates.pyx":290 * def __eq__(self, other): * return ( * isinstance(other, When) # <<<<<<<<<<<<<< * and self.condition == ( other).condition * and self.actions == ( other).actions */ - __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L1_error)) + __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_When); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":288 + /* "hunter/_predicates.pyx":291 * return ( * isinstance(other, When) * and self.condition == ( other).condition # <<<<<<<<<<<<<< * and self.actions == ( other).actions * ) */ - __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->condition, ((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_other)->condition, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 288, __pyx_L1_error) + __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->condition, ((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_other)->condition, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 291, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -9072,15 +9253,15 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_6__eq__(struct __pyx_obj_6 goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":289 + /* "hunter/_predicates.pyx":292 * isinstance(other, When) * and self.condition == ( other).condition * and self.actions == ( other).actions # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->actions, ((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_other)->actions, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) + __Pyx_TraceLine(292,0,__PYX_ERR(0, 292, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->actions, ((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_other)->actions, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9089,7 +9270,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_6__eq__(struct __pyx_obj_6 __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":285 + /* "hunter/_predicates.pyx":288 * return '' % (self.condition, self.actions) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -9110,7 +9291,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_6__eq__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":292 +/* "hunter/_predicates.pyx":295 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -9138,17 +9319,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4When_8__hash__(struct __pyx_obj PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 292, 0, __PYX_ERR(0, 292, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 295, 0, __PYX_ERR(0, 295, __pyx_L1_error)); - /* "hunter/_predicates.pyx":293 + /* "hunter/_predicates.pyx":296 * * def __hash__(self): * return hash(('When', self.condition, self.actions)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) + __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_When); __Pyx_GIVEREF(__pyx_n_s_When); @@ -9159,12 +9340,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4When_8__hash__(struct __pyx_obj __Pyx_INCREF(__pyx_v_self->actions); __Pyx_GIVEREF(__pyx_v_self->actions); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->actions); - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":292 + /* "hunter/_predicates.pyx":295 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -9184,7 +9365,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4When_8__hash__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":295 +/* "hunter/_predicates.pyx":298 * return hash(('When', self.condition, self.actions)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -9218,7 +9399,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_4When_11__call__(PyObject *__pyx else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 295, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 298, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -9229,13 +9410,13 @@ static PyObject *__pyx_pw_6hunter_11_predicates_4When_11__call__(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 295, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 298, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._predicates.When.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 295, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 298, __pyx_L1_error) __pyx_r = __pyx_pf_6hunter_11_predicates_4When_10__call__(((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_self), __pyx_v_event); /* function exit code */ @@ -9253,24 +9434,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_10__call__(struct __pyx_ob __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 295, 0, __PYX_ERR(0, 295, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 298, 0, __PYX_ERR(0, 298, __pyx_L1_error)); - /* "hunter/_predicates.pyx":296 + /* "hunter/_predicates.pyx":299 * * def __call__(self, Event event): * return fast_When_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error)) + __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_When_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_When_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":295 + /* "hunter/_predicates.pyx":298 * return hash(('When', self.condition, self.actions)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -9290,7 +9471,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_10__call__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pyx":298 +/* "hunter/_predicates.pyx":301 * return fast_When_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -9318,18 +9499,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_12__or__(PyObject *__pyx_v PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 298, 0, __PYX_ERR(0, 298, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 301, 0, __PYX_ERR(0, 301, __pyx_L1_error)); - /* "hunter/_predicates.pyx":299 + /* "hunter/_predicates.pyx":302 * * def __or__(self, other): * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __pyx_L1_error)) + __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -9337,14 +9518,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_12__or__(PyObject *__pyx_v __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __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; - /* "hunter/_predicates.pyx":298 + /* "hunter/_predicates.pyx":301 * return fast_When_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -9365,7 +9546,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_12__or__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":301 +/* "hunter/_predicates.pyx":304 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -9393,18 +9574,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_14__and__(PyObject *__pyx_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 301, 0, __PYX_ERR(0, 301, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 304, 0, __PYX_ERR(0, 304, __pyx_L1_error)); - /* "hunter/_predicates.pyx":302 + /* "hunter/_predicates.pyx":305 * * def __and__(self, other): * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L1_error)) + __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -9412,14 +9593,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_14__and__(PyObject *__pyx_ __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":301 + /* "hunter/_predicates.pyx":304 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -9440,7 +9621,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_14__and__(PyObject *__pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":304 +/* "hunter/_predicates.pyx":307 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -9467,24 +9648,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_16__invert__(struct __pyx_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 304, 0, __PYX_ERR(0, 304, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error)); - /* "hunter/_predicates.pyx":305 + /* "hunter/_predicates.pyx":308 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef inline fast_When_call(When self, Event event): */ - __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error)) + __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":304 + /* "hunter/_predicates.pyx":307 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -9907,7 +10088,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_20__setstate_cython__(stru return __pyx_r; } -/* "hunter/_predicates.pyx":307 +/* "hunter/_predicates.pyx":310 * return Not(self) * * cdef inline fast_When_call(When self, Event event): # <<<<<<<<<<<<<< @@ -9928,67 +10109,67 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_When_call(stru PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("fast_When_call", 0); - __Pyx_TraceCall("fast_When_call", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error)); + __Pyx_TraceCall("fast_When_call", __pyx_f[0], 310, 0, __PYX_ERR(0, 310, __pyx_L1_error)); - /* "hunter/_predicates.pyx":310 + /* "hunter/_predicates.pyx":313 * cdef object result * * result = fast_call(self.condition, event) # <<<<<<<<<<<<<< * * if result: */ - __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) + __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) __pyx_t_1 = __pyx_v_self->condition; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":312 + /* "hunter/_predicates.pyx":315 * result = fast_call(self.condition, event) * * if result: # <<<<<<<<<<<<<< * for action in self.actions: * action(event) */ - __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 315, __pyx_L1_error) if (__pyx_t_3) { - /* "hunter/_predicates.pyx":313 + /* "hunter/_predicates.pyx":316 * * if result: * for action in self.actions: # <<<<<<<<<<<<<< * action(event) * */ - __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) + __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) if (unlikely(__pyx_v_self->actions == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 313, __pyx_L1_error) + __PYX_ERR(0, 316, __pyx_L1_error) } __pyx_t_2 = __pyx_v_self->actions; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 316, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XDECREF_SET(__pyx_v_action, __pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":314 + /* "hunter/_predicates.pyx":317 * if result: * for action in self.actions: * action(event) # <<<<<<<<<<<<<< * * return result */ - __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error)) + __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_action); __pyx_t_5 = __pyx_v_action; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -10002,23 +10183,23 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_When_call(stru } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_event)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":313 + /* "hunter/_predicates.pyx":316 * * if result: * for action in self.actions: # <<<<<<<<<<<<<< * action(event) * */ - __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) + __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":312 + /* "hunter/_predicates.pyx":315 * result = fast_call(self.condition, event) * * if result: # <<<<<<<<<<<<<< @@ -10027,20 +10208,20 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_When_call(stru */ } - /* "hunter/_predicates.pyx":316 + /* "hunter/_predicates.pyx":319 * action(event) * * return result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) + __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "hunter/_predicates.pyx":307 + /* "hunter/_predicates.pyx":310 * return Not(self) * * cdef inline fast_When_call(When self, Event event): # <<<<<<<<<<<<<< @@ -10065,7 +10246,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_When_call(stru return __pyx_r; } -/* "hunter/_predicates.pyx":325 +/* "hunter/_predicates.pyx":328 * """ * * def __init__(self, condition, predicate=None, watermark=0): # <<<<<<<<<<<<<< @@ -10119,7 +10300,7 @@ static int __pyx_pw_6hunter_11_predicates_4From_1__init__(PyObject *__pyx_v_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 325, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 328, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -10138,7 +10319,7 @@ static int __pyx_pw_6hunter_11_predicates_4From_1__init__(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 325, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 328, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._predicates.From.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -10157,68 +10338,68 @@ static int __pyx_pf_6hunter_11_predicates_4From___init__(struct __pyx_obj_6hunte __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 325, 0, __PYX_ERR(0, 325, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 328, 0, __PYX_ERR(0, 328, __pyx_L1_error)); - /* "hunter/_predicates.pyx":326 + /* "hunter/_predicates.pyx":329 * * def __init__(self, condition, predicate=None, watermark=0): * self.condition = condition # <<<<<<<<<<<<<< * self.predicate = predicate * self.watermark = watermark */ - __Pyx_TraceLine(326,0,__PYX_ERR(0, 326, __pyx_L1_error)) + __Pyx_TraceLine(329,0,__PYX_ERR(0, 329, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_condition); __Pyx_GIVEREF(__pyx_v_condition); __Pyx_GOTREF(__pyx_v_self->condition); __Pyx_DECREF(__pyx_v_self->condition); __pyx_v_self->condition = __pyx_v_condition; - /* "hunter/_predicates.pyx":327 + /* "hunter/_predicates.pyx":330 * def __init__(self, condition, predicate=None, watermark=0): * self.condition = condition * self.predicate = predicate # <<<<<<<<<<<<<< * self.watermark = watermark * self.origin_depth = -1 */ - __Pyx_TraceLine(327,0,__PYX_ERR(0, 327, __pyx_L1_error)) + __Pyx_TraceLine(330,0,__PYX_ERR(0, 330, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_predicate); __Pyx_GIVEREF(__pyx_v_predicate); __Pyx_GOTREF(__pyx_v_self->predicate); __Pyx_DECREF(__pyx_v_self->predicate); __pyx_v_self->predicate = __pyx_v_predicate; - /* "hunter/_predicates.pyx":328 + /* "hunter/_predicates.pyx":331 * self.condition = condition * self.predicate = predicate * self.watermark = watermark # <<<<<<<<<<<<<< * self.origin_depth = -1 * self.origin_calls = -1 */ - __Pyx_TraceLine(328,0,__PYX_ERR(0, 328, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_watermark); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 328, __pyx_L1_error) + __Pyx_TraceLine(331,0,__PYX_ERR(0, 331, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_watermark); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 331, __pyx_L1_error) __pyx_v_self->watermark = __pyx_t_1; - /* "hunter/_predicates.pyx":329 + /* "hunter/_predicates.pyx":332 * self.predicate = predicate * self.watermark = watermark * self.origin_depth = -1 # <<<<<<<<<<<<<< * self.origin_calls = -1 * */ - __Pyx_TraceLine(329,0,__PYX_ERR(0, 329, __pyx_L1_error)) + __Pyx_TraceLine(332,0,__PYX_ERR(0, 332, __pyx_L1_error)) __pyx_v_self->origin_depth = -1; - /* "hunter/_predicates.pyx":330 + /* "hunter/_predicates.pyx":333 * self.watermark = watermark * self.origin_depth = -1 * self.origin_calls = -1 # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(330,0,__PYX_ERR(0, 330, __pyx_L1_error)) + __Pyx_TraceLine(333,0,__PYX_ERR(0, 333, __pyx_L1_error)) __pyx_v_self->origin_calls = -1; - /* "hunter/_predicates.pyx":325 + /* "hunter/_predicates.pyx":328 * """ * * def __init__(self, condition, predicate=None, watermark=0): # <<<<<<<<<<<<<< @@ -10238,7 +10419,7 @@ static int __pyx_pf_6hunter_11_predicates_4From___init__(struct __pyx_obj_6hunte return __pyx_r; } -/* "hunter/_predicates.pyx":332 +/* "hunter/_predicates.pyx":335 * self.origin_calls = -1 * * def __str__(self): # <<<<<<<<<<<<<< @@ -10266,29 +10447,29 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_2__str__(struct __pyx_obj_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 332, 0, __PYX_ERR(0, 332, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 335, 0, __PYX_ERR(0, 335, __pyx_L1_error)); - /* "hunter/_predicates.pyx":333 + /* "hunter/_predicates.pyx":336 * * def __str__(self): * return 'From(%s, %s, watermark=%s)' % ( # <<<<<<<<<<<<<< * self.condition, self.predicate, self.watermark * ) */ - __Pyx_TraceLine(333,0,__PYX_ERR(0, 333, __pyx_L1_error)) + __Pyx_TraceLine(336,0,__PYX_ERR(0, 336, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":334 + /* "hunter/_predicates.pyx":337 * def __str__(self): * return 'From(%s, %s, watermark=%s)' % ( * self.condition, self.predicate, self.watermark # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(334,0,__PYX_ERR(0, 334, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->watermark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_TraceLine(337,0,__PYX_ERR(0, 337, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->watermark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->condition); __Pyx_GIVEREF(__pyx_v_self->condition); @@ -10300,22 +10481,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_2__str__(struct __pyx_obj_ PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":333 + /* "hunter/_predicates.pyx":336 * * def __str__(self): * return 'From(%s, %s, watermark=%s)' % ( # <<<<<<<<<<<<<< * self.condition, self.predicate, self.watermark * ) */ - __Pyx_TraceLine(333,0,__PYX_ERR(0, 333, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_From_s_s_watermark_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) + __Pyx_TraceLine(336,0,__PYX_ERR(0, 336, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_From_s_s_watermark_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __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; - /* "hunter/_predicates.pyx":332 + /* "hunter/_predicates.pyx":335 * self.origin_calls = -1 * * def __str__(self): # <<<<<<<<<<<<<< @@ -10336,7 +10517,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_2__str__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":337 +/* "hunter/_predicates.pyx":340 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10364,29 +10545,29 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_4__repr__(struct __pyx_obj PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 337, 0, __PYX_ERR(0, 337, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 340, 0, __PYX_ERR(0, 340, __pyx_L1_error)); - /* "hunter/_predicates.pyx":338 + /* "hunter/_predicates.pyx":341 * * def __repr__(self): * return '' % ( # <<<<<<<<<<<<<< * self.condition, self.predicate, self.watermark * ) */ - __Pyx_TraceLine(338,0,__PYX_ERR(0, 338, __pyx_L1_error)) + __Pyx_TraceLine(341,0,__PYX_ERR(0, 341, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":339 + /* "hunter/_predicates.pyx":342 * def __repr__(self): * return '' % ( * self.condition, self.predicate, self.watermark # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(339,0,__PYX_ERR(0, 339, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->watermark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) + __Pyx_TraceLine(342,0,__PYX_ERR(0, 342, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->watermark); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->condition); __Pyx_GIVEREF(__pyx_v_self->condition); @@ -10398,22 +10579,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_4__repr__(struct __pyx_obj PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":338 + /* "hunter/_predicates.pyx":341 * * def __repr__(self): * return '' % ( # <<<<<<<<<<<<<< * self.condition, self.predicate, self.watermark * ) */ - __Pyx_TraceLine(338,0,__PYX_ERR(0, 338, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_From_conditi, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_TraceLine(341,0,__PYX_ERR(0, 341, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_From_conditi, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __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; - /* "hunter/_predicates.pyx":337 + /* "hunter/_predicates.pyx":340 * ) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -10434,7 +10615,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_4__repr__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":342 +/* "hunter/_predicates.pyx":345 * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -10463,46 +10644,46 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_6__eq__(struct __pyx_obj_6 int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 342, 0, __PYX_ERR(0, 342, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 345, 0, __PYX_ERR(0, 345, __pyx_L1_error)); - /* "hunter/_predicates.pyx":343 + /* "hunter/_predicates.pyx":346 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, From) * and self.condition == ( other).condition */ - __Pyx_TraceLine(343,0,__PYX_ERR(0, 343, __pyx_L1_error)) + __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":344 + /* "hunter/_predicates.pyx":347 * def __eq__(self, other): * return ( * isinstance(other, From) # <<<<<<<<<<<<<< * and self.condition == ( other).condition * and self.predicate == ( other).predicate */ - __Pyx_TraceLine(344,0,__PYX_ERR(0, 344, __pyx_L1_error)) + __Pyx_TraceLine(347,0,__PYX_ERR(0, 347, __pyx_L1_error)) __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_From); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":345 + /* "hunter/_predicates.pyx":348 * return ( * isinstance(other, From) * and self.condition == ( other).condition # <<<<<<<<<<<<<< * and self.predicate == ( other).predicate * ) */ - __Pyx_TraceLine(345,0,__PYX_ERR(0, 345, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->condition, ((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_other)->condition, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 345, __pyx_L1_error) + __Pyx_TraceLine(348,0,__PYX_ERR(0, 348, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->condition, ((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_other)->condition, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 348, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 348, __pyx_L1_error) if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { @@ -10512,15 +10693,15 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_6__eq__(struct __pyx_obj_6 goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":346 + /* "hunter/_predicates.pyx":349 * isinstance(other, From) * and self.condition == ( other).condition * and self.predicate == ( other).predicate # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(346,0,__PYX_ERR(0, 346, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicate, ((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_other)->predicate, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 346, __pyx_L1_error) + __Pyx_TraceLine(349,0,__PYX_ERR(0, 349, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicate, ((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_other)->predicate, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10529,7 +10710,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_6__eq__(struct __pyx_obj_6 __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":342 + /* "hunter/_predicates.pyx":345 * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -10550,7 +10731,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_6__eq__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":349 +/* "hunter/_predicates.pyx":352 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -10578,17 +10759,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4From_8__hash__(struct __pyx_obj PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 349, 0, __PYX_ERR(0, 349, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 352, 0, __PYX_ERR(0, 352, __pyx_L1_error)); - /* "hunter/_predicates.pyx":350 + /* "hunter/_predicates.pyx":353 * * def __hash__(self): * return hash(('From', self.condition, self.predicate)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(350,0,__PYX_ERR(0, 350, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_TraceLine(353,0,__PYX_ERR(0, 353, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_From); __Pyx_GIVEREF(__pyx_n_s_From); @@ -10599,12 +10780,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4From_8__hash__(struct __pyx_obj __Pyx_INCREF(__pyx_v_self->predicate); __Pyx_GIVEREF(__pyx_v_self->predicate); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->predicate); - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":349 + /* "hunter/_predicates.pyx":352 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -10624,7 +10805,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4From_8__hash__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":352 +/* "hunter/_predicates.pyx":355 * return hash(('From', self.condition, self.predicate)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -10658,7 +10839,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_4From_11__call__(PyObject *__pyx else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 352, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 355, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -10669,13 +10850,13 @@ static PyObject *__pyx_pw_6hunter_11_predicates_4From_11__call__(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 355, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._predicates.From.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 352, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 355, __pyx_L1_error) __pyx_r = __pyx_pf_6hunter_11_predicates_4From_10__call__(((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_self), __pyx_v_event); /* function exit code */ @@ -10693,24 +10874,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_10__call__(struct __pyx_ob __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 352, 0, __PYX_ERR(0, 352, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 355, 0, __PYX_ERR(0, 355, __pyx_L1_error)); - /* "hunter/_predicates.pyx":353 + /* "hunter/_predicates.pyx":356 * * def __call__(self, Event event): * return fast_From_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(353,0,__PYX_ERR(0, 353, __pyx_L1_error)) + __Pyx_TraceLine(356,0,__PYX_ERR(0, 356, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_From_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_From_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":352 + /* "hunter/_predicates.pyx":355 * return hash(('From', self.condition, self.predicate)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -10730,7 +10911,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_10__call__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pyx":355 +/* "hunter/_predicates.pyx":358 * return fast_From_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -10758,18 +10939,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12__or__(PyObject *__pyx_v PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 355, 0, __PYX_ERR(0, 355, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 358, 0, __PYX_ERR(0, 358, __pyx_L1_error)); - /* "hunter/_predicates.pyx":356 + /* "hunter/_predicates.pyx":359 * * def __or__(self, other): * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(356,0,__PYX_ERR(0, 356, __pyx_L1_error)) + __Pyx_TraceLine(359,0,__PYX_ERR(0, 359, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -10777,14 +10958,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12__or__(PyObject *__pyx_v __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __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; - /* "hunter/_predicates.pyx":355 + /* "hunter/_predicates.pyx":358 * return fast_From_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -10805,7 +10986,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12__or__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":358 +/* "hunter/_predicates.pyx":361 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -10833,18 +11014,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_14__and__(PyObject *__pyx_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 358, 0, __PYX_ERR(0, 358, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 361, 0, __PYX_ERR(0, 361, __pyx_L1_error)); - /* "hunter/_predicates.pyx":359 + /* "hunter/_predicates.pyx":362 * * def __and__(self, other): * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(359,0,__PYX_ERR(0, 359, __pyx_L1_error)) + __Pyx_TraceLine(362,0,__PYX_ERR(0, 362, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -10852,14 +11033,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_14__and__(PyObject *__pyx_ __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __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; - /* "hunter/_predicates.pyx":358 + /* "hunter/_predicates.pyx":361 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -10880,7 +11061,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_14__and__(PyObject *__pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":361 +/* "hunter/_predicates.pyx":364 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -10907,24 +11088,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_16__invert__(struct __pyx_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 361, 0, __PYX_ERR(0, 361, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 364, 0, __PYX_ERR(0, 364, __pyx_L1_error)); - /* "hunter/_predicates.pyx":362 + /* "hunter/_predicates.pyx":365 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef inline fast_From_call(From self, Event event): */ - __Pyx_TraceLine(362,0,__PYX_ERR(0, 362, __pyx_L1_error)) + __Pyx_TraceLine(365,0,__PYX_ERR(0, 365, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":361 + /* "hunter/_predicates.pyx":364 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -11129,7 +11310,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12origin_depth___get__(str * readonly int origin_depth * readonly int origin_calls # <<<<<<<<<<<<<< * - * cdef fast_And_call(And self, Event event) + * @cython.final */ /* Python wrapper */ @@ -11505,7 +11686,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_20__setstate_cython__(stru return __pyx_r; } -/* "hunter/_predicates.pyx":364 +/* "hunter/_predicates.pyx":367 * return Not(self) * * cdef inline fast_From_call(From self, Event event): # <<<<<<<<<<<<<< @@ -11527,80 +11708,80 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru int __pyx_t_4; int __pyx_t_5; __Pyx_RefNannySetupContext("fast_From_call", 0); - __Pyx_TraceCall("fast_From_call", __pyx_f[0], 364, 0, __PYX_ERR(0, 364, __pyx_L1_error)); + __Pyx_TraceCall("fast_From_call", __pyx_f[0], 367, 0, __PYX_ERR(0, 367, __pyx_L1_error)); - /* "hunter/_predicates.pyx":369 + /* "hunter/_predicates.pyx":372 * cdef int delta_calls * * if self.origin_depth == -1: # <<<<<<<<<<<<<< * result = fast_call(self.condition, event) * */ - __Pyx_TraceLine(369,0,__PYX_ERR(0, 369, __pyx_L1_error)) + __Pyx_TraceLine(372,0,__PYX_ERR(0, 372, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_self->origin_depth == -1L) != 0); if (__pyx_t_1) { - /* "hunter/_predicates.pyx":370 + /* "hunter/_predicates.pyx":373 * * if self.origin_depth == -1: * result = fast_call(self.condition, event) # <<<<<<<<<<<<<< * * if result: */ - __Pyx_TraceLine(370,0,__PYX_ERR(0, 370, __pyx_L1_error)) + __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->condition; __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_2, __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_2, __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":372 + /* "hunter/_predicates.pyx":375 * result = fast_call(self.condition, event) * * if result: # <<<<<<<<<<<<<< * self.origin_depth = event.depth * self.origin_calls = event.calls */ - __Pyx_TraceLine(372,0,__PYX_ERR(0, 372, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_TraceLine(375,0,__PYX_ERR(0, 375, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 375, __pyx_L1_error) if (__pyx_t_1) { - /* "hunter/_predicates.pyx":373 + /* "hunter/_predicates.pyx":376 * * if result: * self.origin_depth = event.depth # <<<<<<<<<<<<<< * self.origin_calls = event.calls * delta_depth = delta_calls = 0 */ - __Pyx_TraceLine(373,0,__PYX_ERR(0, 373, __pyx_L1_error)) + __Pyx_TraceLine(376,0,__PYX_ERR(0, 376, __pyx_L1_error)) __pyx_t_4 = __pyx_v_event->depth; __pyx_v_self->origin_depth = __pyx_t_4; - /* "hunter/_predicates.pyx":374 + /* "hunter/_predicates.pyx":377 * if result: * self.origin_depth = event.depth * self.origin_calls = event.calls # <<<<<<<<<<<<<< * delta_depth = delta_calls = 0 * else: */ - __Pyx_TraceLine(374,0,__PYX_ERR(0, 374, __pyx_L1_error)) + __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error)) __pyx_t_4 = __pyx_v_event->calls; __pyx_v_self->origin_calls = __pyx_t_4; - /* "hunter/_predicates.pyx":375 + /* "hunter/_predicates.pyx":378 * self.origin_depth = event.depth * self.origin_calls = event.calls * delta_depth = delta_calls = 0 # <<<<<<<<<<<<<< * else: * return False */ - __Pyx_TraceLine(375,0,__PYX_ERR(0, 375, __pyx_L1_error)) + __Pyx_TraceLine(378,0,__PYX_ERR(0, 378, __pyx_L1_error)) __pyx_v_delta_depth = 0; __pyx_v_delta_calls = 0; - /* "hunter/_predicates.pyx":372 + /* "hunter/_predicates.pyx":375 * result = fast_call(self.condition, event) * * if result: # <<<<<<<<<<<<<< @@ -11610,14 +11791,14 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru goto __pyx_L4; } - /* "hunter/_predicates.pyx":377 + /* "hunter/_predicates.pyx":380 * delta_depth = delta_calls = 0 * else: * return False # <<<<<<<<<<<<<< * else: * delta_depth = event.depth - self.origin_depth */ - __Pyx_TraceLine(377,0,__PYX_ERR(0, 377, __pyx_L1_error)) + __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); @@ -11626,7 +11807,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru } __pyx_L4:; - /* "hunter/_predicates.pyx":369 + /* "hunter/_predicates.pyx":372 * cdef int delta_calls * * if self.origin_depth == -1: # <<<<<<<<<<<<<< @@ -11636,62 +11817,62 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru goto __pyx_L3; } - /* "hunter/_predicates.pyx":379 + /* "hunter/_predicates.pyx":382 * return False * else: * delta_depth = event.depth - self.origin_depth # <<<<<<<<<<<<<< * delta_calls = event.calls - self.origin_calls * if delta_depth < self.watermark: */ - __Pyx_TraceLine(379,0,__PYX_ERR(0, 379, __pyx_L1_error)) + __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error)) /*else*/ { __pyx_v_delta_depth = (__pyx_v_event->depth - __pyx_v_self->origin_depth); - /* "hunter/_predicates.pyx":380 + /* "hunter/_predicates.pyx":383 * else: * delta_depth = event.depth - self.origin_depth * delta_calls = event.calls - self.origin_calls # <<<<<<<<<<<<<< * if delta_depth < self.watermark: * self.origin_depth = -1 */ - __Pyx_TraceLine(380,0,__PYX_ERR(0, 380, __pyx_L1_error)) + __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error)) __pyx_v_delta_calls = (__pyx_v_event->calls - __pyx_v_self->origin_calls); - /* "hunter/_predicates.pyx":381 + /* "hunter/_predicates.pyx":384 * delta_depth = event.depth - self.origin_depth * delta_calls = event.calls - self.origin_calls * if delta_depth < self.watermark: # <<<<<<<<<<<<<< * self.origin_depth = -1 * return False */ - __Pyx_TraceLine(381,0,__PYX_ERR(0, 381, __pyx_L1_error)) + __Pyx_TraceLine(384,0,__PYX_ERR(0, 384, __pyx_L1_error)) __pyx_t_1 = ((__pyx_v_delta_depth < __pyx_v_self->watermark) != 0); if (__pyx_t_1) { - /* "hunter/_predicates.pyx":382 + /* "hunter/_predicates.pyx":385 * delta_calls = event.calls - self.origin_calls * if delta_depth < self.watermark: * self.origin_depth = -1 # <<<<<<<<<<<<<< * return False * */ - __Pyx_TraceLine(382,0,__PYX_ERR(0, 382, __pyx_L1_error)) + __Pyx_TraceLine(385,0,__PYX_ERR(0, 385, __pyx_L1_error)) __pyx_v_self->origin_depth = -1; - /* "hunter/_predicates.pyx":383 + /* "hunter/_predicates.pyx":386 * if delta_depth < self.watermark: * self.origin_depth = -1 * return False # <<<<<<<<<<<<<< * * if self.predicate is None: */ - __Pyx_TraceLine(383,0,__PYX_ERR(0, 383, __pyx_L1_error)) + __Pyx_TraceLine(386,0,__PYX_ERR(0, 386, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; goto __pyx_L0; - /* "hunter/_predicates.pyx":381 + /* "hunter/_predicates.pyx":384 * delta_depth = event.depth - self.origin_depth * delta_calls = event.calls - self.origin_calls * if delta_depth < self.watermark: # <<<<<<<<<<<<<< @@ -11702,32 +11883,32 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru } __pyx_L3:; - /* "hunter/_predicates.pyx":385 + /* "hunter/_predicates.pyx":388 * return False * * if self.predicate is None: # <<<<<<<<<<<<<< * return True * else: */ - __Pyx_TraceLine(385,0,__PYX_ERR(0, 385, __pyx_L1_error)) + __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_self->predicate == Py_None); __pyx_t_5 = (__pyx_t_1 != 0); if (__pyx_t_5) { - /* "hunter/_predicates.pyx":386 + /* "hunter/_predicates.pyx":389 * * if self.predicate is None: * return True # <<<<<<<<<<<<<< * else: * relative_event = event.clone() */ - __Pyx_TraceLine(386,0,__PYX_ERR(0, 386, __pyx_L1_error)) + __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; goto __pyx_L0; - /* "hunter/_predicates.pyx":385 + /* "hunter/_predicates.pyx":388 * return False * * if self.predicate is None: # <<<<<<<<<<<<<< @@ -11736,52 +11917,52 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru */ } - /* "hunter/_predicates.pyx":388 + /* "hunter/_predicates.pyx":391 * return True * else: * relative_event = event.clone() # <<<<<<<<<<<<<< * relative_event.depth = delta_depth * relative_event.calls = delta_calls */ - __Pyx_TraceLine(388,0,__PYX_ERR(0, 388, __pyx_L1_error)) + __Pyx_TraceLine(391,0,__PYX_ERR(0, 391, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->clone(__pyx_v_event)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->clone(__pyx_v_event)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_relative_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":389 + /* "hunter/_predicates.pyx":392 * else: * relative_event = event.clone() * relative_event.depth = delta_depth # <<<<<<<<<<<<<< * relative_event.calls = delta_calls * return fast_call(self.predicate, relative_event) */ - __Pyx_TraceLine(389,0,__PYX_ERR(0, 389, __pyx_L1_error)) + __Pyx_TraceLine(392,0,__PYX_ERR(0, 392, __pyx_L1_error)) __pyx_v_relative_event->depth = __pyx_v_delta_depth; - /* "hunter/_predicates.pyx":390 + /* "hunter/_predicates.pyx":393 * relative_event = event.clone() * relative_event.depth = delta_depth * relative_event.calls = delta_calls # <<<<<<<<<<<<<< * return fast_call(self.predicate, relative_event) * */ - __Pyx_TraceLine(390,0,__PYX_ERR(0, 390, __pyx_L1_error)) + __Pyx_TraceLine(393,0,__PYX_ERR(0, 393, __pyx_L1_error)) __pyx_v_relative_event->calls = __pyx_v_delta_calls; - /* "hunter/_predicates.pyx":391 + /* "hunter/_predicates.pyx":394 * relative_event.depth = delta_depth * relative_event.calls = delta_calls * return fast_call(self.predicate, relative_event) # <<<<<<<<<<<<<< * - * @cython.final + * */ - __Pyx_TraceLine(391,0,__PYX_ERR(0, 391, __pyx_L1_error)) + __Pyx_TraceLine(394,0,__PYX_ERR(0, 394, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __pyx_v_self->predicate; __Pyx_INCREF(__pyx_t_3); - __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_3, __pyx_v_relative_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_3, __pyx_v_relative_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -11789,7 +11970,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru goto __pyx_L0; } - /* "hunter/_predicates.pyx":364 + /* "hunter/_predicates.pyx":367 * return Not(self) * * cdef inline fast_From_call(From self, Event event): # <<<<<<<<<<<<<< @@ -11812,66 +11993,398 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru return __pyx_r; } -/* "hunter/_predicates.pyx":398 - * `And` predicate. Exits at the first sub-predicate that returns ``False``. - * """ - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates - * +/* "hunter/_predicates.pyx":399 + * @cython.final + * cdef class Backlog(object): + * def __init__(self, condition, size=100, stack=10, vars=False, strip=True, action=None, filter=None): # <<<<<<<<<<<<<< + * self.action = action() if inspect.isclass(action) and issubclass(action, Action) else action + * if not isinstance(self.action, ColorStreamAction): */ /* Python wrapper */ -static int __pyx_pw_6hunter_11_predicates_3And_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_6hunter_11_predicates_3And_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_predicates = 0; +static int __pyx_pw_6hunter_11_predicates_7Backlog_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6hunter_11_predicates_7Backlog_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_condition = 0; + PyObject *__pyx_v_size = 0; + PyObject *__pyx_v_stack = 0; + PyObject *__pyx_v_vars = 0; + PyObject *__pyx_v_strip = 0; + PyObject *__pyx_v_action = 0; + PyObject *__pyx_v_filter = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; - __Pyx_INCREF(__pyx_args); - __pyx_v_predicates = __pyx_args; - __pyx_r = __pyx_pf_6hunter_11_predicates_3And___init__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), __pyx_v_predicates); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_condition,&__pyx_n_s_size,&__pyx_n_s_stack,&__pyx_n_s_vars,&__pyx_n_s_strip,&__pyx_n_s_action,&__pyx_n_s_filter,0}; + PyObject* values[7] = {0,0,0,0,0,0,0}; + values[1] = ((PyObject *)__pyx_int_100); + values[2] = ((PyObject *)__pyx_int_10); + values[3] = ((PyObject *)Py_False); + values[4] = ((PyObject *)Py_True); + values[5] = ((PyObject *)Py_None); + values[6] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_condition)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stack); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vars); + if (value) { values[3] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 4: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strip); + if (value) { values[4] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 5: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_action); + if (value) { values[5] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 6: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filter); + if (value) { values[6] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 399, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); + CYTHON_FALLTHROUGH; + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); + CYTHON_FALLTHROUGH; + case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); + CYTHON_FALLTHROUGH; + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_condition = values[0]; + __pyx_v_size = values[1]; + __pyx_v_stack = values[2]; + __pyx_v_vars = values[3]; + __pyx_v_strip = values[4]; + __pyx_v_action = values[5]; + __pyx_v_filter = values[6]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 399, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("hunter._predicates.Backlog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog___init__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), __pyx_v_condition, __pyx_v_size, __pyx_v_stack, __pyx_v_vars, __pyx_v_strip, __pyx_v_action, __pyx_v_filter); /* function exit code */ - __Pyx_XDECREF(__pyx_v_predicates); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v_predicates) { +static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_condition, PyObject *__pyx_v_size, PyObject *__pyx_v_stack, PyObject *__pyx_v_vars, PyObject *__pyx_v_strip, PyObject *__pyx_v_action, PyObject *__pyx_v_filter) { int __pyx_r; __Pyx_TraceDeclarations __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; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 398, 0, __PYX_ERR(0, 398, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 399, 0, __PYX_ERR(0, 399, __pyx_L1_error)); - /* "hunter/_predicates.pyx":399 - * """ - * def __init__(self, *predicates): - * self.predicates = predicates # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":400 + * cdef class Backlog(object): + * def __init__(self, condition, size=100, stack=10, vars=False, strip=True, action=None, filter=None): + * self.action = action() if inspect.isclass(action) and issubclass(action, Action) else action # <<<<<<<<<<<<<< + * if not isinstance(self.action, ColorStreamAction): + * raise TypeError("Action %r must be a ColorStreamAction." % self.action) + */ + __Pyx_TraceLine(400,0,__PYX_ERR(0, 400, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_inspect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isclass); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_action) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_action); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_6) { + } else { + __pyx_t_2 = __pyx_t_6; + goto __pyx_L3_bool_binop_done; + } + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Action); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = PyObject_IsSubclass(__pyx_v_action, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = (__pyx_t_6 != 0); + __pyx_t_2 = __pyx_t_7; + __pyx_L3_bool_binop_done:; + if (__pyx_t_2) { + __Pyx_INCREF(__pyx_v_action); + __pyx_t_5 = __pyx_v_action; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_v_action); + __pyx_t_1 = __pyx_v_action; + } + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_self->action); + __Pyx_DECREF(__pyx_v_self->action); + __pyx_v_self->action = __pyx_t_1; + __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":401 + * def __init__(self, condition, size=100, stack=10, vars=False, strip=True, action=None, filter=None): + * self.action = action() if inspect.isclass(action) and issubclass(action, Action) else action + * if not isinstance(self.action, ColorStreamAction): # <<<<<<<<<<<<<< + * raise TypeError("Action %r must be a ColorStreamAction." % self.action) + * self.condition = condition + */ + __Pyx_TraceLine(401,0,__PYX_ERR(0, 401, __pyx_L1_error)) + __pyx_t_1 = __pyx_v_self->action; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ColorStreamAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 401, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_7 = ((!(__pyx_t_2 != 0)) != 0); + if (unlikely(__pyx_t_7)) { + + /* "hunter/_predicates.pyx":402 + * self.action = action() if inspect.isclass(action) and issubclass(action, Action) else action + * if not isinstance(self.action, ColorStreamAction): + * raise TypeError("Action %r must be a ColorStreamAction." % self.action) # <<<<<<<<<<<<<< + * self.condition = condition + * self.queue = deque(maxlen=size) + */ + __Pyx_TraceLine(402,0,__PYX_ERR(0, 402, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Action_r_must_be_a_ColorStreamAc, __pyx_v_self->action); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 402, __pyx_L1_error) + + /* "hunter/_predicates.pyx":401 + * def __init__(self, condition, size=100, stack=10, vars=False, strip=True, action=None, filter=None): + * self.action = action() if inspect.isclass(action) and issubclass(action, Action) else action + * if not isinstance(self.action, ColorStreamAction): # <<<<<<<<<<<<<< + * raise TypeError("Action %r must be a ColorStreamAction." % self.action) + * self.condition = condition + */ + } + + /* "hunter/_predicates.pyx":403 + * if not isinstance(self.action, ColorStreamAction): + * raise TypeError("Action %r must be a ColorStreamAction." % self.action) + * self.condition = condition # <<<<<<<<<<<<<< + * self.queue = deque(maxlen=size) + * self.size = size + */ + __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_condition); + __Pyx_GIVEREF(__pyx_v_condition); + __Pyx_GOTREF(__pyx_v_self->condition); + __Pyx_DECREF(__pyx_v_self->condition); + __pyx_v_self->condition = __pyx_v_condition; + + /* "hunter/_predicates.pyx":404 + * raise TypeError("Action %r must be a ColorStreamAction." % self.action) + * self.condition = condition + * self.queue = deque(maxlen=size) # <<<<<<<<<<<<<< + * self.size = size + * self.stack = stack + */ + __Pyx_TraceLine(404,0,__PYX_ERR(0, 404, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_maxlen, __pyx_v_size) < 0) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->queue); + __Pyx_DECREF(__pyx_v_self->queue); + __pyx_v_self->queue = __pyx_t_5; + __pyx_t_5 = 0; + + /* "hunter/_predicates.pyx":405 + * self.condition = condition + * self.queue = deque(maxlen=size) + * self.size = size # <<<<<<<<<<<<<< + * self.stack = stack + * self.strip = strip + */ + __Pyx_TraceLine(405,0,__PYX_ERR(0, 405, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_size); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_v_self->size = __pyx_t_8; + + /* "hunter/_predicates.pyx":406 + * self.queue = deque(maxlen=size) + * self.size = size + * self.stack = stack # <<<<<<<<<<<<<< + * self.strip = strip + * self.vars = vars + */ + __Pyx_TraceLine(406,0,__PYX_ERR(0, 406, __pyx_L1_error)) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_stack); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_v_self->stack = __pyx_t_8; + + /* "hunter/_predicates.pyx":407 + * self.size = size + * self.stack = stack + * self.strip = strip # <<<<<<<<<<<<<< + * self.vars = vars + * self._filter = filter + */ + __Pyx_TraceLine(407,0,__PYX_ERR(0, 407, __pyx_L1_error)) + if (!(likely(((__pyx_v_strip) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_strip, __pyx_ptype_7cpython_4bool_bool))))) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_5 = __pyx_v_strip; + __Pyx_INCREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->strip); + __Pyx_DECREF(((PyObject *)__pyx_v_self->strip)); + __pyx_v_self->strip = ((PyBoolObject *)__pyx_t_5); + __pyx_t_5 = 0; + + /* "hunter/_predicates.pyx":408 + * self.stack = stack + * self.strip = strip + * self.vars = vars # <<<<<<<<<<<<<< + * self._filter = filter * - * def __str__(self): */ - __Pyx_TraceLine(399,0,__PYX_ERR(0, 399, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_predicates); - __Pyx_GIVEREF(__pyx_v_predicates); - __Pyx_GOTREF(__pyx_v_self->predicates); - __Pyx_DECREF(__pyx_v_self->predicates); - __pyx_v_self->predicates = __pyx_v_predicates; + __Pyx_TraceLine(408,0,__PYX_ERR(0, 408, __pyx_L1_error)) + if (!(likely(((__pyx_v_vars) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_vars, __pyx_ptype_7cpython_4bool_bool))))) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_5 = __pyx_v_vars; + __Pyx_INCREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_v_self->vars); + __Pyx_DECREF(((PyObject *)__pyx_v_self->vars)); + __pyx_v_self->vars = ((PyBoolObject *)__pyx_t_5); + __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":398 - * `And` predicate. Exits at the first sub-predicate that returns ``False``. - * """ - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates + /* "hunter/_predicates.pyx":409 + * self.strip = strip + * self.vars = vars + * self._filter = filter # <<<<<<<<<<<<<< * + * def __call__(self, event): + */ + __Pyx_TraceLine(409,0,__PYX_ERR(0, 409, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_filter); + __Pyx_GIVEREF(__pyx_v_filter); + __Pyx_GOTREF(__pyx_v_self->_filter); + __Pyx_DECREF(__pyx_v_self->_filter); + __pyx_v_self->_filter = __pyx_v_filter; + + /* "hunter/_predicates.pyx":399 + * @cython.final + * cdef class Backlog(object): + * def __init__(self, condition, size=100, stack=10, vars=False, strip=True, action=None, filter=None): # <<<<<<<<<<<<<< + * self.action = action() if inspect.isclass(action) and issubclass(action, Action) else action + * if not isinstance(self.action, ColorStreamAction): */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.And.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.Backlog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_TraceReturn(Py_None, 0); @@ -11879,287 +12392,322 @@ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_predicates.pyx":401 - * self.predicates = predicates +/* "hunter/_predicates.pyx":411 + * self._filter = filter * - * def __str__(self): # <<<<<<<<<<<<<< - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * def __call__(self, event): # <<<<<<<<<<<<<< + * return fast_Backlog_call(self, event) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_3__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_3__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_event = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_2__str__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} -static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ - -/* "hunter/_predicates.pyx":402 - * - * def __str__(self): - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< - * - * def __repr__(self): - */ - -static PyObject *__pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(PyObject *__pyx_self) { - struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *__pyx_cur_scope; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_10_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_10_genexpr, __pyx_empty_tuple, NULL); - if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *)Py_None); - __Pyx_INCREF(Py_None); - __PYX_ERR(0, 402, __pyx_L1_error) - } else { - __Pyx_GOTREF(__pyx_cur_scope); - } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *) __pyx_self; - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_3And_7__str___2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 402, __pyx_L1_error) - __Pyx_DECREF(__pyx_cur_scope); - __Pyx_RefNannyFinishContext(); - return (PyObject *) gen; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 411, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_event = values[0]; } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 411, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("hunter._predicates.Backlog.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_2__call__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), __pyx_v_event); /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.And.__str__.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_6hunter_11_predicates_3And_7__str___2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ -{ - struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *)__pyx_generator->closure); +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_2__call__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_event) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations - PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - PyObject *__pyx_t_3 = NULL; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 402, 0, __PYX_ERR(0, 402, __pyx_L1_error)); - 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_TraceReturn(Py_None, 0); - __Pyx_RefNannyFinishContext(); - return NULL; - } - __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 402, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 402, __pyx_L1_error) } - if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->predicates == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 402, __pyx_L1_error) - } - __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->predicates; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; - for (;;) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 402, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 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_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __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; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 402, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__call__", 0); + __Pyx_TraceCall("__call__", __pyx_f[0], 411, 0, __PYX_ERR(0, 411, __pyx_L1_error)); - /* function exit code */ - PyErr_SetNone(PyExc_StopIteration); + /* "hunter/_predicates.pyx":412 + * + * def __call__(self, event): + * return fast_Backlog_call(self, event) # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + __Pyx_TraceLine(412,0,__PYX_ERR(0, 412, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + if (!(likely(((__pyx_v_event) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_event, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Backlog_call(__pyx_v_self, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_event)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 412, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; + + /* "hunter/_predicates.pyx":411 + * self._filter = filter + * + * def __call__(self, event): # <<<<<<<<<<<<<< + * return fast_Backlog_call(self, event) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_r); __pyx_r = 0; - #if !CYTHON_USE_EXC_INFO_STACK - __Pyx_Coroutine_ResetAndClearException(__pyx_generator); - #endif - __pyx_generator->resume_label = -1; - __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":401 - * self.predicates = predicates +/* "hunter/_predicates.pyx":414 + * return fast_Backlog_call(self, event) * * def __str__(self): # <<<<<<<<<<<<<< - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) - * + * return 'Backlog(%s, size=%s, stack=%s, vars=%s, action=%s, filter=%s)' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter */ -static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { - struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *__pyx_cur_scope; +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5__str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4__str__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_9___str__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_9___str__, __pyx_empty_tuple, NULL); - if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *)Py_None); - __Pyx_INCREF(Py_None); - __PYX_ERR(0, 401, __pyx_L1_error) - } else { - __Pyx_GOTREF(__pyx_cur_scope); - } - __Pyx_TraceCall("__str__", __pyx_f[0], 401, 0, __PYX_ERR(0, 401, __pyx_L1_error)); - __pyx_cur_scope->__pyx_v_self = __pyx_v_self; - __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_TraceCall("__str__", __pyx_f[0], 414, 0, __PYX_ERR(0, 414, __pyx_L1_error)); - /* "hunter/_predicates.pyx":402 + /* "hunter/_predicates.pyx":415 * * def __str__(self): - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< - * - * def __repr__(self): + * return 'Backlog(%s, size=%s, stack=%s, vars=%s, action=%s, filter=%s)' % ( # <<<<<<<<<<<<<< + * self.condition, self.size, self.stack, self.vars, self.action, self._filter + * ) */ - __Pyx_TraceLine(402,0,__PYX_ERR(0, 402, __pyx_L1_error)) + __Pyx_TraceLine(415,0,__PYX_ERR(0, 415, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) + + /* "hunter/_predicates.pyx":416 + * def __str__(self): + * return 'Backlog(%s, size=%s, stack=%s, vars=%s, action=%s, filter=%s)' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(416,0,__PYX_ERR(0, 416, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_And_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; + __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->vars)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->vars)); + PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_v_self->vars)); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->_filter); __pyx_t_1 = 0; + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":415 + * + * def __str__(self): + * return 'Backlog(%s, size=%s, stack=%s, vars=%s, action=%s, filter=%s)' % ( # <<<<<<<<<<<<<< + * self.condition, self.size, self.stack, self.vars, self.action, self._filter + * ) + */ + __Pyx_TraceLine(415,0,__PYX_ERR(0, 415, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Backlog_s_size_s_stack_s_vars_s, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __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; - /* "hunter/_predicates.pyx":401 - * self.predicates = predicates + /* "hunter/_predicates.pyx":414 + * return fast_Backlog_call(self, event) * * def __str__(self): # <<<<<<<<<<<<<< - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) - * + * return 'Backlog(%s, size=%s, stack=%s, vars=%s, action=%s, filter=%s)' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.And.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Backlog.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":404 - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) +/* "hunter/_predicates.pyx":419 + * ) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % (self.predicates,) - * + * return '' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_5__repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_5__repr__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_4__repr__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 404, 0, __PYX_ERR(0, 404, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 419, 0, __PYX_ERR(0, 419, __pyx_L1_error)); - /* "hunter/_predicates.pyx":405 + /* "hunter/_predicates.pyx":420 * * def __repr__(self): - * return '' % (self.predicates,) # <<<<<<<<<<<<<< - * - * def __eq__(self, other): + * return '' % ( # <<<<<<<<<<<<<< + * self.condition, self.size, self.stack, self.vars, self.action, self._filter + * ) */ - __Pyx_TraceLine(405,0,__PYX_ERR(0, 405, __pyx_L1_error)) + __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) + + /* "hunter/_predicates.pyx":421 + * def __repr__(self): + * return '' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_self->predicates); - __Pyx_GIVEREF(__pyx_v_self->predicates); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicates); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_And_predicat, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->vars)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->vars)); + PyTuple_SET_ITEM(__pyx_t_3, 3, ((PyObject *)__pyx_v_self->vars)); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->_filter); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":420 + * + * def __repr__(self): + * return '' % ( # <<<<<<<<<<<<<< + * self.condition, self.size, self.stack, self.vars, self.action, self._filter + * ) + */ + __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter_predicates_Backlog_condi, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __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; - /* "hunter/_predicates.pyx":404 - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + /* "hunter/_predicates.pyx":419 + * ) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % (self.predicates,) - * + * return '' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.And.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Backlog.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12168,28 +12716,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":407 - * return '' % (self.predicates,) +/* "hunter/_predicates.pyx":424 + * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, And) + * isinstance(other, Backlog) and */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_6__eq__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -12197,45 +12745,119 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 407, 0, __PYX_ERR(0, 407, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 424, 0, __PYX_ERR(0, 424, __pyx_L1_error)); - /* "hunter/_predicates.pyx":408 + /* "hunter/_predicates.pyx":425 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< - * isinstance(other, And) - * and self.predicates == ( other).predicates + * isinstance(other, Backlog) and + * self.condition == ( other).condition and */ - __Pyx_TraceLine(408,0,__PYX_ERR(0, 408, __pyx_L1_error)) + __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":409 + /* "hunter/_predicates.pyx":426 * def __eq__(self, other): * return ( - * isinstance(other, And) # <<<<<<<<<<<<<< - * and self.predicates == ( other).predicates - * ) + * isinstance(other, Backlog) and # <<<<<<<<<<<<<< + * self.condition == ( other).condition and + * self.size == ( other).size and */ - __Pyx_TraceLine(409,0,__PYX_ERR(0, 409, __pyx_L1_error)) - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_And); + __Pyx_TraceLine(426,0,__PYX_ERR(0, 426, __pyx_L1_error)) + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Backlog); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":410 + /* "hunter/_predicates.pyx":427 * return ( - * isinstance(other, And) - * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< + * isinstance(other, Backlog) and + * self.condition == ( other).condition and # <<<<<<<<<<<<<< + * self.size == ( other).size and + * self.stack == ( other).stack and + */ + __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->condition, ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->condition, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 427, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "hunter/_predicates.pyx":428 + * isinstance(other, Backlog) and + * self.condition == ( other).condition and + * self.size == ( other).size and # <<<<<<<<<<<<<< + * self.stack == ( other).stack and + * self.vars == ( other).vars and + */ + __Pyx_TraceLine(428,0,__PYX_ERR(0, 428, __pyx_L1_error)) + __pyx_t_2 = (__pyx_v_self->size == ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->size); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "hunter/_predicates.pyx":429 + * self.condition == ( other).condition and + * self.size == ( other).size and + * self.stack == ( other).stack and # <<<<<<<<<<<<<< + * self.vars == ( other).vars and + * self.action == ( other).action + */ + __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error)) + __pyx_t_2 = (__pyx_v_self->stack == ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->stack); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "hunter/_predicates.pyx":430 + * self.size == ( other).size and + * self.stack == ( other).stack and + * self.vars == ( other).vars and # <<<<<<<<<<<<<< + * self.action == ( other).action + * ) + */ + __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_v_self->vars), ((PyObject *)((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->vars), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 430, __pyx_L1_error) + if (__pyx_t_2) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } else { + __Pyx_INCREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "hunter/_predicates.pyx":431 + * self.stack == ( other).stack and + * self.vars == ( other).vars and + * self.action == ( other).action # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(410,0,__PYX_ERR(0, 410, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicates, ((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_other)->predicates, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) + __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->action, ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->action, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12244,19 +12866,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":407 - * return '' % (self.predicates,) + /* "hunter/_predicates.pyx":424 + * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, And) + * isinstance(other, Backlog) and */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.And.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12265,69 +12887,92 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":413 +/* "hunter/_predicates.pyx":434 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('And', self.predicates)) + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * */ /* Python wrapper */ -static Py_hash_t __pyx_pw_6hunter_11_predicates_3And_9__hash__(PyObject *__pyx_v_self); /*proto*/ -static Py_hash_t __pyx_pw_6hunter_11_predicates_3And_9__hash__(PyObject *__pyx_v_self) { +static Py_hash_t __pyx_pw_6hunter_11_predicates_7Backlog_11__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_6hunter_11_predicates_7Backlog_11__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_8__hash__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { +static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - Py_hash_t __pyx_t_2; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + Py_hash_t __pyx_t_4; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 413, 0, __PYX_ERR(0, 413, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 434, 0, __PYX_ERR(0, 434, __pyx_L1_error)); - /* "hunter/_predicates.pyx":414 + /* "hunter/_predicates.pyx":435 * * def __hash__(self): - * return hash(('And', self.predicates)) # <<<<<<<<<<<<<< + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) # <<<<<<<<<<<<<< * - * def __call__(self, Event event): + * def __or__(self, other): */ - __Pyx_TraceLine(414,0,__PYX_ERR(0, 414, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error) + __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_And); - __Pyx_GIVEREF(__pyx_n_s_And); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_And); - __Pyx_INCREF(__pyx_v_self->predicates); - __Pyx_GIVEREF(__pyx_v_self->predicates); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->predicates); - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 414, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_n_s_Backlog); + __Pyx_GIVEREF(__pyx_n_s_Backlog); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Backlog); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->vars)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->vars)); + PyTuple_SET_ITEM(__pyx_t_3, 4, ((PyObject *)__pyx_v_self->vars)); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_v_self->_filter); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_4 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; goto __pyx_L0; - /* "hunter/_predicates.pyx":413 + /* "hunter/_predicates.pyx":434 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('And', self.predicates)) + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.And.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Backlog.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; @@ -12336,104 +12981,73 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":416 - * return hash(('And', self.predicates)) +/* "hunter/_predicates.pyx":437 + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_And_call(self, event) + * def __or__(self, other): # <<<<<<<<<<<<<< + * return Or(self, other) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,0}; - PyObject* values[1] = {0}; - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 416, __pyx_L3_error) - } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - } - __pyx_v_event = ((struct __pyx_obj_6hunter_6_event_Event *)values[0]); - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 416, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.And.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 416, __pyx_L1_error) - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_10__call__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), __pyx_v_event); + __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 416, 0, __PYX_ERR(0, 416, __pyx_L1_error)); + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__or__", 0); + __Pyx_TraceCall("__or__", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error)); - /* "hunter/_predicates.pyx":417 - * - * def __call__(self, Event event): - * return fast_And_call(self, event) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":438 * * def __or__(self, other): + * return Or(self, other) # <<<<<<<<<<<<<< + * + * def __and__(self, other): */ - __Pyx_TraceLine(417,0,__PYX_ERR(0, 417, __pyx_L1_error)) + __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_And_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __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; - /* "hunter/_predicates.pyx":416 - * return hash(('And', self.predicates)) + /* "hunter/_predicates.pyx":437 + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_And_call(self, event) + * def __or__(self, other): # <<<<<<<<<<<<<< + * return Or(self, other) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.And.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Backlog.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12442,46 +13056,46 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":419 - * return fast_And_call(self, event) - * - * def __or__(self, other): # <<<<<<<<<<<<<< +/* "hunter/_predicates.pyx":440 * return Or(self, other) * + * def __and__(self, other): # <<<<<<<<<<<<<< + * return And(self, other) + * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __Pyx_RefNannySetupContext("__and__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 419, 0, __PYX_ERR(0, 419, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__and__", 0); + __Pyx_TraceCall("__and__", __pyx_f[0], 440, 0, __PYX_ERR(0, 440, __pyx_L1_error)); - /* "hunter/_predicates.pyx":420 - * - * def __or__(self, other): - * return Or(self, other) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":441 * * def __and__(self, other): + * return And(self, other) # <<<<<<<<<<<<<< + * + * def __invert__(self): */ - __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error)) + __Pyx_TraceLine(441,0,__PYX_ERR(0, 441, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -12489,26 +13103,26 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ __Pyx_INCREF(__pyx_v_other); __Pyx_GIVEREF(__pyx_v_other); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 441, __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; - /* "hunter/_predicates.pyx":419 - * return fast_And_call(self, event) - * - * def __or__(self, other): # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":440 * return Or(self, other) * + * def __and__(self, other): # <<<<<<<<<<<<<< + * return And(self, other) + * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.And.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12517,238 +13131,163 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":422 - * return Or(self, other) +/* "hunter/_predicates.pyx":443 + * return And(self, other) + * + * def __invert__(self): # <<<<<<<<<<<<<< + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) * - * def __and__(self, other): # <<<<<<<<<<<<<< - * cdef list predicates - * if type(self) is And: */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_17__invert__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_17__invert__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__and__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { - PyObject *__pyx_v_predicates = 0; +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 422, 0, __PYX_ERR(0, 422, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__invert__", 0); + __Pyx_TraceCall("__invert__", __pyx_f[0], 443, 0, __PYX_ERR(0, 443, __pyx_L1_error)); - /* "hunter/_predicates.pyx":424 - * def __and__(self, other): - * cdef list predicates - * if type(self) is And: # <<<<<<<<<<<<<< - * predicates = list((self).predicates) - * else: + /* "hunter/_predicates.pyx":444 + * + * def __invert__(self): + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) # <<<<<<<<<<<<<< + * + * def __ror__(self, other): */ - __Pyx_TraceLine(424,0,__PYX_ERR(0, 424, __pyx_L1_error)) - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_And)); - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { - - /* "hunter/_predicates.pyx":425 - * cdef list predicates - * if type(self) is And: - * predicates = list((self).predicates) # <<<<<<<<<<<<<< - * else: - * predicates = [self] - */ - __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error)) - __pyx_t_3 = PySequence_List(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)->predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_predicates = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; - - /* "hunter/_predicates.pyx":424 - * def __and__(self, other): - * cdef list predicates - * if type(self) is And: # <<<<<<<<<<<<<< - * predicates = list((self).predicates) - * else: - */ - goto __pyx_L3; - } - - /* "hunter/_predicates.pyx":427 - * predicates = list((self).predicates) - * else: - * predicates = [self] # <<<<<<<<<<<<<< - * if isinstance(other, And): - * predicates.extend(( other).predicates) - */ - __Pyx_TraceLine(427,0,__PYX_ERR(0, 427, __pyx_L1_error)) - /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); - __pyx_v_predicates = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; - } - __pyx_L3:; - - /* "hunter/_predicates.pyx":428 - * else: - * predicates = [self] - * if isinstance(other, And): # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) - * else: - */ - __Pyx_TraceLine(428,0,__PYX_ERR(0, 428, __pyx_L1_error)) - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_And); - __pyx_t_1 = (__pyx_t_2 != 0); - if (__pyx_t_1) { - - /* "hunter/_predicates.pyx":429 - * predicates = [self] - * if isinstance(other, And): - * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< - * else: - * predicates.append(other) - */ - __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_other)->predicates; - __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyList_Extend(__pyx_v_predicates, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 429, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "hunter/_predicates.pyx":428 - * else: - * predicates = [self] - * if isinstance(other, And): # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) - * else: - */ - goto __pyx_L4; - } - - /* "hunter/_predicates.pyx":431 - * predicates.extend(( other).predicates) - * else: - * predicates.append(other) # <<<<<<<<<<<<<< - * return And(*predicates) - * - */ - __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error)) - /*else*/ { - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_predicates, __pyx_v_other); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 431, __pyx_L1_error) - } - __pyx_L4:; - - /* "hunter/_predicates.pyx":432 - * else: - * predicates.append(other) - * return And(*predicates) # <<<<<<<<<<<<<< - * - * def __invert__(self): - */ - __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __pyx_L1_error)) + __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_v_self->condition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_3) < 0) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stack, __pyx_t_3) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vars, ((PyObject *)__pyx_v_self->vars)) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_action, __pyx_v_self->action) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_filter, __pyx_v_self->_filter) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Backlog), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __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_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":422 - * return Or(self, other) + /* "hunter/_predicates.pyx":443 + * return And(self, other) + * + * def __invert__(self): # <<<<<<<<<<<<<< + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) * - * def __and__(self, other): # <<<<<<<<<<<<<< - * cdef list predicates - * if type(self) is And: */ /* 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("hunter._predicates.And.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_predicates); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":434 - * return And(*predicates) +/* "hunter/_predicates.pyx":446 + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) * - * def __invert__(self): # <<<<<<<<<<<<<< - * return Not(self) + * def __ror__(self, other): # <<<<<<<<<<<<<< + * return Or(other, self) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_17__invert__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_17__invert__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_19__ror__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_19__ror__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_16__invert__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __Pyx_RefNannySetupContext("__ror__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 434, 0, __PYX_ERR(0, 434, __pyx_L1_error)); + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__ror__", 0); + __Pyx_TraceCall("__ror__", __pyx_f[0], 446, 0, __PYX_ERR(0, 446, __pyx_L1_error)); - /* "hunter/_predicates.pyx":435 + /* "hunter/_predicates.pyx":447 * - * def __invert__(self): - * return Not(self) # <<<<<<<<<<<<<< + * def __ror__(self, other): + * return Or(other, self) # <<<<<<<<<<<<<< * - * cdef inline fast_And_call(And self, Event event): + * def __rand__(self, other): */ - __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __pyx_L1_error)) + __Pyx_TraceLine(447,0,__PYX_ERR(0, 447, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 435, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __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; - /* "hunter/_predicates.pyx":434 - * return And(*predicates) + /* "hunter/_predicates.pyx":446 + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) * - * def __invert__(self): # <<<<<<<<<<<<<< - * return Not(self) + * def __ror__(self, other): # <<<<<<<<<<<<<< + * return Or(other, self) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.And.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Backlog.__ror__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12757,41 +13296,73 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_o return __pyx_r; } -/* "hunter/_predicates.pxd":24 - * cdef class And: - * cdef: - * readonly tuple predicates # <<<<<<<<<<<<<< +/* "hunter/_predicates.pyx":449 + * return Or(other, self) + * + * def __rand__(self, other): # <<<<<<<<<<<<<< + * return And(other, self) * - * @cython.final */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_10predicates_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_10predicates_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_21__rand__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_21__rand__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_10predicates___get__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __Pyx_RefNannySetupContext("__rand__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_20__rand__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_10predicates___get__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_20__rand__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 24, 0, __PYX_ERR(1, 24, __pyx_L1_error)); + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__rand__", 0); + __Pyx_TraceCall("__rand__", __pyx_f[0], 449, 0, __PYX_ERR(0, 449, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":450 + * + * def __rand__(self, other): + * return And(other, self) # <<<<<<<<<<<<<< + * + * def filter(self, *args, **kwargs): + */ + __Pyx_TraceLine(450,0,__PYX_ERR(0, 450, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->predicates); - __pyx_r = __pyx_v_self->predicates; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_other); + __Pyx_INCREF(((PyObject *)__pyx_v_self)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __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; + /* "hunter/_predicates.pyx":449 + * return Or(other, self) + * + * def __rand__(self, other): # <<<<<<<<<<<<<< + * return And(other, self) + * + */ + /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.And.predicates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Backlog.__rand__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -12800,112 +13371,352 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10predicates___get__(struct return __pyx_r; } -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict +/* "hunter/_predicates.pyx":452 + * return And(other, self) + * + * def filter(self, *args, **kwargs): # <<<<<<<<<<<<<< + * from hunter import _merge + * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_23filter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_23filter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_args = 0; + PyObject *__pyx_v_kwargs = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __Pyx_RefNannySetupContext("filter (wrapper)", 0); + if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "filter", 1))) return NULL; + if (unlikely(__pyx_kwds)) { + __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL; + __Pyx_GOTREF(__pyx_v_kwargs); + } else { + __pyx_v_kwargs = NULL; + } + __Pyx_INCREF(__pyx_args); + __pyx_v_args = __pyx_args; + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_22filter(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs); /* function exit code */ + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { - PyObject *__pyx_v_state = 0; - PyObject *__pyx_v__dict = 0; - int __pyx_v_use_setstate; +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_22filter(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) { + PyObject *__pyx_v__merge = NULL; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; + PyObject *__pyx_t_2 = NULL; int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + __Pyx_RefNannySetupContext("filter", 0); + __Pyx_TraceCall("filter", __pyx_f[0], 452, 0, __PYX_ERR(0, 452, __pyx_L1_error)); + __Pyx_INCREF(__pyx_v_args); - /* "(tree fragment)":5 - * cdef object _dict - * cdef bint use_setstate - * state = (self.predicates,) # <<<<<<<<<<<<<< - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: + /* "hunter/_predicates.pyx":453 + * + * def filter(self, *args, **kwargs): + * from hunter import _merge # <<<<<<<<<<<<<< + * + * if self.filter is not None: */ - __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_TraceLine(453,0,__PYX_ERR(0, 453, __pyx_L1_error)) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_self->predicates); - __Pyx_GIVEREF(__pyx_v_self->predicates); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicates); - __pyx_v_state = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "(tree fragment)":6 - * cdef bint use_setstate - * state = (self.predicates,) - * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< - * if _dict is not None: - * state += (_dict,) - */ - __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_INCREF(__pyx_n_s_merge); + __Pyx_GIVEREF(__pyx_n_s_merge); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_merge); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_hunter, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_v__dict = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_t_1); + __pyx_v__merge = __pyx_t_1; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "(tree fragment)":7 - * state = (self.predicates,) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "hunter/_predicates.pyx":455 + * from hunter import _merge + * + * if self.filter is not None: # <<<<<<<<<<<<<< + * args = (self.filter,) + args + * */ - __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) - __pyx_t_2 = (__pyx_v__dict != Py_None); - __pyx_t_3 = (__pyx_t_2 != 0); - if (__pyx_t_3) { + __Pyx_TraceLine(455,0,__PYX_ERR(0, 455, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __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; + __pyx_t_4 = (__pyx_t_3 != 0); + if (__pyx_t_4) { - /* "(tree fragment)":8 - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: - * state += (_dict,) # <<<<<<<<<<<<<< - * use_setstate = True - * else: + /* "hunter/_predicates.pyx":456 + * + * if self.filter is not None: + * args = (self.filter,) + args # <<<<<<<<<<<<<< + * + * return Backlog( */ - __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_TraceLine(456,0,__PYX_ERR(0, 456, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":455 + * from hunter import _merge + * + * if self.filter is not None: # <<<<<<<<<<<<<< + * args = (self.filter,) + args + * + */ + } + + /* "hunter/_predicates.pyx":458 + * args = (self.filter,) + args + * + * return Backlog( # <<<<<<<<<<<<<< + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, + */ + __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + + /* "hunter/_predicates.pyx":459 + * + * return Backlog( + * self.condition, # <<<<<<<<<<<<<< + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, + * filter=_merge(*args, **kwargs) + */ + __Pyx_TraceLine(459,0,__PYX_ERR(0, 459, __pyx_L1_error)) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->condition); + + /* "hunter/_predicates.pyx":460 + * return Backlog( + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, # <<<<<<<<<<<<<< + * filter=_merge(*args, **kwargs) + * ) + */ + __Pyx_TraceLine(460,0,__PYX_ERR(0, 460, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_5) < 0) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_stack, __pyx_t_5) < 0) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vars, ((PyObject *)__pyx_v_self->vars)) < 0) __PYX_ERR(0, 460, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_action, __pyx_v_self->action) < 0) __PYX_ERR(0, 460, __pyx_L1_error) + + /* "hunter/_predicates.pyx":461 + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, + * filter=_merge(*args, **kwargs) # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(461,0,__PYX_ERR(0, 461, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v__merge, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_filter, __pyx_t_5) < 0) __PYX_ERR(0, 460, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "hunter/_predicates.pyx":458 + * args = (self.filter,) + args + * + * return Backlog( # <<<<<<<<<<<<<< + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, + */ + __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error)) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Backlog), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 458, __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_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":452 + * return And(other, self) + * + * def filter(self, *args, **kwargs): # <<<<<<<<<<<<<< + * from hunter import _merge + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.Backlog.filter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_args); + __Pyx_XDECREF(__pyx_v__merge); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self._filter, self.action, self.condition, self.queue, self.size, self.stack, self.strip, self.vars) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_filter); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->condition); + __Pyx_INCREF(__pyx_v_self->queue); + __Pyx_GIVEREF(__pyx_v_self->queue); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->queue); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_self->strip)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->strip)); + PyTuple_SET_ITEM(__pyx_t_3, 6, ((PyObject *)__pyx_v_self->strip)); + __Pyx_INCREF(((PyObject *)__pyx_v_self->vars)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->vars)); + PyTuple_SET_ITEM(__pyx_t_3, 7, ((PyObject *)__pyx_v_self->vars)); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self._filter, self.action, self.condition, self.queue, self.size, self.stack, self.strip, self.vars) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) + __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v__dict = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":7 + * state = (self._filter, self.action, self.condition, self.queue, self.size, self.stack, self.strip, self.vars) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) + __pyx_t_4 = (__pyx_v__dict != Py_None); + __pyx_t_5 = (__pyx_t_4 != 0); + if (__pyx_t_5) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); - __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.predicates is not None + * use_setstate = self._filter is not None or self.action is not None or self.condition is not None or self.queue is not None or self.strip is not None or self.vars is not None */ __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.predicates,) + * state = (self._filter, self.action, self.condition, self.queue, self.size, self.stack, self.strip, self.vars) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -12917,107 +13728,145 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(struct /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< + * use_setstate = self._filter is not None or self.action is not None or self.condition is not None or self.queue is not None or self.strip is not None or self.vars is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state */ __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = (__pyx_v_self->predicates != ((PyObject*)Py_None)); - __pyx_v_use_setstate = __pyx_t_3; + __pyx_t_4 = (__pyx_v_self->_filter != Py_None); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->action != Py_None); + __pyx_t_4 = (__pyx_t_6 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (__pyx_v_self->condition != Py_None); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->queue != Py_None); + __pyx_t_4 = (__pyx_t_6 != 0); + if (!__pyx_t_4) { + } else { + __pyx_t_5 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_4 = (((PyObject *)__pyx_v_self->strip) != Py_None); + __pyx_t_6 = (__pyx_t_4 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_5 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (((PyObject *)__pyx_v_self->vars) != Py_None); + __pyx_t_4 = (__pyx_t_6 != 0); + __pyx_t_5 = __pyx_t_4; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_5; } __pyx_L3:; /* "(tree fragment)":12 * else: - * use_setstate = self.predicates is not None + * use_setstate = self._filter is not None or self.action is not None or self.condition is not None or self.queue is not None or self.strip is not None or self.vars is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state * else: */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_use_setstate != 0); - if (__pyx_t_3) { + __pyx_t_5 = (__pyx_v_use_setstate != 0); + if (__pyx_t_5) { /* "(tree fragment)":13 - * use_setstate = self.predicates is not None + * use_setstate = self._filter is not None or self.action is not None or self.condition is not None or self.queue is not None or self.strip is not None or self.vars is not None * if use_setstate: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_And); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_178834394); - __Pyx_GIVEREF(__pyx_int_178834394); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_178834394); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_61357180); + __Pyx_GIVEREF(__pyx_int_61357180); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_61357180); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); - __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: - * use_setstate = self.predicates is not None + * use_setstate = self._filter is not None or self.action is not None or self.condition is not None or self.queue is not None or self.strip is not None or self.vars is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_And__set_state(self, __pyx_state) + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) */ __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_And); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_178834394); - __Pyx_GIVEREF(__pyx_int_178834394); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_178834394); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_61357180); + __Pyx_GIVEREF(__pyx_int_61357180); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_61357180); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __pyx_t_5 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; } @@ -13030,9 +13879,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(struct /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.And.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Backlog.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); @@ -13045,25 +13894,25 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_And__set_state(self, __pyx_state) + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3And_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_26__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_26__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -13072,21 +13921,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struc __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); /* "(tree fragment)":17 - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_And__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ __Pyx_TraceLine(17,0,__PYX_ERR(2, 17, __pyx_L1_error)) if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) - __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_And__set_state(self, __pyx_state) + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) */ /* function exit code */ @@ -13094,7 +13943,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struc goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.And.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13103,262 +13952,1262 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struc return __pyx_r; } -/* "hunter/_predicates.pyx":437 - * return Not(self) +/* "hunter/_predicates.pyx":464 + * ) * - * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< - * for predicate in self.predicates: - * if not fast_call(predicate, event): + * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< + * cdef object result + * cdef Event first_event */ -static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { - PyObject *__pyx_v_predicate = NULL; +static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { + PyObject *__pyx_v_result = 0; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_first_event = 0; + PyBoolObject *__pyx_v_first_is_call = 0; + int __pyx_v_first_depth; + int __pyx_v_backlog_call_depth; + int __pyx_v_missing_depth; + int __pyx_v_depth_delta; + PyObject *__pyx_v_stack_events = 0; + PyObject *__pyx_v_detached_event = 0; + PyFrameObject *__pyx_v_frame = 0; + PyFrameObject *__pyx_v_first_frame = 0; + PyObject *__pyx_v_stack_event = NULL; + PyObject *__pyx_v_backlog_event = NULL; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; int __pyx_t_5; - __Pyx_RefNannySetupContext("fast_And_call", 0); - __Pyx_TraceCall("fast_And_call", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error)); + long __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + Py_ssize_t __pyx_t_9; + PyObject *(*__pyx_t_10)(PyObject *); + int __pyx_t_11; + int __pyx_t_12; + __Pyx_RefNannySetupContext("fast_Backlog_call", 0); + __Pyx_TraceCall("fast_Backlog_call", __pyx_f[0], 464, 0, __PYX_ERR(0, 464, __pyx_L1_error)); - /* "hunter/_predicates.pyx":438 + /* "hunter/_predicates.pyx":477 + * cdef FrameType first_frame * - * cdef inline fast_And_call(And self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if not fast_call(predicate, event): - * return False - */ - __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error)) - if (unlikely(__pyx_v_self->predicates == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 438, __pyx_L1_error) - } - __pyx_t_1 = __pyx_v_self->predicates; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; - for (;;) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 438, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XDECREF_SET(__pyx_v_predicate, __pyx_t_3); - __pyx_t_3 = 0; - - /* "hunter/_predicates.pyx":439 - * cdef inline fast_And_call(And self, Event event): - * for predicate in self.predicates: - * if not fast_call(predicate, event): # <<<<<<<<<<<<<< - * return False - * else: - */ - __Pyx_TraceLine(439,0,__PYX_ERR(0, 439, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_v_predicate, __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 439, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = ((!__pyx_t_4) != 0); - if (__pyx_t_5) { - - /* "hunter/_predicates.pyx":440 - * for predicate in self.predicates: - * if not fast_call(predicate, event): - * return False # <<<<<<<<<<<<<< - * else: - * return True + * result = fast_call(self.condition, event) # <<<<<<<<<<<<<< + * if result: + * if self.queue: */ - __Pyx_TraceLine(440,0,__PYX_ERR(0, 440, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + __Pyx_TraceLine(477,0,__PYX_ERR(0, 477, __pyx_L1_error)) + __pyx_t_1 = __pyx_v_self->condition; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_result = __pyx_t_2; + __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":439 - * cdef inline fast_And_call(And self, Event event): - * for predicate in self.predicates: - * if not fast_call(predicate, event): # <<<<<<<<<<<<<< - * return False - * else: + /* "hunter/_predicates.pyx":478 + * + * result = fast_call(self.condition, event) + * if result: # <<<<<<<<<<<<<< + * if self.queue: + * self.action.cleanup() */ - } + __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 478, __pyx_L1_error) + if (__pyx_t_3) { - /* "hunter/_predicates.pyx":438 + /* "hunter/_predicates.pyx":479 + * result = fast_call(self.condition, event) + * if result: + * if self.queue: # <<<<<<<<<<<<<< + * self.action.cleanup() * - * cdef inline fast_And_call(And self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if not fast_call(predicate, event): - * return False */ - __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error)) - } - /*else*/ { + __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->queue); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 479, __pyx_L1_error) + if (__pyx_t_3) { - /* "hunter/_predicates.pyx":442 - * return False - * else: - * return True # <<<<<<<<<<<<<< - * + /* "hunter/_predicates.pyx":480 + * if result: + * if self.queue: + * self.action.cleanup() # <<<<<<<<<<<<<< * + * first_event = self.queue[0] */ - __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error)) - __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_TraceLine(480,0,__PYX_ERR(0, 480, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_cleanup); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":482 + * self.action.cleanup() + * + * first_event = self.queue[0] # <<<<<<<<<<<<<< + * first_is_call = first_event.kind == 'call' + * first_depth = first_event.depth + */ + __Pyx_TraceLine(482,0,__PYX_ERR(0, 482, __pyx_L1_error)) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_self->queue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_v_first_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":483 + * + * first_event = self.queue[0] + * first_is_call = first_event.kind == 'call' # <<<<<<<<<<<<<< + * first_depth = first_event.depth + * backlog_call_depth = event.depth - first_depth + */ + __Pyx_TraceLine(483,0,__PYX_ERR(0, 483, __pyx_L1_error)) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_first_event->kind, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7cpython_4bool_bool)))) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_v_first_is_call = ((PyBoolObject *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":484 + * first_event = self.queue[0] + * first_is_call = first_event.kind == 'call' + * first_depth = first_event.depth # <<<<<<<<<<<<<< + * backlog_call_depth = event.depth - first_depth + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + */ + __Pyx_TraceLine(484,0,__PYX_ERR(0, 484, __pyx_L1_error)) + __pyx_t_5 = __pyx_v_first_event->depth; + __pyx_v_first_depth = __pyx_t_5; + + /* "hunter/_predicates.pyx":485 + * first_is_call = first_event.kind == 'call' + * first_depth = first_event.depth + * backlog_call_depth = event.depth - first_depth # <<<<<<<<<<<<<< + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: + */ + __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __pyx_L1_error)) + __pyx_v_backlog_call_depth = (__pyx_v_event->depth - __pyx_v_first_depth); + + /* "hunter/_predicates.pyx":486 + * first_depth = first_event.depth + * backlog_call_depth = event.depth - first_depth + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) # <<<<<<<<<<<<<< + * if missing_depth: + * if first_is_call: + */ + __Pyx_TraceLine(486,0,__PYX_ERR(0, 486, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_self->stack - __pyx_v_backlog_call_depth)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_v_first_is_call)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_6 = 0; + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_3) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_t_1; + } else { + __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_2 = __pyx_t_7; + __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_5 = __pyx_v_first_depth; + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_7, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_3) { + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_t_1; + } else { + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_missing_depth = __pyx_t_5; + + /* "hunter/_predicates.pyx":487 + * backlog_call_depth = event.depth - first_depth + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: # <<<<<<<<<<<<<< + * if first_is_call: + * first_frame = first_event.frame.f_back + */ + __Pyx_TraceLine(487,0,__PYX_ERR(0, 487, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_missing_depth != 0); + if (__pyx_t_3) { + + /* "hunter/_predicates.pyx":488 + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: + * if first_is_call: # <<<<<<<<<<<<<< + * first_frame = first_event.frame.f_back + * else: + */ + __Pyx_TraceLine(488,0,__PYX_ERR(0, 488, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_first_is_call)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 488, __pyx_L1_error) + if (__pyx_t_3) { - /* "hunter/_predicates.pyx":438 - * - * cdef inline fast_And_call(And self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if not fast_call(predicate, event): - * return False + /* "hunter/_predicates.pyx":489 + * if missing_depth: + * if first_is_call: + * first_frame = first_event.frame.f_back # <<<<<<<<<<<<<< + * else: + * first_frame = first_event.frame + */ + __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_first_event->frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_7_tracer_FrameType))))) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_v_first_frame = ((PyFrameObject *)__pyx_t_2); + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":488 + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: + * if first_is_call: # <<<<<<<<<<<<<< + * first_frame = first_event.frame.f_back + * else: */ - __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error)) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L6; + } - /* "hunter/_predicates.pyx":437 - * return Not(self) - * - * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< - * for predicate in self.predicates: - * if not fast_call(predicate, event): + /* "hunter/_predicates.pyx":491 + * first_frame = first_event.frame.f_back + * else: + * first_frame = first_event.frame # <<<<<<<<<<<<<< + * if first_frame: + * stack_events = deque() + */ + __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error)) + /*else*/ { + __pyx_t_2 = ((PyObject *)__pyx_v_first_event->frame); + __Pyx_INCREF(__pyx_t_2); + __pyx_v_first_frame = ((PyFrameObject *)__pyx_t_2); + __pyx_t_2 = 0; + } + __pyx_L6:; + + /* "hunter/_predicates.pyx":492 + * else: + * first_frame = first_event.frame + * if first_frame: # <<<<<<<<<<<<<< + * stack_events = deque() + * depth_delta = 0 + */ + __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_first_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 492, __pyx_L1_error) + if (__pyx_t_3) { + + /* "hunter/_predicates.pyx":493 + * first_frame = first_event.frame + * if first_frame: + * stack_events = deque() # <<<<<<<<<<<<<< + * depth_delta = 0 + * + */ + __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_stack_events = __pyx_t_2; + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":494 + * if first_frame: + * stack_events = deque() + * depth_delta = 0 # <<<<<<<<<<<<<< + * + * frame = first_frame + */ + __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) + __pyx_v_depth_delta = 0; + + /* "hunter/_predicates.pyx":496 + * depth_delta = 0 + * + * frame = first_frame # <<<<<<<<<<<<<< + * while first_frame and depth_delta < missing_depth: + * stack_event = Event( + */ + __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) + __Pyx_INCREF(((PyObject *)__pyx_v_first_frame)); + __pyx_v_frame = __pyx_v_first_frame; + + /* "hunter/_predicates.pyx":497 + * + * frame = first_frame + * while first_frame and depth_delta < missing_depth: # <<<<<<<<<<<<<< + * stack_event = Event( + * frame=frame, kind='call', arg=None, + */ + __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error)) + while (1) { + __pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_first_frame)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) + if (__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_8 = ((__pyx_v_depth_delta < __pyx_v_missing_depth) != 0); + __pyx_t_3 = __pyx_t_8; + __pyx_L10_bool_binop_done:; + if (!__pyx_t_3) break; + + /* "hunter/_predicates.pyx":499 + * while first_frame and depth_delta < missing_depth: + * stack_event = Event( + * frame=frame, kind='call', arg=None, # <<<<<<<<<<<<<< + * threading_support=event.threading_support, + * depth=first_depth - depth_delta - 1, calls=-1 + */ + __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_frame, ((PyObject *)__pyx_v_frame)) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_kind, __pyx_n_s_call) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_arg, Py_None) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + + /* "hunter/_predicates.pyx":500 + * stack_event = Event( + * frame=frame, kind='call', arg=None, + * threading_support=event.threading_support, # <<<<<<<<<<<<<< + * depth=first_depth - depth_delta - 1, calls=-1 + * ) + */ + __Pyx_TraceLine(500,0,__PYX_ERR(0, 500, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_event->threading_support); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_threading_support, __pyx_t_1) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":501 + * frame=frame, kind='call', arg=None, + * threading_support=event.threading_support, + * depth=first_depth - depth_delta - 1, calls=-1 # <<<<<<<<<<<<<< + * ) + * if not self.vars: + */ + __Pyx_TraceLine(501,0,__PYX_ERR(0, 501, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_long(((__pyx_v_first_depth - __pyx_v_depth_delta) - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_depth, __pyx_t_1) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_calls, __pyx_int_neg_1) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + + /* "hunter/_predicates.pyx":498 + * frame = first_frame + * while first_frame and depth_delta < missing_depth: + * stack_event = Event( # <<<<<<<<<<<<<< + * frame=frame, kind='call', arg=None, + * threading_support=event.threading_support, + */ + __Pyx_TraceLine(498,0,__PYX_ERR(0, 498, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_6_event_Event), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_v_stack_event, __pyx_t_1); + __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":503 + * depth=first_depth - depth_delta - 1, calls=-1 + * ) + * if not self.vars: # <<<<<<<<<<<<<< + * # noinspection PyPropertyAccess + * stack_event.make_fake_event() + */ + __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->vars)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_8 = ((!__pyx_t_3) != 0); + if (__pyx_t_8) { + + /* "hunter/_predicates.pyx":505 + * if not self.vars: + * # noinspection PyPropertyAccess + * stack_event.make_fake_event() # <<<<<<<<<<<<<< + * stack_events.appendleft(stack_event) + * + */ + __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stack_event, __pyx_n_s_make_fake_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":503 + * depth=first_depth - depth_delta - 1, calls=-1 + * ) + * if not self.vars: # <<<<<<<<<<<<<< + * # noinspection PyPropertyAccess + * stack_event.make_fake_event() */ + } - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.fast_And_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_predicate); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "hunter/_predicates.pyx":506 + * # noinspection PyPropertyAccess + * stack_event.make_fake_event() + * stack_events.appendleft(stack_event) # <<<<<<<<<<<<<< + * + * depth_delta += 1 + */ + __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stack_events, __pyx_n_s_appendleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_stack_event) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_stack_event); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -/* "hunter/_predicates.pyx":451 - * """ + /* "hunter/_predicates.pyx":508 + * stack_events.appendleft(stack_event) * - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates + * depth_delta += 1 # <<<<<<<<<<<<<< + * frame = first_frame.f_back * */ + __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __pyx_L1_error)) + __pyx_v_depth_delta = (__pyx_v_depth_delta + 1); -/* Python wrapper */ -static int __pyx_pw_6hunter_11_predicates_2Or_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_6hunter_11_predicates_2Or_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_predicates = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; - __Pyx_INCREF(__pyx_args); - __pyx_v_predicates = __pyx_args; - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or___init__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), __pyx_v_predicates); - - /* function exit code */ - __Pyx_XDECREF(__pyx_v_predicates); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, PyObject *__pyx_v_predicates) { - int __pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 451, 0, __PYX_ERR(0, 451, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":452 + /* "hunter/_predicates.pyx":509 * - * def __init__(self, *predicates): - * self.predicates = predicates # <<<<<<<<<<<<<< + * depth_delta += 1 + * frame = first_frame.f_back # <<<<<<<<<<<<<< * - * def __str__(self): + * for stack_event in stack_events: */ - __Pyx_TraceLine(452,0,__PYX_ERR(0, 452, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_predicates); - __Pyx_GIVEREF(__pyx_v_predicates); - __Pyx_GOTREF(__pyx_v_self->predicates); - __Pyx_DECREF(__pyx_v_self->predicates); - __pyx_v_self->predicates = __pyx_v_predicates; + __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_first_frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6hunter_7_tracer_FrameType))))) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_frame, ((PyFrameObject *)__pyx_t_1)); + __pyx_t_1 = 0; + } - /* "hunter/_predicates.pyx":451 - * """ - * - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates + /* "hunter/_predicates.pyx":511 + * frame = first_frame.f_back * + * for stack_event in stack_events: # <<<<<<<<<<<<<< + * if self._filter is None: + * self.action(stack_event) */ + __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) + if (likely(PyList_CheckExact(__pyx_v_stack_events)) || PyTuple_CheckExact(__pyx_v_stack_events)) { + __pyx_t_1 = __pyx_v_stack_events; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stack_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 511, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 511, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 511, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_10(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 511, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XDECREF_SET(__pyx_v_stack_event, __pyx_t_2); + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":512 + * + * for stack_event in stack_events: + * if self._filter is None: # <<<<<<<<<<<<<< + * self.action(stack_event) + * elif self._filter(stack_event): + */ + __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error)) + __pyx_t_8 = (__pyx_v_self->_filter == Py_None); + __pyx_t_3 = (__pyx_t_8 != 0); + if (__pyx_t_3) { + + /* "hunter/_predicates.pyx":513 + * for stack_event in stack_events: + * if self._filter is None: + * self.action(stack_event) # <<<<<<<<<<<<<< + * elif self._filter(stack_event): + * self.action(stack_event) + */ + __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_4 = __pyx_v_self->action; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_stack_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_stack_event); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":512 + * + * for stack_event in stack_events: + * if self._filter is None: # <<<<<<<<<<<<<< + * self.action(stack_event) + * elif self._filter(stack_event): + */ + goto __pyx_L15; + } - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Or.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "hunter/_predicates.pyx":514 + * if self._filter is None: + * self.action(stack_event) + * elif self._filter(stack_event): # <<<<<<<<<<<<<< + * self.action(stack_event) + * for backlog_event in self.queue: + */ + __Pyx_TraceLine(514,0,__PYX_ERR(0, 514, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_stack_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_stack_event); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "hunter/_predicates.pyx":515 + * self.action(stack_event) + * elif self._filter(stack_event): + * self.action(stack_event) # <<<<<<<<<<<<<< + * for backlog_event in self.queue: + * if self._filter is None: + */ + __Pyx_TraceLine(515,0,__PYX_ERR(0, 515, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_4 = __pyx_v_self->action; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_stack_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_stack_event); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":514 + * if self._filter is None: + * self.action(stack_event) + * elif self._filter(stack_event): # <<<<<<<<<<<<<< + * self.action(stack_event) + * for backlog_event in self.queue: + */ + } + __pyx_L15:; -/* "hunter/_predicates.pyx":454 - * self.predicates = predicates - * - * def __str__(self): # <<<<<<<<<<<<<< - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + /* "hunter/_predicates.pyx":511 + * frame = first_frame.f_back * + * for stack_event in stack_events: # <<<<<<<<<<<<<< + * if self._filter is None: + * self.action(stack_event) + */ + __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":492 + * else: + * first_frame = first_event.frame + * if first_frame: # <<<<<<<<<<<<<< + * stack_events = deque() + * depth_delta = 0 + */ + } + + /* "hunter/_predicates.pyx":487 + * backlog_call_depth = event.depth - first_depth + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: # <<<<<<<<<<<<<< + * if first_is_call: + * first_frame = first_event.frame.f_back + */ + } + + /* "hunter/_predicates.pyx":516 + * elif self._filter(stack_event): + * self.action(stack_event) + * for backlog_event in self.queue: # <<<<<<<<<<<<<< + * if self._filter is None: + * self.action(backlog_event) + */ + __Pyx_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L1_error)) + if (likely(PyList_CheckExact(__pyx_v_self->queue)) || PyTuple_CheckExact(__pyx_v_self->queue)) { + __pyx_t_1 = __pyx_v_self->queue; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { + __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 516, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_10)) { + if (likely(PyList_CheckExact(__pyx_t_1))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 516, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 516, __pyx_L1_error) + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } + } else { + __pyx_t_2 = __pyx_t_10(__pyx_t_1); + if (unlikely(!__pyx_t_2)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 516, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XDECREF_SET(__pyx_v_backlog_event, __pyx_t_2); + __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":517 + * self.action(stack_event) + * for backlog_event in self.queue: + * if self._filter is None: # <<<<<<<<<<<<<< + * self.action(backlog_event) + * elif self._filter(backlog_event): + */ + __Pyx_TraceLine(517,0,__PYX_ERR(0, 517, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_self->_filter == Py_None); + __pyx_t_8 = (__pyx_t_3 != 0); + if (__pyx_t_8) { + + /* "hunter/_predicates.pyx":518 + * for backlog_event in self.queue: + * if self._filter is None: + * self.action(backlog_event) # <<<<<<<<<<<<<< + * elif self._filter(backlog_event): + * self.action(backlog_event) + */ + __Pyx_TraceLine(518,0,__PYX_ERR(0, 518, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_4 = __pyx_v_self->action; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":517 + * self.action(stack_event) + * for backlog_event in self.queue: + * if self._filter is None: # <<<<<<<<<<<<<< + * self.action(backlog_event) + * elif self._filter(backlog_event): + */ + goto __pyx_L18; + } + + /* "hunter/_predicates.pyx":519 + * if self._filter is None: + * self.action(backlog_event) + * elif self._filter(backlog_event): # <<<<<<<<<<<<<< + * self.action(backlog_event) + * self.queue.clear() + */ + __Pyx_TraceLine(519,0,__PYX_ERR(0, 519, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 519, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_8) { + + /* "hunter/_predicates.pyx":520 + * self.action(backlog_event) + * elif self._filter(backlog_event): + * self.action(backlog_event) # <<<<<<<<<<<<<< + * self.queue.clear() + * else: + */ + __Pyx_TraceLine(520,0,__PYX_ERR(0, 520, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_4 = __pyx_v_self->action; __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":519 + * if self._filter is None: + * self.action(backlog_event) + * elif self._filter(backlog_event): # <<<<<<<<<<<<<< + * self.action(backlog_event) + * self.queue.clear() + */ + } + __pyx_L18:; + + /* "hunter/_predicates.pyx":516 + * elif self._filter(stack_event): + * self.action(stack_event) + * for backlog_event in self.queue: # <<<<<<<<<<<<<< + * if self._filter is None: + * self.action(backlog_event) + */ + __Pyx_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L1_error)) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":521 + * elif self._filter(backlog_event): + * self.action(backlog_event) + * self.queue.clear() # <<<<<<<<<<<<<< + * else: + * if self.strip and event.depth < 1: + */ + __Pyx_TraceLine(521,0,__PYX_ERR(0, 521, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->queue, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":479 + * result = fast_call(self.condition, event) + * if result: + * if self.queue: # <<<<<<<<<<<<<< + * self.action.cleanup() + * + */ + } + + /* "hunter/_predicates.pyx":478 + * + * result = fast_call(self.condition, event) + * if result: # <<<<<<<<<<<<<< + * if self.queue: + * self.action.cleanup() + */ + goto __pyx_L3; + } + + /* "hunter/_predicates.pyx":523 + * self.queue.clear() + * else: + * if self.strip and event.depth < 1: # <<<<<<<<<<<<<< + * # Looks like we're back to depth 0 for some reason. + * # Delete everything because we don't want to see what is likely just a long stream of useless returns. + */ + __Pyx_TraceLine(523,0,__PYX_ERR(0, 523, __pyx_L1_error)) + /*else*/ { + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->strip)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 523, __pyx_L1_error) + if (__pyx_t_3) { + } else { + __pyx_t_8 = __pyx_t_3; + goto __pyx_L20_bool_binop_done; + } + __pyx_t_3 = ((__pyx_v_event->depth < 1) != 0); + __pyx_t_8 = __pyx_t_3; + __pyx_L20_bool_binop_done:; + if (__pyx_t_8) { + + /* "hunter/_predicates.pyx":526 + * # Looks like we're back to depth 0 for some reason. + * # Delete everything because we don't want to see what is likely just a long stream of useless returns. + * self.queue.clear() # <<<<<<<<<<<<<< + * if self._filter is None or self._filter(event): + * detached_event = event.detach(self.action.try_repr if self.vars else None) + */ + __Pyx_TraceLine(526,0,__PYX_ERR(0, 526, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->queue, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":523 + * self.queue.clear() + * else: + * if self.strip and event.depth < 1: # <<<<<<<<<<<<<< + * # Looks like we're back to depth 0 for some reason. + * # Delete everything because we don't want to see what is likely just a long stream of useless returns. + */ + } + + /* "hunter/_predicates.pyx":527 + * # Delete everything because we don't want to see what is likely just a long stream of useless returns. + * self.queue.clear() + * if self._filter is None or self._filter(event): # <<<<<<<<<<<<<< + * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.set_frame(event.frame) + */ + __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_self->_filter == Py_None); + __pyx_t_11 = (__pyx_t_3 != 0); + if (!__pyx_t_11) { + } else { + __pyx_t_8 = __pyx_t_11; + goto __pyx_L23_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_t_2 = __pyx_v_self->_filter; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_v_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_event)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __pyx_t_11; + __pyx_L23_bool_binop_done:; + if (__pyx_t_8) { + + /* "hunter/_predicates.pyx":528 + * self.queue.clear() + * if self._filter is None or self._filter(event): + * detached_event = event.detach(self.action.try_repr if self.vars else None) # <<<<<<<<<<<<<< + * detached_event.set_frame(event.frame) + * self.queue.append(detached_event) + */ + __Pyx_TraceLine(528,0,__PYX_ERR(0, 528, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_event), __pyx_n_s_detach); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->vars)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 528, __pyx_L1_error) + if (__pyx_t_8) { + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_4 = __pyx_t_7; + __pyx_t_7 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_4 = Py_None; + } + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_detached_event = __pyx_t_1; + __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":529 + * if self._filter is None or self._filter(event): + * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.set_frame(event.frame) # <<<<<<<<<<<<<< + * self.queue.append(detached_event) + * + */ + __Pyx_TraceLine(529,0,__PYX_ERR(0, 529, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_detached_event, __pyx_n_s_set_frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_v_event->frame)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_event->frame)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":530 + * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.set_frame(event.frame) + * self.queue.append(detached_event) # <<<<<<<<<<<<<< + * + * return result + */ + __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_v_self->queue, __pyx_v_detached_event); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 530, __pyx_L1_error) + + /* "hunter/_predicates.pyx":527 + * # Delete everything because we don't want to see what is likely just a long stream of useless returns. + * self.queue.clear() + * if self._filter is None or self._filter(event): # <<<<<<<<<<<<<< + * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.set_frame(event.frame) + */ + } + } + __pyx_L3:; + + /* "hunter/_predicates.pyx":532 + * self.queue.append(detached_event) + * + * return result # <<<<<<<<<<<<<< + * + * + */ + __Pyx_TraceLine(532,0,__PYX_ERR(0, 532, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":464 + * ) + * + * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< + * cdef object result + * cdef Event first_event */ -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_3__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_3__str__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_2__str__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_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_7); + __Pyx_AddTraceback("hunter._predicates.fast_Backlog_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF((PyObject *)__pyx_v_first_event); + __Pyx_XDECREF((PyObject *)__pyx_v_first_is_call); + __Pyx_XDECREF(__pyx_v_stack_events); + __Pyx_XDECREF(__pyx_v_detached_event); + __Pyx_XDECREF((PyObject *)__pyx_v_frame); + __Pyx_XDECREF((PyObject *)__pyx_v_first_frame); + __Pyx_XDECREF(__pyx_v_stack_event); + __Pyx_XDECREF(__pyx_v_backlog_event); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "hunter/_predicates.pyx":455 +/* "hunter/_predicates.pyx":540 + * `And` predicate. Exits at the first sub-predicate that returns ``False``. + * """ + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates + * + */ + +/* Python wrapper */ +static int __pyx_pw_6hunter_11_predicates_3And_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6hunter_11_predicates_3And_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_predicates = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; + __Pyx_INCREF(__pyx_args); + __pyx_v_predicates = __pyx_args; + __pyx_r = __pyx_pf_6hunter_11_predicates_3And___init__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), __pyx_v_predicates); + + /* function exit code */ + __Pyx_XDECREF(__pyx_v_predicates); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v_predicates) { + int __pyx_r; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_TraceCall("__init__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":541 + * """ + * def __init__(self, *predicates): + * self.predicates = predicates # <<<<<<<<<<<<<< * * def __str__(self): - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< + */ + __Pyx_TraceLine(541,0,__PYX_ERR(0, 541, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_predicates); + __Pyx_GIVEREF(__pyx_v_predicates); + __Pyx_GOTREF(__pyx_v_self->predicates); + __Pyx_DECREF(__pyx_v_self->predicates); + __pyx_v_self->predicates = __pyx_v_predicates; + + /* "hunter/_predicates.pyx":540 + * `And` predicate. Exits at the first sub-predicate that returns ``False``. + * """ + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates + * + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.And.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_TraceReturn(Py_None, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":543 + * self.predicates = predicates + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_3__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_3__str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_2__str__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} +static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ + +/* "hunter/_predicates.pyx":544 + * + * def __str__(self): + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *__pyx_self) { - struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *__pyx_cur_scope; +static PyObject *__pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(PyObject *__pyx_self) { + struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_12_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_10_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_10_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 455, __pyx_L1_error) + __PYX_ERR(0, 544, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_3And_7__str___2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -13366,7 +15215,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *_ /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Or.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); @@ -13374,9 +15223,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *_ return __pyx_r; } -static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *)__pyx_generator->closure); + struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; @@ -13384,7 +15233,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C PyObject *__pyx_t_3 = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 455, 0, __PYX_ERR(0, 455, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; @@ -13394,26 +15243,26 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 455, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 455, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 544, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 544, __pyx_L1_error) } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->predicates == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 455, __pyx_L1_error) + __PYX_ERR(0, 544, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->predicates; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 544, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -13432,7 +15281,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C __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, 455, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 544, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -13456,61 +15305,61 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C return __pyx_r; } -/* "hunter/_predicates.pyx":454 +/* "hunter/_predicates.pyx":543 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * */ -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { - struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *__pyx_cur_scope; - PyObject *__pyx_r = NULL; +static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { + struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *__pyx_cur_scope; + PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_11___str__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_11___str__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_9___str__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_9___str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 454, __pyx_L1_error) + __PYX_ERR(0, 543, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__str__", __pyx_f[0], 454, 0, __PYX_ERR(0, 454, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 543, 0, __PYX_ERR(0, 543, __pyx_L1_error)); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "hunter/_predicates.pyx":455 + /* "hunter/_predicates.pyx":544 * * def __str__(self): - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(455,0,__PYX_ERR(0, 455, __pyx_L1_error)) + __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Or_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_And_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __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; - /* "hunter/_predicates.pyx":454 + /* "hunter/_predicates.pyx":543 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * */ @@ -13518,7 +15367,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.Or.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -13528,62 +15377,62 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":457 - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) +/* "hunter/_predicates.pyx":546 + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % (self.predicates,) + * return '' % (self.predicates,) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_5__repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_5__repr__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_5__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_4__repr__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_4__repr__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 457, 0, __PYX_ERR(0, 457, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __pyx_L1_error)); - /* "hunter/_predicates.pyx":458 + /* "hunter/_predicates.pyx":547 * * def __repr__(self): - * return '' % (self.predicates,) # <<<<<<<<<<<<<< + * return '' % (self.predicates,) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(458,0,__PYX_ERR(0, 458, __pyx_L1_error)) + __Pyx_TraceLine(547,0,__PYX_ERR(0, 547, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->predicates); __Pyx_GIVEREF(__pyx_v_self->predicates); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicates); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_Or_predicate, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_And_predicat, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __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; - /* "hunter/_predicates.pyx":457 - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + /* "hunter/_predicates.pyx":546 + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % (self.predicates,) + * return '' % (self.predicates,) * */ @@ -13591,7 +15440,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.Or.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13600,28 +15449,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":460 - * return '' % (self.predicates,) +/* "hunter/_predicates.pyx":549 + * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Or) + * isinstance(other, And) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_6__eq__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_6__eq__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -13629,45 +15478,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 460, 0, __PYX_ERR(0, 460, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 549, 0, __PYX_ERR(0, 549, __pyx_L1_error)); - /* "hunter/_predicates.pyx":461 + /* "hunter/_predicates.pyx":550 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< - * isinstance(other, Or) - * and self.predicates == ( other).predicates + * isinstance(other, And) + * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(461,0,__PYX_ERR(0, 461, __pyx_L1_error)) + __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":462 + /* "hunter/_predicates.pyx":551 * def __eq__(self, other): * return ( - * isinstance(other, Or) # <<<<<<<<<<<<<< - * and self.predicates == ( other).predicates + * isinstance(other, And) # <<<<<<<<<<<<<< + * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(462,0,__PYX_ERR(0, 462, __pyx_L1_error)) - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Or); + __Pyx_TraceLine(551,0,__PYX_ERR(0, 551, __pyx_L1_error)) + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_And); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":463 + /* "hunter/_predicates.pyx":552 * return ( - * isinstance(other, Or) - * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< + * isinstance(other, And) + * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(463,0,__PYX_ERR(0, 463, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicates, ((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_other)->predicates, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_TraceLine(552,0,__PYX_ERR(0, 552, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicates, ((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_other)->predicates, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13676,19 +15525,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":460 - * return '' % (self.predicates,) + /* "hunter/_predicates.pyx":549 + * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Or) + * isinstance(other, And) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.Or.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13697,69 +15546,69 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu return __pyx_r; } -/* "hunter/_predicates.pyx":466 +/* "hunter/_predicates.pyx":555 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Or', self.predicates)) + * return hash(('And', self.predicates)) * */ /* Python wrapper */ -static Py_hash_t __pyx_pw_6hunter_11_predicates_2Or_9__hash__(PyObject *__pyx_v_self); /*proto*/ -static Py_hash_t __pyx_pw_6hunter_11_predicates_2Or_9__hash__(PyObject *__pyx_v_self) { +static Py_hash_t __pyx_pw_6hunter_11_predicates_3And_9__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_6hunter_11_predicates_3And_9__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_8__hash__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_8__hash__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { +static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 466, 0, __PYX_ERR(0, 466, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 555, 0, __PYX_ERR(0, 555, __pyx_L1_error)); - /* "hunter/_predicates.pyx":467 + /* "hunter/_predicates.pyx":556 * * def __hash__(self): - * return hash(('Or', self.predicates)) # <<<<<<<<<<<<<< + * return hash(('And', self.predicates)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(467,0,__PYX_ERR(0, 467, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error) + __Pyx_TraceLine(556,0,__PYX_ERR(0, 556, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_Or); - __Pyx_GIVEREF(__pyx_n_s_Or); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Or); + __Pyx_INCREF(__pyx_n_s_And); + __Pyx_GIVEREF(__pyx_n_s_And); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_And); __Pyx_INCREF(__pyx_v_self->predicates); __Pyx_GIVEREF(__pyx_v_self->predicates); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->predicates); - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":466 + /* "hunter/_predicates.pyx":555 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Or', self.predicates)) + * return hash(('And', self.predicates)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Or.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; @@ -13768,17 +15617,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":469 - * return hash(('Or', self.predicates)) +/* "hunter/_predicates.pyx":558 + * return hash(('And', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Or_call(self, event) + * return fast_And_call(self, event) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -13802,7 +15651,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 469, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 558, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -13813,14 +15662,14 @@ static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 469, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 558, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.Or.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 469, __pyx_L1_error) - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_10__call__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), __pyx_v_event); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_10__call__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), __pyx_v_event); /* function exit code */ goto __pyx_L0; @@ -13831,41 +15680,41 @@ static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 469, 0, __PYX_ERR(0, 469, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __pyx_L1_error)); - /* "hunter/_predicates.pyx":470 + /* "hunter/_predicates.pyx":559 * * def __call__(self, Event event): - * return fast_Or_call(self, event) # <<<<<<<<<<<<<< + * return fast_And_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(470,0,__PYX_ERR(0, 470, __pyx_L1_error)) + __Pyx_TraceLine(559,0,__PYX_ERR(0, 559, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Or_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_And_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":469 - * return hash(('Or', self.predicates)) + /* "hunter/_predicates.pyx":558 + * return hash(('And', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Or_call(self, event) + * return fast_And_call(self, event) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Or.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13874,28 +15723,103 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":472 - * return fast_Or_call(self, event) +/* "hunter/_predicates.pyx":561 + * return fast_And_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< - * cdef list predicates - * if type(self) is Or: + * return Or(self, other) + * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("__or__", 0); + __Pyx_TraceCall("__or__", __pyx_f[0], 561, 0, __PYX_ERR(0, 561, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":562 + * + * def __or__(self, other): + * return Or(self, other) # <<<<<<<<<<<<<< + * + * def __and__(self, other): + */ + __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __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; + + /* "hunter/_predicates.pyx":561 + * return fast_And_call(self, event) + * + * def __or__(self, other): # <<<<<<<<<<<<<< + * return Or(self, other) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.And.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":564 + * return Or(self, other) + * + * def __and__(self, other): # <<<<<<<<<<<<<< + * cdef list predicates + * if type(self) is And: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__and__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_v_predicates = 0; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations @@ -13905,54 +15829,54 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 472, 0, __PYX_ERR(0, 472, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__and__", 0); + __Pyx_TraceCall("__and__", __pyx_f[0], 564, 0, __PYX_ERR(0, 564, __pyx_L1_error)); - /* "hunter/_predicates.pyx":474 - * def __or__(self, other): + /* "hunter/_predicates.pyx":566 + * def __and__(self, other): * cdef list predicates - * if type(self) is Or: # <<<<<<<<<<<<<< - * predicates = list(( self).predicates) + * if type(self) is And: # <<<<<<<<<<<<<< + * predicates = list((self).predicates) * else: */ - __Pyx_TraceLine(474,0,__PYX_ERR(0, 474, __pyx_L1_error)) - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Or)); + __Pyx_TraceLine(566,0,__PYX_ERR(0, 566, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_And)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "hunter/_predicates.pyx":475 + /* "hunter/_predicates.pyx":567 * cdef list predicates - * if type(self) is Or: - * predicates = list(( self).predicates) # <<<<<<<<<<<<<< + * if type(self) is And: + * predicates = list((self).predicates) # <<<<<<<<<<<<<< * else: * predicates = [self] */ - __Pyx_TraceLine(475,0,__PYX_ERR(0, 475, __pyx_L1_error)) - __pyx_t_3 = PySequence_List(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)->predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 475, __pyx_L1_error) + __Pyx_TraceLine(567,0,__PYX_ERR(0, 567, __pyx_L1_error)) + __pyx_t_3 = PySequence_List(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)->predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_predicates = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":474 - * def __or__(self, other): + /* "hunter/_predicates.pyx":566 + * def __and__(self, other): * cdef list predicates - * if type(self) is Or: # <<<<<<<<<<<<<< - * predicates = list(( self).predicates) + * if type(self) is And: # <<<<<<<<<<<<<< + * predicates = list((self).predicates) * else: */ goto __pyx_L3; } - /* "hunter/_predicates.pyx":477 - * predicates = list(( self).predicates) + /* "hunter/_predicates.pyx":569 + * predicates = list((self).predicates) * else: * predicates = [self] # <<<<<<<<<<<<<< - * if type(other) is Or: - * predicates.extend(( other).predicates) + * if isinstance(other, And): + * predicates.extend(( other).predicates) */ - __Pyx_TraceLine(477,0,__PYX_ERR(0, 477, __pyx_L1_error)) + __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -13962,85 +15886,85 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s } __pyx_L3:; - /* "hunter/_predicates.pyx":478 + /* "hunter/_predicates.pyx":570 * else: * predicates = [self] - * if type(other) is Or: # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) + * if isinstance(other, And): # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) * else: */ - __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __pyx_L1_error)) - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Or)); + __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error)) + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_And); __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_predicates.pyx":479 + /* "hunter/_predicates.pyx":571 * predicates = [self] - * if type(other) is Or: - * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< + * if isinstance(other, And): + * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< * else: * predicates.append(other) */ - __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __pyx_L1_error)) - __pyx_t_3 = ((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_other)->predicates; + __Pyx_TraceLine(571,0,__PYX_ERR(0, 571, __pyx_L1_error)) + __pyx_t_3 = ((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_other)->predicates; __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyList_Extend(__pyx_v_predicates, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Extend(__pyx_v_predicates, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":478 + /* "hunter/_predicates.pyx":570 * else: * predicates = [self] - * if type(other) is Or: # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) + * if isinstance(other, And): # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) * else: */ goto __pyx_L4; } - /* "hunter/_predicates.pyx":481 - * predicates.extend(( other).predicates) + /* "hunter/_predicates.pyx":573 + * predicates.extend(( other).predicates) * else: * predicates.append(other) # <<<<<<<<<<<<<< - * return Or(*predicates) + * return And(*predicates) * */ - __Pyx_TraceLine(481,0,__PYX_ERR(0, 481, __pyx_L1_error)) + __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __pyx_L1_error)) /*else*/ { - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_predicates, __pyx_v_other); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 481, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_predicates, __pyx_v_other); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 573, __pyx_L1_error) } __pyx_L4:; - /* "hunter/_predicates.pyx":482 + /* "hunter/_predicates.pyx":574 * else: * predicates.append(other) - * return Or(*predicates) # <<<<<<<<<<<<<< + * return And(*predicates) # <<<<<<<<<<<<<< * - * def __and__(self, other): + * def __invert__(self): */ - __Pyx_TraceLine(482,0,__PYX_ERR(0, 482, __pyx_L1_error)) + __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":472 - * return fast_Or_call(self, event) + /* "hunter/_predicates.pyx":564 + * return Or(self, other) * - * def __or__(self, other): # <<<<<<<<<<<<<< + * def __and__(self, other): # <<<<<<<<<<<<<< * cdef list predicates - * if type(self) is Or: + * if type(self) is And: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Or.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_predicates); @@ -14050,83 +15974,8 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s return __pyx_r; } -/* "hunter/_predicates.pyx":484 - * return Or(*predicates) - * - * def __and__(self, other): # <<<<<<<<<<<<<< - * return And(self, other) - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__and__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 484, 0, __PYX_ERR(0, 484, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":485 - * - * def __and__(self, other): - * return And(self, other) # <<<<<<<<<<<<<< - * - * def __invert__(self): - */ - __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); - __Pyx_INCREF(__pyx_v_other); - __Pyx_GIVEREF(__pyx_v_other); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __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; - - /* "hunter/_predicates.pyx":484 - * return Or(*predicates) - * - * def __and__(self, other): # <<<<<<<<<<<<<< - * return And(self, other) - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.Or.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "hunter/_predicates.pyx":487 - * return And(self, other) +/* "hunter/_predicates.pyx":576 + * return And(*predicates) * * def __invert__(self): # <<<<<<<<<<<<<< * return Not(self) @@ -14134,43 +15983,43 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_17__invert__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_17__invert__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_17__invert__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_17__invert__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_16__invert__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_16__invert__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 487, 0, __PYX_ERR(0, 487, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 576, 0, __PYX_ERR(0, 576, __pyx_L1_error)); - /* "hunter/_predicates.pyx":488 + /* "hunter/_predicates.pyx":577 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * - * cdef inline fast_Or_call(Or self, Event event): + * cdef inline fast_And_call(And self, Event event): */ - __Pyx_TraceLine(488,0,__PYX_ERR(0, 488, __pyx_L1_error)) + __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":487 - * return And(self, other) + /* "hunter/_predicates.pyx":576 + * return And(*predicates) * * def __invert__(self): # <<<<<<<<<<<<<< * return Not(self) @@ -14180,7 +16029,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Or.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -14189,8 +16038,8 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pxd":29 - * cdef class Or: +/* "hunter/_predicates.pxd":24 + * cdef class And: * cdef: * readonly tuple predicates # <<<<<<<<<<<<<< * @@ -14198,24 +16047,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_10predicates_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_10predicates_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_10predicates_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_10predicates_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_10predicates___get__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_10predicates___get__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 29, 0, __PYX_ERR(1, 29, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[1], 24, 0, __PYX_ERR(1, 24, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->predicates); __pyx_r = __pyx_v_self->predicates; @@ -14223,7 +16072,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(struct /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Or.predicates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.predicates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -14239,19 +16088,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(struct */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -14351,7 +16200,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ * else: * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state */ __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) /*else*/ { @@ -14364,7 +16213,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ * else: * use_setstate = self.predicates is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state * else: */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) @@ -14374,13 +16223,13 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ /* "(tree fragment)":13 * use_setstate = self.predicates is not None * if use_setstate: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Or); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_And); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -14412,22 +16261,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ * else: * use_setstate = self.predicates is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Or__set_state(self, __pyx_state) + * __pyx_unpickle_And__set_state(self, __pyx_state) */ __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Or); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_And); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -14464,7 +16313,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Or.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); @@ -14477,25 +16326,25 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Or__set_state(self, __pyx_state) + * __pyx_unpickle_And__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_2Or_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_6hunter_11_predicates_3And_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3And_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -14504,21 +16353,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); /* "(tree fragment)":17 - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Or__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_And__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ __Pyx_TraceLine(17,0,__PYX_ERR(2, 17, __pyx_L1_error)) if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) - __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Or__set_state(self, __pyx_state) + * __pyx_unpickle_And__set_state(self, __pyx_state) */ /* function exit code */ @@ -14526,7 +16375,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Or.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -14535,15 +16384,15 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct return __pyx_r; } -/* "hunter/_predicates.pyx":490 +/* "hunter/_predicates.pyx":579 * return Not(self) * - * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< + * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: - * if fast_call(predicate, event): + * if not fast_call(predicate, event): */ -static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { +static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { PyObject *__pyx_v_predicate = NULL; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations @@ -14552,119 +16401,121 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; - __Pyx_RefNannySetupContext("fast_Or_call", 0); - __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 490, 0, __PYX_ERR(0, 490, __pyx_L1_error)); + int __pyx_t_5; + __Pyx_RefNannySetupContext("fast_And_call", 0); + __Pyx_TraceCall("fast_And_call", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error)); - /* "hunter/_predicates.pyx":491 + /* "hunter/_predicates.pyx":580 * - * cdef inline fast_Or_call(Or self, Event event): + * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if fast_call(predicate, event): - * return True + * if not fast_call(predicate, event): + * return False */ - __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error)) + __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) if (unlikely(__pyx_v_self->predicates == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 491, __pyx_L1_error) + __PYX_ERR(0, 580, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->predicates; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 580, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_predicate, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":492 - * cdef inline fast_Or_call(Or self, Event event): + /* "hunter/_predicates.pyx":581 + * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: - * if fast_call(predicate, event): # <<<<<<<<<<<<<< - * return True + * if not fast_call(predicate, event): # <<<<<<<<<<<<<< + * return False * else: */ - __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error)) - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_v_predicate, __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L1_error) + __Pyx_TraceLine(581,0,__PYX_ERR(0, 581, __pyx_L1_error)) + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_v_predicate, __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { - /* "hunter/_predicates.pyx":493 + /* "hunter/_predicates.pyx":582 * for predicate in self.predicates: - * if fast_call(predicate, event): - * return True # <<<<<<<<<<<<<< + * if not fast_call(predicate, event): + * return False # <<<<<<<<<<<<<< * else: - * return False + * return True */ - __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error)) + __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_True); - __pyx_r = Py_True; + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":492 - * cdef inline fast_Or_call(Or self, Event event): + /* "hunter/_predicates.pyx":581 + * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: - * if fast_call(predicate, event): # <<<<<<<<<<<<<< - * return True + * if not fast_call(predicate, event): # <<<<<<<<<<<<<< + * return False * else: */ } - /* "hunter/_predicates.pyx":491 + /* "hunter/_predicates.pyx":580 * - * cdef inline fast_Or_call(Or self, Event event): + * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if fast_call(predicate, event): - * return True + * if not fast_call(predicate, event): + * return False */ - __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error)) + __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) } /*else*/ { - /* "hunter/_predicates.pyx":495 - * return True + /* "hunter/_predicates.pyx":584 + * return False * else: - * return False # <<<<<<<<<<<<<< + * return True # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + __Pyx_TraceLine(584,0,__PYX_ERR(0, 584, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - /* "hunter/_predicates.pyx":491 + /* "hunter/_predicates.pyx":580 * - * cdef inline fast_Or_call(Or self, Event event): + * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if fast_call(predicate, event): - * return True + * if not fast_call(predicate, event): + * return False */ - __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error)) + __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":490 + /* "hunter/_predicates.pyx":579 * return Not(self) * - * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< + * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: - * if fast_call(predicate, event): + * if not fast_call(predicate, event): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.fast_Or_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.fast_And_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_predicate); @@ -14674,90 +16525,58 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct return __pyx_r; } -/* "hunter/_predicates.pyx":502 - * `Not` predicate. +/* "hunter/_predicates.pyx":593 * """ - * def __init__(self, predicate): # <<<<<<<<<<<<<< - * self.predicate = predicate + * + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates * */ /* Python wrapper */ -static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_predicate = 0; +static int __pyx_pw_6hunter_11_predicates_2Or_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6hunter_11_predicates_2Or_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_predicates = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_predicate,0}; - PyObject* values[1] = {0}; - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_predicate)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 502, __pyx_L3_error) - } - } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - } - __pyx_v_predicate = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 502, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.Not.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not___init__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), __pyx_v_predicate); + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; + __Pyx_INCREF(__pyx_args); + __pyx_v_predicates = __pyx_args; + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or___init__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), __pyx_v_predicates); /* function exit code */ + __Pyx_XDECREF(__pyx_v_predicates); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v_predicate) { +static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, PyObject *__pyx_v_predicates) { int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 502, 0, __PYX_ERR(0, 502, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 593, 0, __PYX_ERR(0, 593, __pyx_L1_error)); - /* "hunter/_predicates.pyx":503 - * """ - * def __init__(self, predicate): - * self.predicate = predicate # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":594 + * + * def __init__(self, *predicates): + * self.predicates = predicates # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_predicate); - __Pyx_GIVEREF(__pyx_v_predicate); - __Pyx_GOTREF(__pyx_v_self->predicate); - __Pyx_DECREF(__pyx_v_self->predicate); - __pyx_v_self->predicate = __pyx_v_predicate; + __Pyx_TraceLine(594,0,__PYX_ERR(0, 594, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_predicates); + __Pyx_GIVEREF(__pyx_v_predicates); + __Pyx_GOTREF(__pyx_v_self->predicates); + __Pyx_DECREF(__pyx_v_self->predicates); + __pyx_v_self->predicates = __pyx_v_predicates; - /* "hunter/_predicates.pyx":502 - * `Not` predicate. + /* "hunter/_predicates.pyx":593 * """ - * def __init__(self, predicate): # <<<<<<<<<<<<<< - * self.predicate = predicate + * + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates * */ @@ -14765,7 +16584,7 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Not.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_TraceReturn(Py_None, 0); @@ -14773,126 +16592,287 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_predicates.pyx":505 - * self.predicate = predicate +/* "hunter/_predicates.pyx":596 + * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< - * return 'Not(%s)' % self.predicate + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_3__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_3__str__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_3__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_3__str__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_2__str__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_2__str__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +/* "hunter/_predicates.pyx":597 + * + * def __str__(self): + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< + * + * def __repr__(self): + */ + +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *__pyx_self) { + struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_12_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 597, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *) __pyx_self; + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); + { + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_str___locals_genexpr, __pyx_n_s_hunter__predicates); if (unlikely(!gen)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Or.__str__.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_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + __Pyx_TraceCall("genexpr", __pyx_f[0], 597, 0, __PYX_ERR(0, 597, __pyx_L1_error)); + 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_TraceReturn(Py_None, 0); + __Pyx_RefNannyFinishContext(); + return NULL; + } + __pyx_L3_first_run:; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 597, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 597, __pyx_L1_error) } + if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->predicates == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 597, __pyx_L1_error) + } + __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->predicates; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 597, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 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_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __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; + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 597, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + + /* function exit code */ + PyErr_SetNone(PyExc_StopIteration); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_XDECREF(__pyx_r); __pyx_r = 0; + #if !CYTHON_USE_EXC_INFO_STACK + __Pyx_Coroutine_ResetAndClearException(__pyx_generator); + #endif + __pyx_generator->resume_label = -1; + __Pyx_Coroutine_clear((PyObject*)__pyx_generator); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":596 + * self.predicates = predicates + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * + */ + +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { + struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 505, 0, __PYX_ERR(0, 505, __pyx_L1_error)); + __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_11___str__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_11___str__, __pyx_empty_tuple, NULL); + if (unlikely(!__pyx_cur_scope)) { + __pyx_cur_scope = ((struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ *)Py_None); + __Pyx_INCREF(Py_None); + __PYX_ERR(0, 596, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __Pyx_TraceCall("__str__", __pyx_f[0], 596, 0, __PYX_ERR(0, 596, __pyx_L1_error)); + __pyx_cur_scope->__pyx_v_self = __pyx_v_self; + __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); + __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "hunter/_predicates.pyx":506 + /* "hunter/_predicates.pyx":597 * * def __str__(self): - * return 'Not(%s)' % self.predicate # <<<<<<<<<<<<<< + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error)) + __Pyx_TraceLine(597,0,__PYX_ERR(0, 597, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Not_s, __pyx_v_self->predicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_1 = __pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Or_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __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; - /* "hunter/_predicates.pyx":505 - * self.predicate = predicate + /* "hunter/_predicates.pyx":596 + * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< - * return 'Not(%s)' % self.predicate + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Not.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Or.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":508 - * return 'Not(%s)' % self.predicate +/* "hunter/_predicates.pyx":599 + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % self.predicate + * return '' % (self.predicates,) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_5__repr__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_5__repr__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_5__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_4__repr__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_4__repr__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 508, 0, __PYX_ERR(0, 508, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 599, 0, __PYX_ERR(0, 599, __pyx_L1_error)); - /* "hunter/_predicates.pyx":509 + /* "hunter/_predicates.pyx":600 * * def __repr__(self): - * return '' % self.predicate # <<<<<<<<<<<<<< + * return '' % (self.predicates,) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) + __Pyx_TraceLine(600,0,__PYX_ERR(0, 600, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_hunter__predicates_Not_predicat, __pyx_v_self->predicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_v_self->predicates); + __Pyx_GIVEREF(__pyx_v_self->predicates); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicates); + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_Or_predicate, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __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; - /* "hunter/_predicates.pyx":508 - * return 'Not(%s)' % self.predicate + /* "hunter/_predicates.pyx":599 + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % self.predicate + * return '' % (self.predicates,) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Not.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Or.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -14901,28 +16881,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":511 - * return '' % self.predicate +/* "hunter/_predicates.pyx":602 + * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Not) + * isinstance(other, Or) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_6__eq__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_6__eq__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -14930,45 +16910,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h int __pyx_t_2; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 511, 0, __PYX_ERR(0, 511, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error)); - /* "hunter/_predicates.pyx":512 + /* "hunter/_predicates.pyx":603 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< - * isinstance(other, Not) - * and self.predicate == ( other).predicate + * isinstance(other, Or) + * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error)) + __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":513 + /* "hunter/_predicates.pyx":604 * def __eq__(self, other): * return ( - * isinstance(other, Not) # <<<<<<<<<<<<<< - * and self.predicate == ( other).predicate + * isinstance(other, Or) # <<<<<<<<<<<<<< + * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error)) - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Not); + __Pyx_TraceLine(604,0,__PYX_ERR(0, 604, __pyx_L1_error)) + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Or); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } - /* "hunter/_predicates.pyx":514 + /* "hunter/_predicates.pyx":605 * return ( - * isinstance(other, Not) - * and self.predicate == ( other).predicate # <<<<<<<<<<<<<< + * isinstance(other, Or) + * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(514,0,__PYX_ERR(0, 514, __pyx_L1_error)) - __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicate, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L1_error) + __Pyx_TraceLine(605,0,__PYX_ERR(0, 605, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicates, ((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_other)->predicates, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -14977,19 +16957,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":511 - * return '' % self.predicate + /* "hunter/_predicates.pyx":602 + * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Not) + * isinstance(other, Or) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.Not.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -14998,69 +16978,69 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":517 +/* "hunter/_predicates.pyx":608 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Not', self.predicate)) + * return hash(('Or', self.predicates)) * */ /* Python wrapper */ -static Py_hash_t __pyx_pw_6hunter_11_predicates_3Not_9__hash__(PyObject *__pyx_v_self); /*proto*/ -static Py_hash_t __pyx_pw_6hunter_11_predicates_3Not_9__hash__(PyObject *__pyx_v_self) { +static Py_hash_t __pyx_pw_6hunter_11_predicates_2Or_9__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_6hunter_11_predicates_2Or_9__hash__(PyObject *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_8__hash__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_8__hash__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 517, 0, __PYX_ERR(0, 517, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error)); - /* "hunter/_predicates.pyx":518 + /* "hunter/_predicates.pyx":609 * * def __hash__(self): - * return hash(('Not', self.predicate)) # <<<<<<<<<<<<<< + * return hash(('Or', self.predicates)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(518,0,__PYX_ERR(0, 518, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_TraceLine(609,0,__PYX_ERR(0, 609, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_Not); - __Pyx_GIVEREF(__pyx_n_s_Not); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Not); - __Pyx_INCREF(__pyx_v_self->predicate); - __Pyx_GIVEREF(__pyx_v_self->predicate); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->predicate); - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 518, __pyx_L1_error) + __Pyx_INCREF(__pyx_n_s_Or); + __Pyx_GIVEREF(__pyx_n_s_Or); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Or); + __Pyx_INCREF(__pyx_v_self->predicates); + __Pyx_GIVEREF(__pyx_v_self->predicates); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->predicates); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":517 + /* "hunter/_predicates.pyx":608 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Not', self.predicate)) + * return hash(('Or', self.predicates)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Not.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; @@ -15069,17 +17049,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":520 - * return hash(('Not', self.predicate)) +/* "hunter/_predicates.pyx":611 + * return hash(('Or', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Not_call(self, event) + * return fast_Or_call(self, event) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations @@ -15103,7 +17083,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 520, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 611, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -15114,14 +17094,14 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 520, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 611, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.Not.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 520, __pyx_L1_error) - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_10__call__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), __pyx_v_event); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 611, __pyx_L1_error) + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_10__call__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), __pyx_v_event); /* function exit code */ goto __pyx_L0; @@ -15132,41 +17112,41 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_ return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 520, 0, __PYX_ERR(0, 520, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); - /* "hunter/_predicates.pyx":521 + /* "hunter/_predicates.pyx":612 * * def __call__(self, Event event): - * return fast_Not_call(self, event) # <<<<<<<<<<<<<< + * return fast_Or_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(521,0,__PYX_ERR(0, 521, __pyx_L1_error)) + __Pyx_TraceLine(612,0,__PYX_ERR(0, 612, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Not_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Or_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":520 - * return hash(('Not', self.predicate)) + /* "hunter/_predicates.pyx":611 + * return hash(('Or', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Not_call(self, event) + * return fast_Or_call(self, event) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Not.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15175,272 +17155,249 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":523 - * return fast_Not_call(self, event) +/* "hunter/_predicates.pyx":614 + * return fast_Or_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< - * if type(self) is Not and type(other) is Not: - * return Not(And(( self).predicate, ( other).predicate)) + * cdef list predicates + * if type(self) is Or: */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_v_predicates = 0; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 523, 0, __PYX_ERR(0, 523, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error)); - /* "hunter/_predicates.pyx":524 - * + /* "hunter/_predicates.pyx":616 * def __or__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(And(( self).predicate, ( other).predicate)) + * cdef list predicates + * if type(self) is Or: # <<<<<<<<<<<<<< + * predicates = list(( self).predicates) * else: */ - __Pyx_TraceLine(524,0,__PYX_ERR(0, 524, __pyx_L1_error)) - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); - __pyx_t_3 = (__pyx_t_2 != 0); - if (__pyx_t_3) { - } else { - __pyx_t_1 = __pyx_t_3; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); - __pyx_t_2 = (__pyx_t_3 != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (__pyx_t_1) { + __Pyx_TraceLine(616,0,__PYX_ERR(0, 616, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Or)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { - /* "hunter/_predicates.pyx":525 - * def __or__(self, other): - * if type(self) is Not and type(other) is Not: - * return Not(And(( self).predicate, ( other).predicate)) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":617 + * cdef list predicates + * if type(self) is Or: + * predicates = list(( self).predicates) # <<<<<<<<<<<<<< * else: - * return Or(self, other) + * predicates = [self] */ - __Pyx_TraceLine(525,0,__PYX_ERR(0, 525, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); - __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); - __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); - __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; + __Pyx_TraceLine(617,0,__PYX_ERR(0, 617, __pyx_L1_error)) + __pyx_t_3 = PySequence_List(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)->predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_predicates = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":524 - * + /* "hunter/_predicates.pyx":616 * def __or__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(And(( self).predicate, ( other).predicate)) + * cdef list predicates + * if type(self) is Or: # <<<<<<<<<<<<<< + * predicates = list(( self).predicates) * else: */ + goto __pyx_L3; } - /* "hunter/_predicates.pyx":527 - * return Not(And(( self).predicate, ( other).predicate)) + /* "hunter/_predicates.pyx":619 + * predicates = list(( self).predicates) * else: - * return Or(self, other) # <<<<<<<<<<<<<< - * - * def __and__(self, other): + * predicates = [self] # <<<<<<<<<<<<<< + * if type(other) is Or: + * predicates.extend(( other).predicates) */ - __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error)) + __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error)) /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self); - __Pyx_INCREF(__pyx_v_other); - __Pyx_GIVEREF(__pyx_v_other); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_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_L0; + PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_self); + __pyx_v_predicates = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; } + __pyx_L3:; - /* "hunter/_predicates.pyx":523 - * return fast_Not_call(self, event) + /* "hunter/_predicates.pyx":620 + * else: + * predicates = [self] + * if type(other) is Or: # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) + * else: + */ + __Pyx_TraceLine(620,0,__PYX_ERR(0, 620, __pyx_L1_error)) + __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Or)); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "hunter/_predicates.pyx":621 + * predicates = [self] + * if type(other) is Or: + * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< + * else: + * predicates.append(other) + */ + __Pyx_TraceLine(621,0,__PYX_ERR(0, 621, __pyx_L1_error)) + __pyx_t_3 = ((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_other)->predicates; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyList_Extend(__pyx_v_predicates, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 621, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "hunter/_predicates.pyx":620 + * else: + * predicates = [self] + * if type(other) is Or: # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) + * else: + */ + goto __pyx_L4; + } + + /* "hunter/_predicates.pyx":623 + * predicates.extend(( other).predicates) + * else: + * predicates.append(other) # <<<<<<<<<<<<<< + * return Or(*predicates) + * + */ + __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error)) + /*else*/ { + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_predicates, __pyx_v_other); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 623, __pyx_L1_error) + } + __pyx_L4:; + + /* "hunter/_predicates.pyx":624 + * else: + * predicates.append(other) + * return Or(*predicates) # <<<<<<<<<<<<<< + * + * def __and__(self, other): + */ + __Pyx_TraceLine(624,0,__PYX_ERR(0, 624, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":614 + * return fast_Or_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< - * if type(self) is Not and type(other) is Not: - * return Not(And(( self).predicate, ( other).predicate)) + * cdef list predicates + * if type(self) is Or: */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Not.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XDECREF(__pyx_v_predicates); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":529 - * return Or(self, other) +/* "hunter/_predicates.pyx":626 + * return Or(*predicates) * * def __and__(self, other): # <<<<<<<<<<<<<< - * if type(self) is Not and type(other) is Not: - * return Not(Or(( self).predicate, ( other).predicate)) + * return And(self, other) + * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__and__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 529, 0, __PYX_ERR(0, 529, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 626, 0, __PYX_ERR(0, 626, __pyx_L1_error)); - /* "hunter/_predicates.pyx":530 + /* "hunter/_predicates.pyx":627 * * def __and__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(Or(( self).predicate, ( other).predicate)) - * else: - */ - __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); - __pyx_t_3 = (__pyx_t_2 != 0); - if (__pyx_t_3) { - } else { - __pyx_t_1 = __pyx_t_3; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); - __pyx_t_2 = (__pyx_t_3 != 0); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (__pyx_t_1) { - - /* "hunter/_predicates.pyx":531 - * def __and__(self, other): - * if type(self) is Not and type(other) is Not: - * return Not(Or(( self).predicate, ( other).predicate)) # <<<<<<<<<<<<<< - * else: - * return And(self, other) - */ - __Pyx_TraceLine(531,0,__PYX_ERR(0, 531, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); - __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); - __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); - __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); - PyTuple_SET_ITEM(__pyx_t_4, 1, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "hunter/_predicates.pyx":530 - * - * def __and__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(Or(( self).predicate, ( other).predicate)) - * else: - */ - } - - /* "hunter/_predicates.pyx":533 - * return Not(Or(( self).predicate, ( other).predicate)) - * else: - * return And(self, other) # <<<<<<<<<<<<<< + * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(533,0,__PYX_ERR(0, 533, __pyx_L1_error)) - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_self); - __Pyx_GIVEREF(__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self); - __Pyx_INCREF(__pyx_v_other); - __Pyx_GIVEREF(__pyx_v_other); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_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_L0; - } + __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self); + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_other); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __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; - /* "hunter/_predicates.pyx":529 - * return Or(self, other) + /* "hunter/_predicates.pyx":626 + * return Or(*predicates) * * def __and__(self, other): # <<<<<<<<<<<<<< - * if type(self) is Not and type(other) is Not: - * return Not(Or(( self).predicate, ( other).predicate)) + * return And(self, other) + * */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Not.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Or.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15449,58 +17406,62 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":535 - * return And(self, other) +/* "hunter/_predicates.pyx":629 + * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< - * return self.predicate + * return Not(self) * */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_17__invert__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_17__invert__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_17__invert__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_17__invert__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_16__invert__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_16__invert__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 535, 0, __PYX_ERR(0, 535, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error)); - /* "hunter/_predicates.pyx":536 + /* "hunter/_predicates.pyx":630 * * def __invert__(self): - * return self.predicate # <<<<<<<<<<<<<< + * return Not(self) # <<<<<<<<<<<<<< * - * cdef inline fast_Not_call(Not self, Event event): + * cdef inline fast_Or_call(Or self, Event event): */ - __Pyx_TraceLine(536,0,__PYX_ERR(0, 536, __pyx_L1_error)) + __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->predicate); - __pyx_r = __pyx_v_self->predicate; + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":535 - * return And(self, other) + /* "hunter/_predicates.pyx":629 + * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< - * return self.predicate + * return Not(self) * */ /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Not.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Or.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15509,41 +17470,41 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_o return __pyx_r; } -/* "hunter/_predicates.pxd":34 - * cdef class Not: +/* "hunter/_predicates.pxd":29 + * cdef class Or: * cdef: - * readonly object predicate # <<<<<<<<<<<<<< + * readonly tuple predicates # <<<<<<<<<<<<<< * * @cython.final */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_9predicate_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_9predicate_1__get__(PyObject *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_10predicates_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_10predicates_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 34, 0, __PYX_ERR(1, 34, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[1], 29, 0, __PYX_ERR(1, 29, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->predicate); - __pyx_r = __pyx_v_self->predicate; + __Pyx_INCREF(__pyx_v_self->predicates); + __pyx_r = __pyx_v_self->predicates; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Not.predicate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.predicates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15559,19 +17520,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(struct _ */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -15589,22 +17550,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate - * state = (self.predicate,) # <<<<<<<<<<<<<< + * state = (self.predicates,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_self->predicate); - __Pyx_GIVEREF(__pyx_v_self->predicate); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicate); + __Pyx_INCREF(__pyx_v_self->predicates); + __Pyx_GIVEREF(__pyx_v_self->predicates); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicates); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate - * state = (self.predicate,) + * state = (self.predicates,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) @@ -15616,7 +17577,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct __pyx_t_1 = 0; /* "(tree fragment)":7 - * state = (self.predicate,) + * state = (self.predicates,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -15651,13 +17612,13 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: - * use_setstate = self.predicate is not None + * use_setstate = self.predicates is not None */ __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) __pyx_v_use_setstate = 1; /* "(tree fragment)":7 - * state = (self.predicate,) + * state = (self.predicates,) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< * state += (_dict,) @@ -15669,22 +17630,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct /* "(tree fragment)":11 * use_setstate = True * else: - * use_setstate = self.predicate is not None # <<<<<<<<<<<<<< + * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< * if use_setstate: - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state */ __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = (__pyx_v_self->predicate != Py_None); + __pyx_t_3 = (__pyx_v_self->predicates != ((PyObject*)Py_None)); __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; /* "(tree fragment)":12 * else: - * use_setstate = self.predicate is not None + * use_setstate = self.predicates is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state * else: */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) @@ -15692,24 +17653,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct if (__pyx_t_3) { /* "(tree fragment)":13 - * use_setstate = self.predicate is not None + * use_setstate = self.predicates is not None * if use_setstate: - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state # <<<<<<<<<<<<<< + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Not); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Or); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_258412278); - __Pyx_GIVEREF(__pyx_int_258412278); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_258412278); + __Pyx_INCREF(__pyx_int_178834394); + __Pyx_GIVEREF(__pyx_int_178834394); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_178834394); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); @@ -15730,33 +17691,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct /* "(tree fragment)":12 * else: - * use_setstate = self.predicate is not None + * use_setstate = self.predicates is not None * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state * else: */ } /* "(tree fragment)":15 - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state * else: - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) # <<<<<<<<<<<<<< + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Not__set_state(self, __pyx_state) + * __pyx_unpickle_Or__set_state(self, __pyx_state) */ __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Not); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Or); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_258412278); - __Pyx_GIVEREF(__pyx_int_258412278); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_258412278); + __Pyx_INCREF(__pyx_int_178834394); + __Pyx_GIVEREF(__pyx_int_178834394); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_178834394); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); @@ -15784,7 +17745,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Not.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); @@ -15797,25 +17758,25 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Not__set_state(self, __pyx_state) + * __pyx_unpickle_Or__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_3Not_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_2Or_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -15824,21 +17785,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); /* "(tree fragment)":17 - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Not__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_Or__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ __Pyx_TraceLine(17,0,__PYX_ERR(2, 17, __pyx_L1_error)) if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) - __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":16 * else: - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Not__set_state(self, __pyx_state) + * __pyx_unpickle_Or__set_state(self, __pyx_state) */ /* function exit code */ @@ -15846,7 +17807,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Not.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -15855,346 +17816,2216 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc return __pyx_r; } -/* "hunter/_predicates.pyx":538 - * return self.predicate - * - * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< - * return not fast_call(self.predicate, event) +/* "hunter/_predicates.pyx":632 + * return Not(self) * + * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< + * for predicate in self.predicates: + * if fast_call(predicate, event): */ -static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { +static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { + PyObject *__pyx_v_predicate = NULL; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - __Pyx_RefNannySetupContext("fast_Not_call", 0); - __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 538, 0, __PYX_ERR(0, 538, __pyx_L1_error)); + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + __Pyx_RefNannySetupContext("fast_Or_call", 0); + __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error)); - /* "hunter/_predicates.pyx":539 - * - * cdef inline fast_Not_call(Not self, Event event): - * return not fast_call(self.predicate, event) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":633 * - * - */ - __Pyx_TraceLine(539,0,__PYX_ERR(0, 539, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_v_self->predicate; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __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, 539, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if fast_call(predicate, event): + * return True + */ + __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error)) + if (unlikely(__pyx_v_self->predicates == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 633, __pyx_L1_error) + } + __pyx_t_1 = __pyx_v_self->predicates; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + for (;;) { + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 633, __pyx_L1_error) + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_predicate, __pyx_t_3); + __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":538 - * return self.predicate + /* "hunter/_predicates.pyx":634 + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: + * if fast_call(predicate, event): # <<<<<<<<<<<<<< + * return True + * else: + */ + __Pyx_TraceLine(634,0,__PYX_ERR(0, 634, __pyx_L1_error)) + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_v_predicate, __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 634, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { + + /* "hunter/_predicates.pyx":635 + * for predicate in self.predicates: + * if fast_call(predicate, event): + * return True # <<<<<<<<<<<<<< + * else: + * return False + */ + __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_True); + __pyx_r = Py_True; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":634 + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: + * if fast_call(predicate, event): # <<<<<<<<<<<<<< + * return True + * else: + */ + } + + /* "hunter/_predicates.pyx":633 * - * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< - * return not fast_call(self.predicate, event) + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if fast_call(predicate, event): + * return True + */ + __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error)) + } + /*else*/ { + + /* "hunter/_predicates.pyx":637 + * return True + * else: + * return False # <<<<<<<<<<<<<< + * + * + */ + __Pyx_TraceLine(637,0,__PYX_ERR(0, 637, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(Py_False); + __pyx_r = Py_False; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; + } + + /* "hunter/_predicates.pyx":633 + * + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if fast_call(predicate, event): + * return True + */ + __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error)) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":632 + * return Not(self) * + * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< + * for predicate in self.predicates: + * if fast_call(predicate, event): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.fast_Not_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.fast_Or_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; + __Pyx_XDECREF(__pyx_v_predicate); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":542 - * +/* "hunter/_predicates.pyx":644 + * `Not` predicate. + * """ + * def __init__(self, predicate): # <<<<<<<<<<<<<< + * self.predicate = predicate * - * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< - * if type(callable) is Query: - * return fast_Query_call( callable, event) */ -static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject *__pyx_v_callable, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { - PyObject *__pyx_r = NULL; +/* Python wrapper */ +static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_predicate = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_predicate,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_predicate)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 644, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_predicate = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 644, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("hunter._predicates.Not.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not___init__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), __pyx_v_predicate); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v_predicate) { + int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - __Pyx_RefNannySetupContext("fast_call", 0); - __Pyx_TraceCall("fast_call", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_TraceCall("__init__", __pyx_f[0], 644, 0, __PYX_ERR(0, 644, __pyx_L1_error)); - /* "hunter/_predicates.pyx":543 + /* "hunter/_predicates.pyx":645 + * """ + * def __init__(self, predicate): + * self.predicate = predicate # <<<<<<<<<<<<<< * - * cdef inline fast_call(callable, Event event): - * if type(callable) is Query: # <<<<<<<<<<<<<< - * return fast_Query_call( callable, event) - * elif type(callable) is Or: - */ - __Pyx_TraceLine(543,0,__PYX_ERR(0, 543, __pyx_L1_error)) - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Query)); - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { - - /* "hunter/_predicates.pyx":544 - * cdef inline fast_call(callable, Event event): - * if type(callable) is Query: - * return fast_Query_call( callable, event) # <<<<<<<<<<<<<< - * elif type(callable) is Or: - * return fast_Or_call( callable, event) + * def __str__(self): */ - __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Query_call(((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __Pyx_TraceLine(645,0,__PYX_ERR(0, 645, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_predicate); + __Pyx_GIVEREF(__pyx_v_predicate); + __Pyx_GOTREF(__pyx_v_self->predicate); + __Pyx_DECREF(__pyx_v_self->predicate); + __pyx_v_self->predicate = __pyx_v_predicate; - /* "hunter/_predicates.pyx":543 + /* "hunter/_predicates.pyx":644 + * `Not` predicate. + * """ + * def __init__(self, predicate): # <<<<<<<<<<<<<< + * self.predicate = predicate * - * cdef inline fast_call(callable, Event event): - * if type(callable) is Query: # <<<<<<<<<<<<<< - * return fast_Query_call( callable, event) - * elif type(callable) is Or: */ - } - /* "hunter/_predicates.pyx":545 - * if type(callable) is Query: - * return fast_Query_call( callable, event) - * elif type(callable) is Or: # <<<<<<<<<<<<<< - * return fast_Or_call( callable, event) - * elif type(callable) is And: - */ - __Pyx_TraceLine(545,0,__PYX_ERR(0, 545, __pyx_L1_error)) - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Or)); - __pyx_t_1 = (__pyx_t_2 != 0); - if (__pyx_t_1) { + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Not.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_TraceReturn(Py_None, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "hunter/_predicates.pyx":546 - * return fast_Query_call( callable, event) - * elif type(callable) is Or: - * return fast_Or_call( callable, event) # <<<<<<<<<<<<<< - * elif type(callable) is And: - * return fast_And_call( callable, event) +/* "hunter/_predicates.pyx":647 + * self.predicate = predicate + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Not(%s)' % self.predicate + * */ - __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Or_call(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - /* "hunter/_predicates.pyx":545 - * if type(callable) is Query: - * return fast_Query_call( callable, event) - * elif type(callable) is Or: # <<<<<<<<<<<<<< - * return fast_Or_call( callable, event) - * elif type(callable) is And: - */ - } +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_3__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_3__str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_2__str__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); - /* "hunter/_predicates.pyx":547 - * elif type(callable) is Or: - * return fast_Or_call( callable, event) - * elif type(callable) is And: # <<<<<<<<<<<<<< + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__str__", 0); + __Pyx_TraceCall("__str__", __pyx_f[0], 647, 0, __PYX_ERR(0, 647, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":648 + * + * def __str__(self): + * return 'Not(%s)' % self.predicate # <<<<<<<<<<<<<< + * + * def __repr__(self): + */ + __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Not_s, __pyx_v_self->predicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":647 + * self.predicate = predicate + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Not(%s)' % self.predicate + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Not.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":650 + * return 'Not(%s)' % self.predicate + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' % self.predicate + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_5__repr__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_5__repr__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_4__repr__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__repr__", 0); + __Pyx_TraceCall("__repr__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":651 + * + * def __repr__(self): + * return '' % self.predicate # <<<<<<<<<<<<<< + * + * def __eq__(self, other): + */ + __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_hunter__predicates_Not_predicat, __pyx_v_self->predicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":650 + * return 'Not(%s)' % self.predicate + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' % self.predicate + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Not.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":653 + * return '' % self.predicate + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Not) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_7__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_6__eq__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("__eq__", 0); + __Pyx_TraceCall("__eq__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":654 + * + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * isinstance(other, Not) + * and self.predicate == ( other).predicate + */ + __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + + /* "hunter/_predicates.pyx":655 + * def __eq__(self, other): + * return ( + * isinstance(other, Not) # <<<<<<<<<<<<<< + * and self.predicate == ( other).predicate + * ) + */ + __Pyx_TraceLine(655,0,__PYX_ERR(0, 655, __pyx_L1_error)) + __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Not); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } + + /* "hunter/_predicates.pyx":656 + * return ( + * isinstance(other, Not) + * and self.predicate == ( other).predicate # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(656,0,__PYX_ERR(0, 656, __pyx_L1_error)) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->predicate, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error) + __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_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":653 + * return '' % self.predicate + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Not) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Not.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":659 + * ) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Not', self.predicate)) + * + */ + +/* Python wrapper */ +static Py_hash_t __pyx_pw_6hunter_11_predicates_3Not_9__hash__(PyObject *__pyx_v_self); /*proto*/ +static Py_hash_t __pyx_pw_6hunter_11_predicates_3Not_9__hash__(PyObject *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_8__hash__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { + Py_hash_t __pyx_r; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_hash_t __pyx_t_2; + __Pyx_RefNannySetupContext("__hash__", 0); + __Pyx_TraceCall("__hash__", __pyx_f[0], 659, 0, __PYX_ERR(0, 659, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":660 + * + * def __hash__(self): + * return hash(('Not', self.predicate)) # <<<<<<<<<<<<<< + * + * def __call__(self, Event event): + */ + __Pyx_TraceLine(660,0,__PYX_ERR(0, 660, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_Not); + __Pyx_GIVEREF(__pyx_n_s_Not); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Not); + __Pyx_INCREF(__pyx_v_self->predicate); + __Pyx_GIVEREF(__pyx_v_self->predicate); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->predicate); + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":659 + * ) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Not', self.predicate)) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Not.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_TraceReturn(Py_None, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":662 + * return hash(('Not', self.predicate)) + * + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_Not_call(self, event) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_event,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 662, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_event = ((struct __pyx_obj_6hunter_6_event_Event *)values[0]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 662, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("hunter._predicates.Not.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_10__call__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), __pyx_v_event); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__call__", 0); + __Pyx_TraceCall("__call__", __pyx_f[0], 662, 0, __PYX_ERR(0, 662, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":663 + * + * def __call__(self, Event event): + * return fast_Not_call(self, event) # <<<<<<<<<<<<<< + * + * def __or__(self, other): + */ + __Pyx_TraceLine(663,0,__PYX_ERR(0, 663, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_6hunter_11_predicates_fast_Not_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":662 + * return hash(('Not', self.predicate)) + * + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_Not_call(self, event) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Not.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":665 + * return fast_Not_call(self, event) + * + * def __or__(self, other): # <<<<<<<<<<<<<< + * if type(self) is Not and type(other) is Not: + * return Not(And(( self).predicate, ( other).predicate)) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_13__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__or__", 0); + __Pyx_TraceCall("__or__", __pyx_f[0], 665, 0, __PYX_ERR(0, 665, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":666 + * + * def __or__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(And(( self).predicate, ( other).predicate)) + * else: + */ + __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error)) + __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "hunter/_predicates.pyx":667 + * def __or__(self, other): + * if type(self) is Not and type(other) is Not: + * return Not(And(( self).predicate, ( other).predicate)) # <<<<<<<<<<<<<< + * else: + * return Or(self, other) + */ + __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); + __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); + __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); + __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); + PyTuple_SET_ITEM(__pyx_t_4, 1, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":666 + * + * def __or__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(And(( self).predicate, ( other).predicate)) + * else: + */ + } + + /* "hunter/_predicates.pyx":669 + * return Not(And(( self).predicate, ( other).predicate)) + * else: + * return Or(self, other) # <<<<<<<<<<<<<< + * + * def __and__(self, other): + */ + __Pyx_TraceLine(669,0,__PYX_ERR(0, 669, __pyx_L1_error)) + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self); + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_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_L0; + } + + /* "hunter/_predicates.pyx":665 + * return fast_Not_call(self, event) + * + * def __or__(self, other): # <<<<<<<<<<<<<< + * if type(self) is Not and type(other) is Not: + * return Not(And(( self).predicate, ( other).predicate)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.Not.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":671 + * return Or(self, other) + * + * def __and__(self, other): # <<<<<<<<<<<<<< + * if type(self) is Not and type(other) is Not: + * return Not(Or(( self).predicate, ( other).predicate)) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_15__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__and__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("__and__", 0); + __Pyx_TraceCall("__and__", __pyx_f[0], 671, 0, __PYX_ERR(0, 671, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":672 + * + * def __and__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(Or(( self).predicate, ( other).predicate)) + * else: + */ + __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __pyx_L1_error)) + __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_self)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_3 = (((PyObject *)Py_TYPE(__pyx_v_other)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); + __pyx_t_2 = (__pyx_t_3 != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "hunter/_predicates.pyx":673 + * def __and__(self, other): + * if type(self) is Not and type(other) is Not: + * return Not(Or(( self).predicate, ( other).predicate)) # <<<<<<<<<<<<<< + * else: + * return And(self, other) + */ + __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); + __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)->predicate); + __Pyx_INCREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); + __Pyx_GIVEREF(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); + PyTuple_SET_ITEM(__pyx_t_4, 1, ((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_other)->predicate); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":672 + * + * def __and__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(Or(( self).predicate, ( other).predicate)) + * else: + */ + } + + /* "hunter/_predicates.pyx":675 + * return Not(Or(( self).predicate, ( other).predicate)) + * else: + * return And(self, other) # <<<<<<<<<<<<<< + * + * def __invert__(self): + */ + __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error)) + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self); + __Pyx_GIVEREF(__pyx_v_self); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self); + __Pyx_INCREF(__pyx_v_other); + __Pyx_GIVEREF(__pyx_v_other); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_other); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_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_L0; + } + + /* "hunter/_predicates.pyx":671 + * return Or(self, other) + * + * def __and__(self, other): # <<<<<<<<<<<<<< + * if type(self) is Not and type(other) is Not: + * return Not(Or(( self).predicate, ( other).predicate)) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.Not.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":677 + * return And(self, other) + * + * def __invert__(self): # <<<<<<<<<<<<<< + * return self.predicate + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_17__invert__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_17__invert__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__invert__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_16__invert__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__invert__", 0); + __Pyx_TraceCall("__invert__", __pyx_f[0], 677, 0, __PYX_ERR(0, 677, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":678 + * + * def __invert__(self): + * return self.predicate # <<<<<<<<<<<<<< + * + * cdef inline fast_Not_call(Not self, Event event): + */ + __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->predicate); + __pyx_r = __pyx_v_self->predicate; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":677 + * return And(self, other) + * + * def __invert__(self): # <<<<<<<<<<<<<< + * return self.predicate + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Not.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pxd":34 + * cdef class Not: + * cdef: + * readonly object predicate # <<<<<<<<<<<<<< + * + * @cython.final + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_9predicate_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_9predicate_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 34, 0, __PYX_ERR(1, 34, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->predicate); + __pyx_r = __pyx_v_self->predicate; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Not.predicate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; + int __pyx_v_use_setstate; + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __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; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + + /* "(tree fragment)":5 + * cdef object _dict + * cdef bint use_setstate + * state = (self.predicate,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + */ + __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_self->predicate); + __Pyx_GIVEREF(__pyx_v_self->predicate); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->predicate); + __pyx_v_state = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.predicate,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) + */ + __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v__dict = __pyx_t_1; + __pyx_t_1 = 0; + + /* "(tree fragment)":7 + * state = (self.predicate,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) + __pyx_t_2 = (__pyx_v__dict != Py_None); + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: + */ + __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; + + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.predicate is not None + */ + __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) + __pyx_v_use_setstate = 1; + + /* "(tree fragment)":7 + * state = (self.predicate,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } + + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.predicate is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + */ + __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) + /*else*/ { + __pyx_t_3 = (__pyx_v_self->predicate != Py_None); + __pyx_v_use_setstate = __pyx_t_3; + } + __pyx_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.predicate is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * else: + */ + __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_use_setstate != 0); + if (__pyx_t_3) { + + /* "(tree fragment)":13 + * use_setstate = self.predicate is not None + * if use_setstate: + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + */ + __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Not); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_258412278); + __Pyx_GIVEREF(__pyx_int_258412278); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_258412278); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state); + __pyx_t_4 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.predicate is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * else: + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Not__set_state(self, __pyx_state) + */ + __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Not); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_258412278); + __Pyx_GIVEREF(__pyx_int_258412278); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_258412278); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_5 = 0; + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + } + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.Not.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Not__set_state(self, __pyx_state) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_3Not_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); + + /* "(tree fragment)":17 + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Not__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + */ + __Pyx_TraceLine(17,0,__PYX_ERR(2, 17, __pyx_L1_error)) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Not__set_state(self, __pyx_state) + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Not.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":680 + * return self.predicate + * + * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< + * return not fast_call(self.predicate, event) + * + */ + +static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + __Pyx_RefNannySetupContext("fast_Not_call", 0); + __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":681 + * + * cdef inline fast_Not_call(Not self, Event event): + * return not fast_call(self.predicate, event) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_TraceLine(681,0,__PYX_ERR(0, 681, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->predicate; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __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, 681, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":680 + * return self.predicate + * + * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< + * return not fast_call(self.predicate, event) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.fast_Not_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":684 + * + * + * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< + * if type(callable) is Query: + * return fast_Query_call( callable, event) + */ + +static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject *__pyx_v_callable, struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + __Pyx_RefNannySetupContext("fast_call", 0); + __Pyx_TraceCall("fast_call", __pyx_f[0], 684, 0, __PYX_ERR(0, 684, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":685 + * + * cdef inline fast_call(callable, Event event): + * if type(callable) is Query: # <<<<<<<<<<<<<< + * return fast_Query_call( callable, event) + * elif type(callable) is Or: + */ + __Pyx_TraceLine(685,0,__PYX_ERR(0, 685, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Query)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "hunter/_predicates.pyx":686 + * cdef inline fast_call(callable, Event event): + * if type(callable) is Query: + * return fast_Query_call( callable, event) # <<<<<<<<<<<<<< + * elif type(callable) is Or: + * return fast_Or_call( callable, event) + */ + __Pyx_TraceLine(686,0,__PYX_ERR(0, 686, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Query_call(((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":685 + * + * cdef inline fast_call(callable, Event event): + * if type(callable) is Query: # <<<<<<<<<<<<<< + * return fast_Query_call( callable, event) + * elif type(callable) is Or: + */ + } + + /* "hunter/_predicates.pyx":687 + * if type(callable) is Query: + * return fast_Query_call( callable, event) + * elif type(callable) is Or: # <<<<<<<<<<<<<< + * return fast_Or_call( callable, event) + * elif type(callable) is And: + */ + __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error)) + __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Or)); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "hunter/_predicates.pyx":688 + * return fast_Query_call( callable, event) + * elif type(callable) is Or: + * return fast_Or_call( callable, event) # <<<<<<<<<<<<<< + * elif type(callable) is And: + * return fast_And_call( callable, event) + */ + __Pyx_TraceLine(688,0,__PYX_ERR(0, 688, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Or_call(((struct __pyx_obj_6hunter_11_predicates_Or *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":687 + * if type(callable) is Query: + * return fast_Query_call( callable, event) + * elif type(callable) is Or: # <<<<<<<<<<<<<< + * return fast_Or_call( callable, event) + * elif type(callable) is And: + */ + } + + /* "hunter/_predicates.pyx":689 + * elif type(callable) is Or: + * return fast_Or_call( callable, event) + * elif type(callable) is And: # <<<<<<<<<<<<<< + * return fast_And_call( callable, event) + * elif type(callable) is Not: + */ + __Pyx_TraceLine(689,0,__PYX_ERR(0, 689, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_And)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "hunter/_predicates.pyx":690 + * return fast_Or_call( callable, event) + * elif type(callable) is And: + * return fast_And_call( callable, event) # <<<<<<<<<<<<<< + * elif type(callable) is Not: + * return fast_Not_call( callable, event) + */ + __Pyx_TraceLine(690,0,__PYX_ERR(0, 690, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_And_call(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":689 + * elif type(callable) is Or: + * return fast_Or_call( callable, event) + * elif type(callable) is And: # <<<<<<<<<<<<<< + * return fast_And_call( callable, event) + * elif type(callable) is Not: + */ + } + + /* "hunter/_predicates.pyx":691 + * elif type(callable) is And: + * return fast_And_call( callable, event) + * elif type(callable) is Not: # <<<<<<<<<<<<<< + * return fast_Not_call( callable, event) + * elif type(callable) is When: + */ + __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __pyx_L1_error)) + __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "hunter/_predicates.pyx":692 + * return fast_And_call( callable, event) + * elif type(callable) is Not: + * return fast_Not_call( callable, event) # <<<<<<<<<<<<<< + * elif type(callable) is When: + * return fast_When_call( callable, event) + */ + __Pyx_TraceLine(692,0,__PYX_ERR(0, 692, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Not_call(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":691 + * elif type(callable) is And: * return fast_And_call( callable, event) + * elif type(callable) is Not: # <<<<<<<<<<<<<< + * return fast_Not_call( callable, event) + * elif type(callable) is When: + */ + } + + /* "hunter/_predicates.pyx":693 + * elif type(callable) is Not: + * return fast_Not_call( callable, event) + * elif type(callable) is When: # <<<<<<<<<<<<<< + * return fast_When_call( callable, event) + * elif type(callable) is From: + */ + __Pyx_TraceLine(693,0,__PYX_ERR(0, 693, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_When)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "hunter/_predicates.pyx":694 + * return fast_Not_call( callable, event) + * elif type(callable) is When: + * return fast_When_call( callable, event) # <<<<<<<<<<<<<< + * elif type(callable) is From: + * return fast_From_call( callable, event) + */ + __Pyx_TraceLine(694,0,__PYX_ERR(0, 694, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_When_call(((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":693 * elif type(callable) is Not: + * return fast_Not_call( callable, event) + * elif type(callable) is When: # <<<<<<<<<<<<<< + * return fast_When_call( callable, event) + * elif type(callable) is From: + */ + } + + /* "hunter/_predicates.pyx":695 + * elif type(callable) is When: + * return fast_When_call( callable, event) + * elif type(callable) is From: # <<<<<<<<<<<<<< + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: + */ + __Pyx_TraceLine(695,0,__PYX_ERR(0, 695, __pyx_L1_error)) + __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_From)); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { + + /* "hunter/_predicates.pyx":696 + * return fast_When_call( callable, event) + * elif type(callable) is From: + * return fast_From_call( callable, event) # <<<<<<<<<<<<<< + * elif type(callable) is Backlog: + * return fast_Backlog_call( callable, event) + */ + __Pyx_TraceLine(696,0,__PYX_ERR(0, 696, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_From_call(((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":695 + * elif type(callable) is When: + * return fast_When_call( callable, event) + * elif type(callable) is From: # <<<<<<<<<<<<<< + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: + */ + } + + /* "hunter/_predicates.pyx":697 + * elif type(callable) is From: + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: # <<<<<<<<<<<<<< + * return fast_Backlog_call( callable, event) + * else: + */ + __Pyx_TraceLine(697,0,__PYX_ERR(0, 697, __pyx_L1_error)) + __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Backlog)); + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { + + /* "hunter/_predicates.pyx":698 + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: + * return fast_Backlog_call( callable, event) # <<<<<<<<<<<<<< + * else: + * return callable(event) + */ + __Pyx_TraceLine(698,0,__PYX_ERR(0, 698, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Backlog_call(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":697 + * elif type(callable) is From: + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: # <<<<<<<<<<<<<< + * return fast_Backlog_call( callable, event) + * else: + */ + } + + /* "hunter/_predicates.pyx":700 + * return fast_Backlog_call( callable, event) + * else: + * return callable(event) # <<<<<<<<<<<<<< + */ + __Pyx_TraceLine(700,0,__PYX_ERR(0, 700, __pyx_L1_error)) + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_callable); + __pyx_t_4 = __pyx_v_callable; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_event)); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "hunter/_predicates.pyx":684 + * + * + * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< + * if type(callable) is Query: + * return fast_Query_call( callable, event) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.fast_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __pyx_unpickle_Query(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_1__pyx_unpickle_Query = {"__pyx_unpickle_Query", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v___pyx_type = 0; + long __pyx_v___pyx_checksum; + PyObject *__pyx_v___pyx_state = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__pyx_unpickle_Query (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Query", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Query", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Query") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v___pyx_type = values[0]; + __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_v___pyx_state = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Query", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Query", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + __Pyx_TraceFrameInit(__pyx_codeobj__6) + __Pyx_RefNannySetupContext("__pyx_unpickle_Query", 0); + __Pyx_TraceCall("__pyx_unpickle_Query", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0x4eca0a2: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + */ + __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x4eca0a2) != 0); + if (__pyx_t_1) { + + /* "(tree fragment)":5 + * cdef object __pyx_result + * if __pyx_checksum != 0x4eca0a2: + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + * __pyx_result = Query.__new__(__pyx_type) + */ + __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_PickleError); + __Pyx_GIVEREF(__pyx_n_s_PickleError); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_v___pyx_PickleError = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "(tree fragment)":6 + * if __pyx_checksum != 0x4eca0a2: + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = Query.__new__(__pyx_type) + * if __pyx_state is not None: + */ + __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x4e, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_INCREF(__pyx_v___pyx_PickleError); + __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_Raise(__pyx_t_3, 0, 0, 0); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __PYX_ERR(2, 6, __pyx_L1_error) + + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result + * if __pyx_checksum != 0x4eca0a2: # <<<<<<<<<<<<<< + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + */ + } + + /* "(tree fragment)":7 + * from pickle import PickleError as __pyx_PickleError + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + * __pyx_result = Query.__new__(__pyx_type) # <<<<<<<<<<<<<< + * if __pyx_state is not None: + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + */ + __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_Query), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v___pyx_result = __pyx_t_3; + __pyx_t_3 = 0; + + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + * __pyx_result = Query.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * return __pyx_result */ - __Pyx_TraceLine(547,0,__PYX_ERR(0, 547, __pyx_L1_error)) - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_And)); - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { + __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) + __pyx_t_1 = (__pyx_v___pyx_state != Py_None); + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "hunter/_predicates.pyx":548 - * return fast_Or_call( callable, event) - * elif type(callable) is And: - * return fast_And_call( callable, event) # <<<<<<<<<<<<<< - * elif type(callable) is Not: - * return fast_Not_call( callable, event) + /* "(tree fragment)":9 + * __pyx_result = Query.__new__(__pyx_type) + * if __pyx_state is not None: + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * return __pyx_result + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): */ - __Pyx_TraceLine(548,0,__PYX_ERR(0, 548, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_And_call(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error) + __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":547 - * elif type(callable) is Or: - * return fast_Or_call( callable, event) - * elif type(callable) is And: # <<<<<<<<<<<<<< - * return fast_And_call( callable, event) - * elif type(callable) is Not: + /* "(tree fragment)":8 + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + * __pyx_result = Query.__new__(__pyx_type) + * if __pyx_state is not None: # <<<<<<<<<<<<<< + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * return __pyx_result */ } - /* "hunter/_predicates.pyx":549 - * elif type(callable) is And: - * return fast_And_call( callable, event) - * elif type(callable) is Not: # <<<<<<<<<<<<<< - * return fast_Not_call( callable, event) - * elif type(callable) is When: + /* "(tree fragment)":10 + * if __pyx_state is not None: + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * return __pyx_result # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] */ - __Pyx_TraceLine(549,0,__PYX_ERR(0, 549, __pyx_L1_error)) - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_Not)); - __pyx_t_1 = (__pyx_t_2 != 0); - if (__pyx_t_1) { + __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v___pyx_result); + __pyx_r = __pyx_v___pyx_result; + goto __pyx_L0; - /* "hunter/_predicates.pyx":550 - * return fast_And_call( callable, event) - * elif type(callable) is Not: - * return fast_Not_call( callable, event) # <<<<<<<<<<<<<< - * elif type(callable) is When: - * return fast_When_call( callable, event) + /* "(tree fragment)":1 + * def __pyx_unpickle_Query(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result */ - __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_Not_call(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 550, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - /* "hunter/_predicates.pyx":549 - * elif type(callable) is And: - * return fast_And_call( callable, event) - * elif type(callable) is Not: # <<<<<<<<<<<<<< - * return fast_Not_call( callable, event) - * elif type(callable) is When: + /* 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("hunter._predicates.__pyx_unpickle_Query", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v___pyx_PickleError); + __Pyx_XDECREF(__pyx_v___pyx_result); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":11 + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] + * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): + */ + +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(struct __pyx_obj_6hunter_11_predicates_Query *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + __Pyx_RefNannySetupContext("__pyx_unpickle_Query__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_Query__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); + + /* "(tree fragment)":12 + * return __pyx_result + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[10]) */ + __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_contains); + __Pyx_DECREF(__pyx_v___pyx_result->query_contains); + __pyx_v___pyx_result->query_contains = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_endswith); + __Pyx_DECREF(__pyx_v___pyx_result->query_endswith); + __pyx_v___pyx_result->query_endswith = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_eq); + __Pyx_DECREF(__pyx_v___pyx_result->query_eq); + __pyx_v___pyx_result->query_eq = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_gt); + __Pyx_DECREF(__pyx_v___pyx_result->query_gt); + __pyx_v___pyx_result->query_gt = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_gte); + __Pyx_DECREF(__pyx_v___pyx_result->query_gte); + __pyx_v___pyx_result->query_gte = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_in); + __Pyx_DECREF(__pyx_v___pyx_result->query_in); + __pyx_v___pyx_result->query_in = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_lt); + __Pyx_DECREF(__pyx_v___pyx_result->query_lt); + __pyx_v___pyx_result->query_lt = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_lte); + __Pyx_DECREF(__pyx_v___pyx_result->query_lte); + __pyx_v___pyx_result->query_lte = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_regex); + __Pyx_DECREF(__pyx_v___pyx_result->query_regex); + __pyx_v___pyx_result->query_regex = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->query_startswith); + __Pyx_DECREF(__pyx_v___pyx_result->query_startswith); + __pyx_v___pyx_result->query_startswith = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":551 - * elif type(callable) is Not: - * return fast_Not_call( callable, event) - * elif type(callable) is When: # <<<<<<<<<<<<<< - * return fast_When_call( callable, event) - * elif type(callable) is From: - */ - __Pyx_TraceLine(551,0,__PYX_ERR(0, 551, __pyx_L1_error)) - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_When)); - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { - - /* "hunter/_predicates.pyx":552 - * return fast_Not_call( callable, event) - * elif type(callable) is When: - * return fast_When_call( callable, event) # <<<<<<<<<<<<<< - * elif type(callable) is From: - * return fast_From_call( callable, event) - */ - __Pyx_TraceLine(552,0,__PYX_ERR(0, 552, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_When_call(((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "hunter/_predicates.pyx":551 - * elif type(callable) is Not: - * return fast_Not_call( callable, event) - * elif type(callable) is When: # <<<<<<<<<<<<<< - * return fast_When_call( callable, event) - * elif type(callable) is From: + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] + * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[10]) */ + __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(2, 13, __pyx_L1_error) } - - /* "hunter/_predicates.pyx":553 - * elif type(callable) is When: - * return fast_When_call( callable, event) - * elif type(callable) is From: # <<<<<<<<<<<<<< - * return fast_From_call( callable, event) - * else: - */ - __Pyx_TraceLine(553,0,__PYX_ERR(0, 553, __pyx_L1_error)) - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_callable)) == ((PyObject *)__pyx_ptype_6hunter_11_predicates_From)); - __pyx_t_1 = (__pyx_t_2 != 0); - if (__pyx_t_1) { - - /* "hunter/_predicates.pyx":554 - * return fast_When_call( callable, event) - * elif type(callable) is From: - * return fast_From_call( callable, event) # <<<<<<<<<<<<<< - * else: - * return callable(event) - */ - __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_6hunter_11_predicates_fast_From_call(((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v_callable), __pyx_v_event); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "hunter/_predicates.pyx":553 - * elif type(callable) is When: - * return fast_When_call( callable, event) - * elif type(callable) is From: # <<<<<<<<<<<<<< - * return fast_From_call( callable, event) - * else: - */ + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = ((__pyx_t_3 > 10) != 0); + if (__pyx_t_4) { + } else { + __pyx_t_2 = __pyx_t_4; + goto __pyx_L4_bool_binop_done; } + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_4 != 0); + __pyx_t_2 = __pyx_t_5; + __pyx_L4_bool_binop_done:; + if (__pyx_t_2) { - /* "hunter/_predicates.pyx":556 - * return fast_From_call( callable, event) - * else: - * return callable(event) # <<<<<<<<<<<<<< + /* "(tree fragment)":14 + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] + * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[10]) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(556,0,__PYX_ERR(0, 556, __pyx_L1_error)) - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_callable); - __pyx_t_4 = __pyx_v_callable; __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_TraceLine(14,0,__PYX_ERR(2, 14, __pyx_L1_error)) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 14, __pyx_L1_error) + } + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_7, function); } } - __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, ((PyObject *)__pyx_v_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_event)); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":13 + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] + * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[10]) + */ } - /* "hunter/_predicates.pyx":542 - * - * - * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< - * if type(callable) is Query: - * return fast_Query_call( callable, event) + /* "(tree fragment)":11 + * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] + * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.fast_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Query__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -16204,21 +20035,21 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject } /* "(tree fragment)":1 - * def __pyx_unpickle_Query(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_When(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6hunter_11_predicates_1__pyx_unpickle_Query = {"__pyx_unpickle_Query", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_3__pyx_unpickle_When = {"__pyx_unpickle_When", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_Query (wrapper)", 0); + __Pyx_RefNannySetupContext("__pyx_unpickle_When (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; @@ -16244,17 +20075,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Query", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_When", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Query", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_When", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Query") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_When") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -16269,20 +20100,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Query", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_When", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Query", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_When", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -16294,27 +20125,27 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__6) - __Pyx_RefNannySetupContext("__pyx_unpickle_Query", 0); - __Pyx_TraceCall("__pyx_unpickle_Query", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + __Pyx_TraceFrameInit(__pyx_codeobj__7) + __Pyx_RefNannySetupContext("__pyx_unpickle_When", 0); + __Pyx_TraceCall("__pyx_unpickle_When", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x4eca0a2: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0xb55b71c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) */ __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x4eca0a2) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb55b71c) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x4eca0a2: + * if __pyx_checksum != 0xb55b71c: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) - * __pyx_result = Query.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) + * __pyx_result = When.__new__(__pyx_type) */ __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -16333,16 +20164,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x4eca0a2: + * if __pyx_checksum != 0xb55b71c: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = Query.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = When.__new__(__pyx_type) * if __pyx_state is not None: */ __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x4e, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -16369,21 +20200,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x4eca0a2: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0xb55b71c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) - * __pyx_result = Query.__new__(__pyx_type) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) + * __pyx_result = When.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) */ __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_Query), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_When), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16404,10 +20235,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) - * __pyx_result = Query.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) + * __pyx_result = When.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) @@ -16416,33 +20247,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = Query.__new__(__pyx_type) + * __pyx_result = When.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): */ __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) - __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(((struct __pyx_obj_6hunter_11_predicates_Query *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x4eca0a2 = (query_contains, query_endswith, query_eq, query_gt, query_gte, query_in, query_lt, query_lte, query_regex, query_startswith))" % __pyx_checksum) - * __pyx_result = Query.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) + * __pyx_result = When.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] */ __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); @@ -16451,7 +20282,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_Query(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_When(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ @@ -16462,7 +20293,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Query", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_When", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); @@ -16474,14 +20305,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates___pyx_unpickle_Query(CYTHON_UNUS } /* "(tree fragment)":11 - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] - * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ -static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(struct __pyx_obj_6hunter_11_predicates_Query *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(struct __pyx_obj_6hunter_11_predicates_When *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -16493,15 +20324,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - __Pyx_RefNannySetupContext("__pyx_unpickle_Query__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_Query__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__pyx_unpickle_When__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_When__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); /* "(tree fragment)":12 * return __pyx_result - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[10]) + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[2]) */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { @@ -16512,9 +20343,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_contains); - __Pyx_DECREF(__pyx_v___pyx_result->query_contains); - __pyx_v___pyx_result->query_contains = ((PyObject*)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->actions); + __Pyx_DECREF(__pyx_v___pyx_result->actions); + __pyx_v___pyx_result->actions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -16522,114 +20353,17 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_endswith); - __Pyx_DECREF(__pyx_v___pyx_result->query_endswith); - __pyx_v___pyx_result->query_endswith = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_eq); - __Pyx_DECREF(__pyx_v___pyx_result->query_eq); - __pyx_v___pyx_result->query_eq = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_gt); - __Pyx_DECREF(__pyx_v___pyx_result->query_gt); - __pyx_v___pyx_result->query_gt = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_gte); - __Pyx_DECREF(__pyx_v___pyx_result->query_gte); - __pyx_v___pyx_result->query_gte = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_in); - __Pyx_DECREF(__pyx_v___pyx_result->query_in); - __pyx_v___pyx_result->query_in = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_lt); - __Pyx_DECREF(__pyx_v___pyx_result->query_lt); - __pyx_v___pyx_result->query_lt = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_lte); - __Pyx_DECREF(__pyx_v___pyx_result->query_lte); - __pyx_v___pyx_result->query_lte = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_regex); - __Pyx_DECREF(__pyx_v___pyx_result->query_regex); - __pyx_v___pyx_result->query_regex = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->query_startswith); - __Pyx_DECREF(__pyx_v___pyx_result->query_startswith); - __pyx_v___pyx_result->query_startswith = ((PyObject*)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->condition); + __Pyx_DECREF(__pyx_v___pyx_result->condition); + __pyx_v___pyx_result->condition = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] - * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[10]) + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[2]) */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { @@ -16637,7 +20371,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s __PYX_ERR(2, 13, __pyx_L1_error) } __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 10) != 0); + __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; @@ -16650,9 +20384,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] - * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[10]) # <<<<<<<<<<<<<< + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ __Pyx_TraceLine(14,0,__PYX_ERR(2, 14, __pyx_L1_error)) __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) @@ -16664,7 +20398,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -16685,19 +20419,19 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] - * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[10]) + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[2]) */ } /* "(tree fragment)":11 - * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_Query__set_state(Query __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.query_contains = __pyx_state[0]; __pyx_result.query_endswith = __pyx_state[1]; __pyx_result.query_eq = __pyx_state[2]; __pyx_result.query_gt = __pyx_state[3]; __pyx_result.query_gte = __pyx_state[4]; __pyx_result.query_in = __pyx_state[5]; __pyx_result.query_lt = __pyx_state[6]; __pyx_result.query_lte = __pyx_state[7]; __pyx_result.query_regex = __pyx_state[8]; __pyx_result.query_startswith = __pyx_state[9] - * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): + * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] + * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -16708,7 +20442,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Query__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_When__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -16718,21 +20452,21 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Query__set_state(s } /* "(tree fragment)":1 - * def __pyx_unpickle_When(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_From(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6hunter_11_predicates_3__pyx_unpickle_When = {"__pyx_unpickle_When", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_5__pyx_unpickle_From = {"__pyx_unpickle_From", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_When (wrapper)", 0); + __Pyx_RefNannySetupContext("__pyx_unpickle_From (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; @@ -16758,17 +20492,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_When", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_From", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_When", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_From", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_When") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_From") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -16783,20 +20517,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_When", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_From", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_When", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_From", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -16808,27 +20542,27 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__7) - __Pyx_RefNannySetupContext("__pyx_unpickle_When", 0); - __Pyx_TraceCall("__pyx_unpickle_When", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + __Pyx_TraceFrameInit(__pyx_codeobj__8) + __Pyx_RefNannySetupContext("__pyx_unpickle_From", 0); + __Pyx_TraceCall("__pyx_unpickle_From", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xb55b71c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x1acd5f7: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) */ __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb55b71c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x1acd5f7) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0xb55b71c: + * if __pyx_checksum != 0x1acd5f7: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) - * __pyx_result = When.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) + * __pyx_result = From.__new__(__pyx_type) */ __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -16847,16 +20581,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0xb55b71c: + * if __pyx_checksum != 0x1acd5f7: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = When.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = From.__new__(__pyx_type) * if __pyx_state is not None: */ __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -16883,21 +20617,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xb55b71c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x1acd5f7: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) - * __pyx_result = When.__new__(__pyx_type) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) + * __pyx_result = From.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) */ __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_When), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_From), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16918,10 +20652,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) - * __pyx_result = When.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) + * __pyx_result = From.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) @@ -16930,33 +20664,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = When.__new__(__pyx_type) + * __pyx_result = From.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): */ __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) - __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(((struct __pyx_obj_6hunter_11_predicates_When *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb55b71c = (actions, condition))" % __pyx_checksum) - * __pyx_result = When.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) + * __pyx_result = From.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] */ __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); @@ -16965,7 +20699,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_When(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_From(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ @@ -16976,7 +20710,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_When", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_From", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); @@ -16988,34 +20722,35 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2__pyx_unpickle_When(CYTHON_UNUS } /* "(tree fragment)":11 - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] - * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ -static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(struct __pyx_obj_6hunter_11_predicates_When *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(struct __pyx_obj_6hunter_11_predicates_From *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; - Py_ssize_t __pyx_t_3; - int __pyx_t_4; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; + int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - __Pyx_RefNannySetupContext("__pyx_unpickle_When__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_When__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); + PyObject *__pyx_t_9 = NULL; + __Pyx_RefNannySetupContext("__pyx_unpickle_From__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_From__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); /* "(tree fragment)":12 * return __pyx_result - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[2]) + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[5]) */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { @@ -17024,11 +20759,10 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(st } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->actions); - __Pyx_DECREF(__pyx_v___pyx_result->actions); - __pyx_v___pyx_result->actions = ((PyObject*)__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->condition); + __Pyx_DECREF(__pyx_v___pyx_result->condition); + __pyx_v___pyx_result->condition = __pyx_t_1; __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); @@ -17036,85 +20770,112 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(st } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->origin_calls = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->origin_depth = __pyx_t_2; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->condition); - __Pyx_DECREF(__pyx_v___pyx_result->condition); - __pyx_v___pyx_result->condition = __pyx_t_1; + __Pyx_GOTREF(__pyx_v___pyx_result->predicate); + __Pyx_DECREF(__pyx_v___pyx_result->predicate); + __pyx_v___pyx_result->predicate = __pyx_t_1; __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->watermark = __pyx_t_2; /* "(tree fragment)":13 - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] - * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[2]) + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[5]) */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) - __pyx_t_4 = ((__pyx_t_3 > 2) != 0); - if (__pyx_t_4) { + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_5 = ((__pyx_t_4 > 5) != 0); + if (__pyx_t_5) { } else { - __pyx_t_2 = __pyx_t_4; + __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_4 != 0); - __pyx_t_2 = __pyx_t_5; + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_5 != 0); + __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; - if (__pyx_t_2) { + if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] - * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ __Pyx_TraceLine(14,0,__PYX_ERR(2, 14, __pyx_L1_error)) - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_9 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_9)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); + __Pyx_DECREF_SET(__pyx_t_8, function); } } - __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] - * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[2]) + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[5]) */ } /* "(tree fragment)":11 - * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_When__set_state(When __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.actions = __pyx_state[0]; __pyx_result.condition = __pyx_state[1] - * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): + * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] + * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -17122,10 +20883,10 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(st goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_When__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_From__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -17135,21 +20896,21 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(st } /* "(tree fragment)":1 - * def __pyx_unpickle_From(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_Backlog(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6hunter_11_predicates_5__pyx_unpickle_From = {"__pyx_unpickle_From", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_7__pyx_unpickle_Backlog = {"__pyx_unpickle_Backlog", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_From (wrapper)", 0); + __Pyx_RefNannySetupContext("__pyx_unpickle_Backlog (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0}; PyObject* values[3] = {0,0,0}; @@ -17175,17 +20936,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_From", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Backlog", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_From", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Backlog", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_From") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Backlog") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -17200,20 +20961,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_From", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Backlog", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_From", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -17225,27 +20986,27 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__8) - __Pyx_RefNannySetupContext("__pyx_unpickle_From", 0); - __Pyx_TraceCall("__pyx_unpickle_From", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + __Pyx_TraceFrameInit(__pyx_codeobj__9) + __Pyx_RefNannySetupContext("__pyx_unpickle_Backlog", 0); + __Pyx_TraceCall("__pyx_unpickle_Backlog", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x1acd5f7: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x3a83c7c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) */ __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x1acd5f7) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3a83c7c) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x1acd5f7: + * if __pyx_checksum != 0x3a83c7c: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) - * __pyx_result = From.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) + * __pyx_result = Backlog.__new__(__pyx_type) */ __Pyx_TraceLine(5,0,__PYX_ERR(2, 5, __pyx_L1_error)) __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) @@ -17264,16 +21025,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x1acd5f7: + * if __pyx_checksum != 0x3a83c7c: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = From.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = Backlog.__new__(__pyx_type) * if __pyx_state is not None: */ __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x3a, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -17300,21 +21061,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x1acd5f7: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x3a83c7c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) - * __pyx_result = From.__new__(__pyx_type) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) + * __pyx_result = Backlog.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) */ __Pyx_TraceLine(7,0,__PYX_ERR(2, 7, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_From), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6hunter_11_predicates_Backlog), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -17335,10 +21096,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) - * __pyx_result = From.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) + * __pyx_result = Backlog.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) @@ -17347,33 +21108,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = From.__new__(__pyx_type) + * __pyx_result = Backlog.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): */ __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) - __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(((struct __pyx_obj_6hunter_11_predicates_From *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1acd5f7 = (condition, origin_calls, origin_depth, predicate, watermark))" % __pyx_checksum) - * __pyx_result = From.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) + * __pyx_result = Backlog.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] */ __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); @@ -17382,7 +21143,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_From(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_Backlog(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ @@ -17393,7 +21154,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_From", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); @@ -17405,14 +21166,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4__pyx_unpickle_From(CYTHON_UNUS } /* "(tree fragment)":11 - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] - * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ -static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(struct __pyx_obj_6hunter_11_predicates_From *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -17425,15 +21186,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - __Pyx_RefNannySetupContext("__pyx_unpickle_From__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_From__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__pyx_unpickle_Backlog__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_Backlog__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); /* "(tree fragment)":12 * return __pyx_result - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[5]) + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[8]) */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { @@ -17443,6 +21204,28 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->_filter); + __Pyx_DECREF(__pyx_v___pyx_result->_filter); + __pyx_v___pyx_result->_filter = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->action); + __Pyx_DECREF(__pyx_v___pyx_result->action); + __pyx_v___pyx_result->action = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->condition); __Pyx_DECREF(__pyx_v___pyx_result->condition); __pyx_v___pyx_result->condition = __pyx_t_1; @@ -17451,46 +21234,61 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->queue); + __Pyx_DECREF(__pyx_v___pyx_result->queue); + __pyx_v___pyx_result->queue = __pyx_t_1; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v___pyx_result->origin_calls = __pyx_t_2; + __pyx_v___pyx_result->size = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v___pyx_result->origin_depth = __pyx_t_2; + __pyx_v___pyx_result->stack = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_4bool_bool))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->predicate); - __Pyx_DECREF(__pyx_v___pyx_result->predicate); - __pyx_v___pyx_result->predicate = __pyx_t_1; + __Pyx_GOTREF(__pyx_v___pyx_result->strip); + __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->strip)); + __pyx_v___pyx_result->strip = ((PyBoolObject *)__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v___pyx_result->watermark = __pyx_t_2; + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_4bool_bool))))) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->vars); + __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->vars)); + __pyx_v___pyx_result->vars = ((PyBoolObject *)__pyx_t_1); + __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] - * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[5]) + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[8]) */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { @@ -17498,7 +21296,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st __PYX_ERR(2, 13, __pyx_L1_error) } __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) - __pyx_t_5 = ((__pyx_t_4 > 5) != 0); + __pyx_t_5 = ((__pyx_t_4 > 8) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; @@ -17511,9 +21309,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st if (__pyx_t_3) { /* "(tree fragment)":14 - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] - * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[8]) # <<<<<<<<<<<<<< */ __Pyx_TraceLine(14,0,__PYX_ERR(2, 14, __pyx_L1_error)) __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) @@ -17525,7 +21323,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -17546,19 +21344,19 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] - * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[5]) + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[8]) */ } /* "(tree fragment)":11 - * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_From__set_state(From __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.condition = __pyx_state[0]; __pyx_result.origin_calls = __pyx_state[1]; __pyx_result.origin_depth = __pyx_state[2]; __pyx_result.predicate = __pyx_state[3]; __pyx_result.watermark = __pyx_state[4] - * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -17569,7 +21367,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_From__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -17585,9 +21383,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_And(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6hunter_11_predicates_7__pyx_unpickle_And = {"__pyx_unpickle_And", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_And, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_And(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_9__pyx_unpickle_And = {"__pyx_unpickle_And", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -17650,14 +21448,14 @@ static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_And(PyObject *__ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates_6__pyx_unpickle_And(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_And(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -17669,7 +21467,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_And(CYTHON_UNUSE PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__9) + __Pyx_TraceFrameInit(__pyx_codeobj__10) __Pyx_RefNannySetupContext("__pyx_unpickle_And", 0); __Pyx_TraceCall("__pyx_unpickle_And", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -17991,9 +21789,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_Or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6hunter_11_predicates_9__pyx_unpickle_Or = {"__pyx_unpickle_Or", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_Or, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_Or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_11__pyx_unpickle_Or = {"__pyx_unpickle_Or", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -18056,14 +21854,14 @@ static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_Or(PyObject *__p __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates_8__pyx_unpickle_Or(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_Or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -18075,7 +21873,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_Or(CYTHON_UNUSED PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__10) + __Pyx_TraceFrameInit(__pyx_codeobj__11) __Pyx_RefNannySetupContext("__pyx_unpickle_Or", 0); __Pyx_TraceCall("__pyx_unpickle_Or", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -18397,9 +22195,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Not(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_6hunter_11_predicates_11__pyx_unpickle_Not = {"__pyx_unpickle_Not", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Not, METH_VARARGS|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Not(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_13__pyx_unpickle_Not = {"__pyx_unpickle_Not", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -18462,14 +22260,14 @@ static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Not(PyObject *_ __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Not(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); + __pyx_r = __pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -18481,7 +22279,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Not(CYTHON_UNUS PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; - __Pyx_TraceFrameInit(__pyx_codeobj__11) + __Pyx_TraceFrameInit(__pyx_codeobj__12) __Pyx_RefNannySetupContext("__pyx_unpickle_Not", 0); __Pyx_TraceCall("__pyx_unpickle_Not", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -19947,50 +23745,313 @@ static PyObject *__pyx_tp_new_6hunter_11_predicates_From(PyTypeObject *t, CYTHON if (unlikely(!o)) return 0; p = ((struct __pyx_obj_6hunter_11_predicates_From *)o); p->condition = Py_None; Py_INCREF(Py_None); - p->predicate = Py_None; Py_INCREF(Py_None); + p->predicate = Py_None; Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_6hunter_11_predicates_From(PyObject *o) { + struct __pyx_obj_6hunter_11_predicates_From *p = (struct __pyx_obj_6hunter_11_predicates_From *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->condition); + Py_CLEAR(p->predicate); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_6hunter_11_predicates_From(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_6hunter_11_predicates_From *p = (struct __pyx_obj_6hunter_11_predicates_From *)o; + if (p->condition) { + e = (*v)(p->condition, a); if (e) return e; + } + if (p->predicate) { + e = (*v)(p->predicate, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_6hunter_11_predicates_From(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_6hunter_11_predicates_From *p = (struct __pyx_obj_6hunter_11_predicates_From *)o; + tmp = ((PyObject*)p->condition); + p->condition = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->predicate); + p->predicate = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_tp_richcompare_6hunter_11_predicates_From(PyObject *o1, PyObject *o2, int op) { + switch (op) { + case Py_EQ: { + return __pyx_pw_6hunter_11_predicates_4From_7__eq__(o1, o2); + } + case Py_NE: { + PyObject *ret; + ret = __pyx_pw_6hunter_11_predicates_4From_7__eq__(o1, o2); + if (likely(ret && ret != Py_NotImplemented)) { + int b = __Pyx_PyObject_IsTrue(ret); Py_DECREF(ret); + if (unlikely(b < 0)) return NULL; + ret = (b) ? Py_False : Py_True; + Py_INCREF(ret); + } + return ret; + } + default: { + return __Pyx_NewRef(Py_NotImplemented); + } + } +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_4From_condition(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_4From_9condition_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_4From_predicate(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_4From_9predicate_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_4From_watermark(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_4From_9watermark_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_4From_origin_depth(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_4From_12origin_depth_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_4From_origin_calls(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_4From_12origin_calls_1__get__(o); +} + +static PyMethodDef __pyx_methods_6hunter_11_predicates_From[] = { + {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_11_predicates_4From_19__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_11_predicates_4From_21__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_6hunter_11_predicates_From[] = { + {(char *)"condition", __pyx_getprop_6hunter_11_predicates_4From_condition, 0, (char *)0, 0}, + {(char *)"predicate", __pyx_getprop_6hunter_11_predicates_4From_predicate, 0, (char *)0, 0}, + {(char *)"watermark", __pyx_getprop_6hunter_11_predicates_4From_watermark, 0, (char *)0, 0}, + {(char *)"origin_depth", __pyx_getprop_6hunter_11_predicates_4From_origin_depth, 0, (char *)0, 0}, + {(char *)"origin_calls", __pyx_getprop_6hunter_11_predicates_4From_origin_calls, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyNumberMethods __pyx_tp_as_number_From = { + 0, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + __pyx_pw_6hunter_11_predicates_4From_17__invert__, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + __pyx_pw_6hunter_11_predicates_4From_15__and__, /*nb_and*/ + 0, /*nb_xor*/ + __pyx_pw_6hunter_11_predicates_4From_13__or__, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_hex*/ + #endif + 0, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) + 0, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + 0, /*nb_index*/ + #if PY_VERSION_HEX >= 0x03050000 + 0, /*nb_matrix_multiply*/ + #endif + #if PY_VERSION_HEX >= 0x03050000 + 0, /*nb_inplace_matrix_multiply*/ + #endif +}; + +static PyTypeObject __pyx_type_6hunter_11_predicates_From = { + PyVarObject_HEAD_INIT(0, 0) + "hunter._predicates.From", /*tp_name*/ + sizeof(struct __pyx_obj_6hunter_11_predicates_From), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_6hunter_11_predicates_From, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + __pyx_pw_6hunter_11_predicates_4From_5__repr__, /*tp_repr*/ + &__pyx_tp_as_number_From, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + __pyx_pw_6hunter_11_predicates_4From_9__hash__, /*tp_hash*/ + __pyx_pw_6hunter_11_predicates_4From_11__call__, /*tp_call*/ + __pyx_pw_6hunter_11_predicates_4From_3__str__, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + "\n Keep running ``predicates`` after ``condition(event)`` is ``True``.\n ", /*tp_doc*/ + __pyx_tp_traverse_6hunter_11_predicates_From, /*tp_traverse*/ + __pyx_tp_clear_6hunter_11_predicates_From, /*tp_clear*/ + __pyx_tp_richcompare_6hunter_11_predicates_From, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_6hunter_11_predicates_From, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_6hunter_11_predicates_From, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + __pyx_pw_6hunter_11_predicates_4From_1__init__, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_6hunter_11_predicates_From, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_6hunter_11_predicates_Backlog(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_6hunter_11_predicates_Backlog *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_6hunter_11_predicates_Backlog *)o); + p->condition = Py_None; Py_INCREF(Py_None); + p->vars = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); + p->strip = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); + p->action = Py_None; Py_INCREF(Py_None); + p->_filter = Py_None; Py_INCREF(Py_None); + p->queue = Py_None; Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_6hunter_11_predicates_From(PyObject *o) { - struct __pyx_obj_6hunter_11_predicates_From *p = (struct __pyx_obj_6hunter_11_predicates_From *)o; +static void __pyx_tp_dealloc_6hunter_11_predicates_Backlog(PyObject *o) { + struct __pyx_obj_6hunter_11_predicates_Backlog *p = (struct __pyx_obj_6hunter_11_predicates_Backlog *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->condition); - Py_CLEAR(p->predicate); + Py_CLEAR(p->vars); + Py_CLEAR(p->strip); + Py_CLEAR(p->action); + Py_CLEAR(p->_filter); + Py_CLEAR(p->queue); (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_6hunter_11_predicates_From(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_6hunter_11_predicates_Backlog(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_6hunter_11_predicates_From *p = (struct __pyx_obj_6hunter_11_predicates_From *)o; + struct __pyx_obj_6hunter_11_predicates_Backlog *p = (struct __pyx_obj_6hunter_11_predicates_Backlog *)o; if (p->condition) { e = (*v)(p->condition, a); if (e) return e; } - if (p->predicate) { - e = (*v)(p->predicate, a); if (e) return e; + if (p->vars) { + e = (*v)(((PyObject *)p->vars), a); if (e) return e; + } + if (p->strip) { + e = (*v)(((PyObject *)p->strip), a); if (e) return e; + } + if (p->action) { + e = (*v)(p->action, a); if (e) return e; + } + if (p->_filter) { + e = (*v)(p->_filter, a); if (e) return e; + } + if (p->queue) { + e = (*v)(p->queue, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_6hunter_11_predicates_From(PyObject *o) { +static int __pyx_tp_clear_6hunter_11_predicates_Backlog(PyObject *o) { PyObject* tmp; - struct __pyx_obj_6hunter_11_predicates_From *p = (struct __pyx_obj_6hunter_11_predicates_From *)o; + struct __pyx_obj_6hunter_11_predicates_Backlog *p = (struct __pyx_obj_6hunter_11_predicates_Backlog *)o; tmp = ((PyObject*)p->condition); p->condition = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->predicate); - p->predicate = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->vars); + p->vars = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->strip); + p->strip = ((PyBoolObject *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->action); + p->action = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->_filter); + p->_filter = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->queue); + p->queue = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_tp_richcompare_6hunter_11_predicates_From(PyObject *o1, PyObject *o2, int op) { +static PyObject *__pyx_tp_richcompare_6hunter_11_predicates_Backlog(PyObject *o1, PyObject *o2, int op) { switch (op) { case Py_EQ: { - return __pyx_pw_6hunter_11_predicates_4From_7__eq__(o1, o2); + return __pyx_pw_6hunter_11_predicates_7Backlog_9__eq__(o1, o2); } case Py_NE: { PyObject *ret; - ret = __pyx_pw_6hunter_11_predicates_4From_7__eq__(o1, o2); + ret = __pyx_pw_6hunter_11_predicates_7Backlog_9__eq__(o1, o2); if (likely(ret && ret != Py_NotImplemented)) { int b = __Pyx_PyObject_IsTrue(ret); Py_DECREF(ret); if (unlikely(b < 0)) return NULL; @@ -20005,42 +24066,16 @@ static PyObject *__pyx_tp_richcompare_6hunter_11_predicates_From(PyObject *o1, P } } -static PyObject *__pyx_getprop_6hunter_11_predicates_4From_condition(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_6hunter_11_predicates_4From_9condition_1__get__(o); -} - -static PyObject *__pyx_getprop_6hunter_11_predicates_4From_predicate(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_6hunter_11_predicates_4From_9predicate_1__get__(o); -} - -static PyObject *__pyx_getprop_6hunter_11_predicates_4From_watermark(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_6hunter_11_predicates_4From_9watermark_1__get__(o); -} - -static PyObject *__pyx_getprop_6hunter_11_predicates_4From_origin_depth(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_6hunter_11_predicates_4From_12origin_depth_1__get__(o); -} - -static PyObject *__pyx_getprop_6hunter_11_predicates_4From_origin_calls(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_6hunter_11_predicates_4From_12origin_calls_1__get__(o); -} - -static PyMethodDef __pyx_methods_6hunter_11_predicates_From[] = { - {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_11_predicates_4From_19__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_11_predicates_4From_21__setstate_cython__, METH_O, 0}, +static PyMethodDef __pyx_methods_6hunter_11_predicates_Backlog[] = { + {"__ror__", (PyCFunction)__pyx_pw_6hunter_11_predicates_7Backlog_19__ror__, METH_O, 0}, + {"__rand__", (PyCFunction)__pyx_pw_6hunter_11_predicates_7Backlog_21__rand__, METH_O, 0}, + {"filter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_7Backlog_23filter, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_11_predicates_7Backlog_25__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_11_predicates_7Backlog_27__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_6hunter_11_predicates_From[] = { - {(char *)"condition", __pyx_getprop_6hunter_11_predicates_4From_condition, 0, (char *)0, 0}, - {(char *)"predicate", __pyx_getprop_6hunter_11_predicates_4From_predicate, 0, (char *)0, 0}, - {(char *)"watermark", __pyx_getprop_6hunter_11_predicates_4From_watermark, 0, (char *)0, 0}, - {(char *)"origin_depth", __pyx_getprop_6hunter_11_predicates_4From_origin_depth, 0, (char *)0, 0}, - {(char *)"origin_calls", __pyx_getprop_6hunter_11_predicates_4From_origin_calls, 0, (char *)0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_From = { +static PyNumberMethods __pyx_tp_as_number_Backlog = { 0, /*nb_add*/ 0, /*nb_subtract*/ 0, /*nb_multiply*/ @@ -20054,12 +24089,12 @@ static PyNumberMethods __pyx_tp_as_number_From = { 0, /*nb_positive*/ 0, /*nb_absolute*/ 0, /*nb_nonzero*/ - __pyx_pw_6hunter_11_predicates_4From_17__invert__, /*nb_invert*/ + __pyx_pw_6hunter_11_predicates_7Backlog_17__invert__, /*nb_invert*/ 0, /*nb_lshift*/ 0, /*nb_rshift*/ - __pyx_pw_6hunter_11_predicates_4From_15__and__, /*nb_and*/ + __pyx_pw_6hunter_11_predicates_7Backlog_15__and__, /*nb_and*/ 0, /*nb_xor*/ - __pyx_pw_6hunter_11_predicates_4From_13__or__, /*nb_or*/ + __pyx_pw_6hunter_11_predicates_7Backlog_13__or__, /*nb_or*/ #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) 0, /*nb_coerce*/ #endif @@ -20102,12 +24137,12 @@ static PyNumberMethods __pyx_tp_as_number_From = { #endif }; -static PyTypeObject __pyx_type_6hunter_11_predicates_From = { +static PyTypeObject __pyx_type_6hunter_11_predicates_Backlog = { PyVarObject_HEAD_INIT(0, 0) - "hunter._predicates.From", /*tp_name*/ - sizeof(struct __pyx_obj_6hunter_11_predicates_From), /*tp_basicsize*/ + "hunter._predicates.Backlog", /*tp_name*/ + sizeof(struct __pyx_obj_6hunter_11_predicates_Backlog), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_6hunter_11_predicates_From, /*tp_dealloc*/ + __pyx_tp_dealloc_6hunter_11_predicates_Backlog, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -20122,35 +24157,35 @@ static PyTypeObject __pyx_type_6hunter_11_predicates_From = { #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif - __pyx_pw_6hunter_11_predicates_4From_5__repr__, /*tp_repr*/ - &__pyx_tp_as_number_From, /*tp_as_number*/ + __pyx_pw_6hunter_11_predicates_7Backlog_7__repr__, /*tp_repr*/ + &__pyx_tp_as_number_Backlog, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ - __pyx_pw_6hunter_11_predicates_4From_9__hash__, /*tp_hash*/ - __pyx_pw_6hunter_11_predicates_4From_11__call__, /*tp_call*/ - __pyx_pw_6hunter_11_predicates_4From_3__str__, /*tp_str*/ + __pyx_pw_6hunter_11_predicates_7Backlog_11__hash__, /*tp_hash*/ + __pyx_pw_6hunter_11_predicates_7Backlog_3__call__, /*tp_call*/ + __pyx_pw_6hunter_11_predicates_7Backlog_5__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - "\n Keep running ``predicates`` after ``condition(event)`` is ``True``.\n ", /*tp_doc*/ - __pyx_tp_traverse_6hunter_11_predicates_From, /*tp_traverse*/ - __pyx_tp_clear_6hunter_11_predicates_From, /*tp_clear*/ - __pyx_tp_richcompare_6hunter_11_predicates_From, /*tp_richcompare*/ + 0, /*tp_doc*/ + __pyx_tp_traverse_6hunter_11_predicates_Backlog, /*tp_traverse*/ + __pyx_tp_clear_6hunter_11_predicates_Backlog, /*tp_clear*/ + __pyx_tp_richcompare_6hunter_11_predicates_Backlog, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_6hunter_11_predicates_From, /*tp_methods*/ + __pyx_methods_6hunter_11_predicates_Backlog, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_6hunter_11_predicates_From, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_6hunter_11_predicates_4From_1__init__, /*tp_init*/ + __pyx_pw_6hunter_11_predicates_7Backlog_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_6hunter_11_predicates_From, /*tp_new*/ + __pyx_tp_new_6hunter_11_predicates_Backlog, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21723,11 +25758,16 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 1}, {&__pyx_n_s_Action, __pyx_k_Action, sizeof(__pyx_k_Action), 0, 0, 1, 1}, + {&__pyx_kp_s_Action_r_must_be_a_ColorStreamAc, __pyx_k_Action_r_must_be_a_ColorStreamAc, sizeof(__pyx_k_Action_r_must_be_a_ColorStreamAc), 0, 0, 1, 0}, {&__pyx_n_s_And, __pyx_k_And, sizeof(__pyx_k_And), 0, 0, 1, 1}, {&__pyx_kp_s_And_s, __pyx_k_And_s, sizeof(__pyx_k_And_s), 0, 0, 1, 0}, + {&__pyx_n_s_Backlog, __pyx_k_Backlog, sizeof(__pyx_k_Backlog), 0, 0, 1, 1}, + {&__pyx_kp_s_Backlog_s_size_s_stack_s_vars_s, __pyx_k_Backlog_s_size_s_stack_s_vars_s, sizeof(__pyx_k_Backlog_s_size_s_stack_s_vars_s), 0, 0, 1, 0}, + {&__pyx_n_s_ColorStreamAction, __pyx_k_ColorStreamAction, sizeof(__pyx_k_ColorStreamAction), 0, 0, 1, 1}, {&__pyx_n_s_From, __pyx_k_From, sizeof(__pyx_k_From), 0, 0, 1, 1}, {&__pyx_kp_s_From_s_s_watermark_s, __pyx_k_From_s_s_watermark_s, sizeof(__pyx_k_From_s_s_watermark_s), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x1a, __pyx_k_Incompatible_checksums_s_vs_0x1a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x1a), 0, 0, 1, 0}, + {&__pyx_kp_s_Incompatible_checksums_s_vs_0x3a, __pyx_k_Incompatible_checksums_s_vs_0x3a, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x3a), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0x4e, __pyx_k_Incompatible_checksums_s_vs_0x4e, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x4e), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xaa, __pyx_k_Incompatible_checksums_s_vs_0xaa, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xaa), 0, 0, 1, 0}, {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_k_Incompatible_checksums_s_vs_0xb5, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb5), 0, 0, 1, 0}, @@ -21751,26 +25791,37 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, + {&__pyx_n_s_action, __pyx_k_action, sizeof(__pyx_k_action), 0, 0, 1, 1}, {&__pyx_n_s_actions, __pyx_k_actions, sizeof(__pyx_k_actions), 0, 0, 1, 1}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_n_s_appendleft, __pyx_k_appendleft, sizeof(__pyx_k_appendleft), 0, 0, 1, 1}, {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, {&__pyx_n_s_calls, __pyx_k_calls, sizeof(__pyx_k_calls), 0, 0, 1, 1}, {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1}, + {&__pyx_n_s_cleanup, __pyx_k_cleanup, sizeof(__pyx_k_cleanup), 0, 0, 1, 1}, + {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, + {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1}, {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1}, {&__pyx_n_s_condition, __pyx_k_condition, sizeof(__pyx_k_condition), 0, 0, 1, 1}, {&__pyx_n_s_contains, __pyx_k_contains, sizeof(__pyx_k_contains), 0, 0, 1, 1}, {&__pyx_n_s_contains_2, __pyx_k_contains_2, sizeof(__pyx_k_contains_2), 0, 0, 1, 1}, {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1}, + {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1}, + {&__pyx_n_s_detach, __pyx_k_detach, sizeof(__pyx_k_detach), 0, 0, 1, 1}, {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, {&__pyx_n_s_endswith, __pyx_k_endswith, sizeof(__pyx_k_endswith), 0, 0, 1, 1}, {&__pyx_n_s_endswith_2, __pyx_k_endswith_2, sizeof(__pyx_k_endswith_2), 0, 0, 1, 1}, {&__pyx_n_s_event, __pyx_k_event, sizeof(__pyx_k_event), 0, 0, 1, 1}, {&__pyx_n_s_ew, __pyx_k_ew, sizeof(__pyx_k_ew), 0, 0, 1, 1}, + {&__pyx_n_s_f_back, __pyx_k_f_back, sizeof(__pyx_k_f_back), 0, 0, 1, 1}, {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1}, + {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1}, {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, {&__pyx_n_s_fullsource, __pyx_k_fullsource, sizeof(__pyx_k_fullsource), 0, 0, 1, 1}, {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1}, @@ -21782,6 +25833,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_gte, __pyx_k_gte, sizeof(__pyx_k_gte), 0, 0, 1, 1}, {&__pyx_n_s_gte_2, __pyx_k_gte_2, sizeof(__pyx_k_gte_2), 0, 0, 1, 1}, {&__pyx_n_s_has, __pyx_k_has, sizeof(__pyx_k_has), 0, 0, 1, 1}, + {&__pyx_n_s_hunter, __pyx_k_hunter, sizeof(__pyx_k_hunter), 0, 0, 1, 1}, {&__pyx_n_s_hunter__predicates, __pyx_k_hunter__predicates, sizeof(__pyx_k_hunter__predicates), 0, 0, 1, 1}, {&__pyx_kp_s_hunter__predicates_And_predicat, __pyx_k_hunter__predicates_And_predicat, sizeof(__pyx_k_hunter__predicates_And_predicat), 0, 0, 1, 0}, {&__pyx_kp_s_hunter__predicates_From_conditi, __pyx_k_hunter__predicates_From_conditi, sizeof(__pyx_k_hunter__predicates_From_conditi), 0, 0, 1, 0}, @@ -21789,6 +25841,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_hunter__predicates_Or_predicate, __pyx_k_hunter__predicates_Or_predicate, sizeof(__pyx_k_hunter__predicates_Or_predicate), 0, 0, 1, 0}, {&__pyx_kp_s_hunter__predicates_Query_s, __pyx_k_hunter__predicates_Query_s, sizeof(__pyx_k_hunter__predicates_Query_s), 0, 0, 1, 0}, {&__pyx_kp_s_hunter__predicates_When_conditi, __pyx_k_hunter__predicates_When_conditi, sizeof(__pyx_k_hunter__predicates_When_conditi), 0, 0, 1, 0}, + {&__pyx_kp_s_hunter_predicates_Backlog_condi, __pyx_k_hunter_predicates_Backlog_condi, sizeof(__pyx_k_hunter_predicates_Backlog_condi), 0, 0, 1, 0}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_in, __pyx_k_in, sizeof(__pyx_k_in), 0, 0, 1, 1}, {&__pyx_n_s_in_2, __pyx_k_in_2, sizeof(__pyx_k_in_2), 0, 0, 1, 1}, @@ -21806,7 +25859,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_lte, __pyx_k_lte, sizeof(__pyx_k_lte), 0, 0, 1, 1}, {&__pyx_n_s_lte_2, __pyx_k_lte_2, sizeof(__pyx_k_lte_2), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_make_fake_event, __pyx_k_make_fake_event, sizeof(__pyx_k_make_fake_event), 0, 0, 1, 1}, {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, + {&__pyx_n_s_maxlen, __pyx_k_maxlen, sizeof(__pyx_k_maxlen), 0, 0, 1, 1}, + {&__pyx_n_s_merge, __pyx_k_merge, sizeof(__pyx_k_merge), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, @@ -21818,6 +25874,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1}, {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_And, __pyx_k_pyx_unpickle_And, sizeof(__pyx_k_pyx_unpickle_And), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_unpickle_Backlog, __pyx_k_pyx_unpickle_Backlog, sizeof(__pyx_k_pyx_unpickle_Backlog), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_From, __pyx_k_pyx_unpickle_From, sizeof(__pyx_k_pyx_unpickle_From), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Not, __pyx_k_pyx_unpickle_Not, sizeof(__pyx_k_pyx_unpickle_Not), 0, 0, 1, 1}, {&__pyx_n_s_pyx_unpickle_Or, __pyx_k_pyx_unpickle_Or, sizeof(__pyx_k_pyx_unpickle_Or), 0, 0, 1, 1}, @@ -21844,28 +25901,35 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_rx, __pyx_k_rx, sizeof(__pyx_k_rx), 0, 0, 1, 1}, {&__pyx_kp_s_s_s_r, __pyx_k_s_s_r, sizeof(__pyx_k_s_s_r), 0, 0, 1, 0}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, + {&__pyx_n_s_set_frame, __pyx_k_set_frame, sizeof(__pyx_k_set_frame), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, + {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_n_s_stack, __pyx_k_stack, sizeof(__pyx_k_stack), 0, 0, 1, 1}, {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, {&__pyx_n_s_startswith_2, __pyx_k_startswith_2, sizeof(__pyx_k_startswith_2), 0, 0, 1, 1}, {&__pyx_n_s_stdlib, __pyx_k_stdlib, sizeof(__pyx_k_stdlib), 0, 0, 1, 1}, {&__pyx_n_s_str___locals_genexpr, __pyx_k_str___locals_genexpr, sizeof(__pyx_k_str___locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_str___locals_genexpr_locals_ge, __pyx_k_str___locals_genexpr_locals_ge, sizeof(__pyx_k_str___locals_genexpr_locals_ge), 0, 0, 1, 1}, {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0}, + {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, {&__pyx_n_s_sw, __pyx_k_sw, sizeof(__pyx_k_sw), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_threadid, __pyx_k_threadid, sizeof(__pyx_k_threadid), 0, 0, 1, 1}, + {&__pyx_n_s_threading_support, __pyx_k_threading_support, sizeof(__pyx_k_threading_support), 0, 0, 1, 1}, {&__pyx_n_s_threadname, __pyx_k_threadname, sizeof(__pyx_k_threadname), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, + {&__pyx_n_s_try_repr, __pyx_k_try_repr, sizeof(__pyx_k_try_repr), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, + {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1}, {&__pyx_n_s_watermark, __pyx_k_watermark, sizeof(__pyx_k_watermark), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 83, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 94, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -21875,79 +25939,83 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "hunter/_predicates.pyx":270 + /* "hunter/_predicates.pyx":273 * def __init__(self, condition, *actions): * if not actions: * raise TypeError('Must give at least one action.') # <<<<<<<<<<<<<< * self.condition = condition * self.actions = tuple( */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Must_give_at_least_one_action); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Must_give_at_least_one_action); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "hunter/_predicates.pyx":18 + /* "hunter/_predicates.pyx":21 * * __all__ = ( * 'And', # <<<<<<<<<<<<<< * 'From', * 'Not', */ - __pyx_tuple__12 = PyTuple_Pack(6, __pyx_n_s_And, __pyx_n_s_From, __pyx_n_s_Not, __pyx_n_s_Or, __pyx_n_s_Query, __pyx_n_s_When); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_tuple__13 = PyTuple_Pack(6, __pyx_n_s_And, __pyx_n_s_From, __pyx_n_s_Not, __pyx_n_s_Or, __pyx_n_s_Query, __pyx_n_s_When); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); - /* "hunter/_predicates.pyx":27 + /* "hunter/_predicates.pyx":30 * * cdef tuple ALLOWED_KEYS = ( * 'function', 'code', 'frame', 'module', 'lineno', 'globals', 'stdlib', 'arg', 'locals', 'kind', 'filename', 'source', # <<<<<<<<<<<<<< * 'fullsource', 'threadname', 'threadid', 'depth', 'calls', * ) */ - __pyx_tuple__13 = PyTuple_Pack(17, __pyx_n_s_function, __pyx_n_s_code, __pyx_n_s_frame, __pyx_n_s_module, __pyx_n_s_lineno, __pyx_n_s_globals, __pyx_n_s_stdlib, __pyx_n_s_arg, __pyx_n_s_locals, __pyx_n_s_kind, __pyx_n_s_filename, __pyx_n_s_source, __pyx_n_s_fullsource, __pyx_n_s_threadname, __pyx_n_s_threadid, __pyx_n_s_depth, __pyx_n_s_calls); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 27, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__13); - __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_tuple__14 = PyTuple_Pack(17, __pyx_n_s_function, __pyx_n_s_code, __pyx_n_s_frame, __pyx_n_s_module, __pyx_n_s_lineno, __pyx_n_s_globals, __pyx_n_s_stdlib, __pyx_n_s_arg, __pyx_n_s_locals, __pyx_n_s_kind, __pyx_n_s_filename, __pyx_n_s_source, __pyx_n_s_fullsource, __pyx_n_s_threadname, __pyx_n_s_threadid, __pyx_n_s_depth, __pyx_n_s_calls); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 30, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); - /* "hunter/_predicates.pyx":31 + /* "hunter/_predicates.pyx":34 * ) * cdef tuple ALLOWED_OPERATORS = ( * 'startswith', 'endswith', 'in', 'contains', 'regex', # <<<<<<<<<<<<<< * 'sw', 'ew', 'has', 'rx', * 'gt', 'gte', 'lt', 'lte', */ - __pyx_tuple__14 = PyTuple_Pack(13, __pyx_n_s_startswith, __pyx_n_s_endswith, __pyx_n_s_in, __pyx_n_s_contains, __pyx_n_s_regex, __pyx_n_s_sw, __pyx_n_s_ew, __pyx_n_s_has, __pyx_n_s_rx, __pyx_n_s_gt, __pyx_n_s_gte, __pyx_n_s_lt, __pyx_n_s_lte); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 31, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_tuple__15 = PyTuple_Pack(13, __pyx_n_s_startswith, __pyx_n_s_endswith, __pyx_n_s_in, __pyx_n_s_contains, __pyx_n_s_regex, __pyx_n_s_sw, __pyx_n_s_ew, __pyx_n_s_has, __pyx_n_s_rx, __pyx_n_s_gt, __pyx_n_s_gte, __pyx_n_s_lt, __pyx_n_s_lte); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 34, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); /* "(tree fragment)":1 * def __pyx_unpickle_Query(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ - __pyx_tuple__15 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Query, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(2, 1, __pyx_L1_error) __pyx_tuple__16 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_When, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Query, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(2, 1, __pyx_L1_error) __pyx_tuple__17 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_From, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_When, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(2, 1, __pyx_L1_error) __pyx_tuple__18 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_And, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_From, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(2, 1, __pyx_L1_error) __pyx_tuple__19 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Or, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Backlog, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(2, 1, __pyx_L1_error) __pyx_tuple__20 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Not, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_And, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Or, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__22 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); + __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Not, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -21959,11 +26027,15 @@ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_28104183 = PyInt_FromLong(28104183L); if (unlikely(!__pyx_int_28104183)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_61357180 = PyInt_FromLong(61357180L); if (unlikely(!__pyx_int_61357180)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_82616482 = PyInt_FromLong(82616482L); if (unlikely(!__pyx_int_82616482)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_178834394 = PyInt_FromLong(178834394L); if (unlikely(!__pyx_int_178834394)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_190166812 = PyInt_FromLong(190166812L); if (unlikely(!__pyx_int_190166812)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_258412278 = PyInt_FromLong(258412278L); if (unlikely(!__pyx_int_258412278)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -22017,7 +26089,7 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 41, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates_Query.tp_print = 0; #endif @@ -22026,7 +26098,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6hunter_11_predicates_Query, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 38, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_6hunter_11_predicates_Query, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 41, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_6hunter_11_predicates_5Query___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_6hunter_11_predicates_5Query___init__.doc = __pyx_doc_6hunter_11_predicates_5Query___init__; @@ -22034,60 +26106,70 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Query, (PyObject *)&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 38, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 38, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Query, (PyObject *)&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 41, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 41, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_Query = &__pyx_type_6hunter_11_predicates_Query; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 394, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 536, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates_And.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_11_predicates_And.tp_dictoffset && __pyx_type_6hunter_11_predicates_And.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6hunter_11_predicates_And.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_And, (PyObject *)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 394, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 394, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_And, (PyObject *)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 536, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 536, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_And = &__pyx_type_6hunter_11_predicates_And; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 446, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 588, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates_Or.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_11_predicates_Or.tp_dictoffset && __pyx_type_6hunter_11_predicates_Or.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6hunter_11_predicates_Or.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Or, (PyObject *)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 446, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 446, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Or, (PyObject *)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 588, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 588, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_Or = &__pyx_type_6hunter_11_predicates_Or; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 498, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 640, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates_Not.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_11_predicates_Not.tp_dictoffset && __pyx_type_6hunter_11_predicates_Not.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6hunter_11_predicates_Not.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Not, (PyObject *)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 498, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 498, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Not, (PyObject *)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 640, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 640, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_Not = &__pyx_type_6hunter_11_predicates_Not; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates_When) < 0) __PYX_ERR(0, 261, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_When) < 0) __PYX_ERR(0, 264, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates_When.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_11_predicates_When.tp_dictoffset && __pyx_type_6hunter_11_predicates_When.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6hunter_11_predicates_When.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_When, (PyObject *)&__pyx_type_6hunter_11_predicates_When) < 0) __PYX_ERR(0, 261, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_When) < 0) __PYX_ERR(0, 261, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_When, (PyObject *)&__pyx_type_6hunter_11_predicates_When) < 0) __PYX_ERR(0, 264, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_When) < 0) __PYX_ERR(0, 264, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_When = &__pyx_type_6hunter_11_predicates_When; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates_From) < 0) __PYX_ERR(0, 320, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_From) < 0) __PYX_ERR(0, 323, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates_From.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_11_predicates_From.tp_dictoffset && __pyx_type_6hunter_11_predicates_From.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_6hunter_11_predicates_From.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_From, (PyObject *)&__pyx_type_6hunter_11_predicates_From) < 0) __PYX_ERR(0, 320, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_From) < 0) __PYX_ERR(0, 320, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_From, (PyObject *)&__pyx_type_6hunter_11_predicates_From) < 0) __PYX_ERR(0, 323, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_From) < 0) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_From = &__pyx_type_6hunter_11_predicates_From; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct____str__) < 0) __PYX_ERR(0, 137, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Backlog) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_6hunter_11_predicates_Backlog.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_6hunter_11_predicates_Backlog.tp_dictoffset && __pyx_type_6hunter_11_predicates_Backlog.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_6hunter_11_predicates_Backlog.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Backlog, (PyObject *)&__pyx_type_6hunter_11_predicates_Backlog) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Backlog) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_ptype_6hunter_11_predicates_Backlog = &__pyx_type_6hunter_11_predicates_Backlog; + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct____str__) < 0) __PYX_ERR(0, 140, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct____str__.tp_print = 0; #endif @@ -22095,7 +26177,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct____str__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct____str__ = &__pyx_type_6hunter_11_predicates___pyx_scope_struct____str__; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 140, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 143, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_1_genexpr.tp_print = 0; #endif @@ -22103,7 +26185,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_1_genexpr = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_1_genexpr; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 140, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 143, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_2_genexpr.tp_print = 0; #endif @@ -22111,7 +26193,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_2_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_2_genexpr = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_2_genexpr; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_3___repr__) < 0) __PYX_ERR(0, 156, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_3___repr__) < 0) __PYX_ERR(0, 159, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_3___repr__.tp_print = 0; #endif @@ -22119,7 +26201,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_3___repr__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_3___repr__ = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_3___repr__; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 158, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 161, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_4_genexpr.tp_print = 0; #endif @@ -22127,7 +26209,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_4_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_4_genexpr = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_4_genexpr; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_5___init__) < 0) __PYX_ERR(0, 268, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_5___init__) < 0) __PYX_ERR(0, 271, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_5___init__.tp_print = 0; #endif @@ -22135,7 +26217,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_5___init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_5___init__ = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_5___init__; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 273, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 276, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_6_genexpr.tp_print = 0; #endif @@ -22143,7 +26225,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_6_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_6_genexpr = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_6_genexpr; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_7___str__) < 0) __PYX_ERR(0, 276, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_7___str__) < 0) __PYX_ERR(0, 279, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_7___str__.tp_print = 0; #endif @@ -22151,7 +26233,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_7___str__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_7___str__ = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_7___str__; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(0, 279, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(0, 282, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_8_genexpr.tp_print = 0; #endif @@ -22159,7 +26241,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_8_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_8_genexpr = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_8_genexpr; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__) < 0) __PYX_ERR(0, 401, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__) < 0) __PYX_ERR(0, 543, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__.tp_print = 0; #endif @@ -22167,7 +26249,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_9___str__ = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(0, 402, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(0, 544, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr.tp_print = 0; #endif @@ -22175,7 +26257,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_10_genexpr = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__) < 0) __PYX_ERR(0, 596, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__.tp_print = 0; #endif @@ -22183,7 +26265,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_6hunter_11_predicates___pyx_scope_struct_11___str__ = &__pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__; - if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 597, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr.tp_print = 0; #endif @@ -22215,23 +26297,33 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("types"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("types"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_6hunter_7_tracer_CodeType = __Pyx_ImportType(__pyx_t_1, "types", "CodeType", sizeof(PyCodeObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_7_tracer_CodeType) __PYX_ERR(4, 9, __pyx_L1_error) + if (!__pyx_ptype_6hunter_7_tracer_CodeType) __PYX_ERR(6, 9, __pyx_L1_error) __pyx_ptype_6hunter_7_tracer_FrameType = __Pyx_ImportType(__pyx_t_1, "types", "FrameType", sizeof(PyFrameObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_7_tracer_FrameType) __PYX_ERR(4, 13, __pyx_L1_error) - __pyx_t_2 = PyImport_ImportModule("hunter._tracer"); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 28, __pyx_L1_error) + if (!__pyx_ptype_6hunter_7_tracer_FrameType) __PYX_ERR(6, 13, __pyx_L1_error) + __pyx_t_2 = PyImport_ImportModule("hunter._tracer"); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6hunter_7_tracer_Tracer = __Pyx_ImportType(__pyx_t_2, "hunter._tracer", "Tracer", sizeof(struct __pyx_obj_6hunter_7_tracer_Tracer), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_7_tracer_Tracer) __PYX_ERR(4, 28, __pyx_L1_error) + if (!__pyx_ptype_6hunter_7_tracer_Tracer) __PYX_ERR(6, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyImport_ImportModule("hunter._event"); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 11, __pyx_L1_error) + __pyx_t_2 = PyImport_ImportModule("hunter._event"); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_ptype_6hunter_6_event_Event = __Pyx_ImportType(__pyx_t_2, "hunter._event", "Event", sizeof(struct __pyx_obj_6hunter_6_event_Event), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_6hunter_6_event_Event) __PYX_ERR(5, 11, __pyx_L1_error) - __pyx_vtabptr_6hunter_6_event_Event = (struct __pyx_vtabstruct_6hunter_6_event_Event*)__Pyx_GetVtable(__pyx_ptype_6hunter_6_event_Event->tp_dict); if (unlikely(!__pyx_vtabptr_6hunter_6_event_Event)) __PYX_ERR(5, 11, __pyx_L1_error) + if (!__pyx_ptype_6hunter_6_event_Event) __PYX_ERR(7, 11, __pyx_L1_error) + __pyx_vtabptr_6hunter_6_event_Event = (struct __pyx_vtabstruct_6hunter_6_event_Event*)__Pyx_GetVtable(__pyx_ptype_6hunter_6_event_Event->tp_dict); if (unlikely(!__pyx_vtabptr_6hunter_6_event_Event)) __PYX_ERR(7, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -22461,177 +26553,216 @@ if (!__Pyx_RefNanny) { /* "hunter/_predicates.pyx":4 * from __future__ import absolute_import * - * import inspect # <<<<<<<<<<<<<< + * from collections import deque # <<<<<<<<<<<<<< + * import inspect * import re - * from itertools import chain */ __Pyx_TraceLine(4,0,__PYX_ERR(0, 4, __pyx_L1_error)) - __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_deque); + __Pyx_GIVEREF(__pyx_n_s_deque); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_deque); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_deque, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "hunter/_predicates.pyx":5 * + * from collections import deque + * import inspect # <<<<<<<<<<<<<< + * import re + * from itertools import chain + */ + __Pyx_TraceLine(5,0,__PYX_ERR(0, 5, __pyx_L1_error)) + __pyx_t_2 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "hunter/_predicates.pyx":6 + * from collections import deque * import inspect * import re # <<<<<<<<<<<<<< * from itertools import chain * */ - __Pyx_TraceLine(5,0,__PYX_ERR(0, 5, __pyx_L1_error)) - __pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_TraceLine(6,0,__PYX_ERR(0, 6, __pyx_L1_error)) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":6 + /* "hunter/_predicates.pyx":7 * import inspect * import re * from itertools import chain # <<<<<<<<<<<<<< * * cimport cython */ - __Pyx_TraceLine(6,0,__PYX_ERR(0, 6, __pyx_L1_error)) - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __Pyx_TraceLine(7,0,__PYX_ERR(0, 7, __pyx_L1_error)) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_chain); __Pyx_GIVEREF(__pyx_n_s_chain); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chain); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_chain); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_chain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":15 + /* "hunter/_predicates.pyx":18 * from ._event cimport Event * - * from .actions import Action # <<<<<<<<<<<<<< + * from .actions import Action, ColorStreamAction # <<<<<<<<<<<<<< * * __all__ = ( */ - __Pyx_TraceLine(15,0,__PYX_ERR(0, 15, __pyx_L1_error)) - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error)) + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Action); __Pyx_GIVEREF(__pyx_n_s_Action); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Action); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_actions, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Action); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error) + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Action); + __Pyx_INCREF(__pyx_n_s_ColorStreamAction); + __Pyx_GIVEREF(__pyx_n_s_ColorStreamAction); + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_ColorStreamAction); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_actions, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Action, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Action); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Action, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ColorStreamAction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ColorStreamAction, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":18 + /* "hunter/_predicates.pyx":21 * * __all__ = ( * 'And', # <<<<<<<<<<<<<< * 'From', * 'Not', */ - __Pyx_TraceLine(18,0,__PYX_ERR(0, 18, __pyx_L1_error)) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__12) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_TraceLine(21,0,__PYX_ERR(0, 21, __pyx_L1_error)) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__13) < 0) __PYX_ERR(0, 20, __pyx_L1_error) - /* "hunter/_predicates.pyx":27 + /* "hunter/_predicates.pyx":30 * * cdef tuple ALLOWED_KEYS = ( * 'function', 'code', 'frame', 'module', 'lineno', 'globals', 'stdlib', 'arg', 'locals', 'kind', 'filename', 'source', # <<<<<<<<<<<<<< * 'fullsource', 'threadname', 'threadid', 'depth', 'calls', * ) */ - __Pyx_TraceLine(27,0,__PYX_ERR(0, 27, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__13); + __Pyx_TraceLine(30,0,__PYX_ERR(0, 30, __pyx_L1_error)) + __Pyx_INCREF(__pyx_tuple__14); __Pyx_XGOTREF(__pyx_v_6hunter_11_predicates_ALLOWED_KEYS); - __Pyx_DECREF_SET(__pyx_v_6hunter_11_predicates_ALLOWED_KEYS, __pyx_tuple__13); - __Pyx_GIVEREF(__pyx_tuple__13); + __Pyx_DECREF_SET(__pyx_v_6hunter_11_predicates_ALLOWED_KEYS, __pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); - /* "hunter/_predicates.pyx":31 + /* "hunter/_predicates.pyx":34 * ) * cdef tuple ALLOWED_OPERATORS = ( * 'startswith', 'endswith', 'in', 'contains', 'regex', # <<<<<<<<<<<<<< * 'sw', 'ew', 'has', 'rx', * 'gt', 'gte', 'lt', 'lte', */ - __Pyx_TraceLine(31,0,__PYX_ERR(0, 31, __pyx_L1_error)) - __Pyx_INCREF(__pyx_tuple__14); + __Pyx_TraceLine(34,0,__PYX_ERR(0, 34, __pyx_L1_error)) + __Pyx_INCREF(__pyx_tuple__15); __Pyx_XGOTREF(__pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS); - __Pyx_DECREF_SET(__pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS, __pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); + __Pyx_DECREF_SET(__pyx_v_6hunter_11_predicates_ALLOWED_OPERATORS, __pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); - /* "hunter/_predicates.pyx":215 + /* "hunter/_predicates.pyx":218 * return Not(self) * * cdef fast_Query_call(Query self, Event event): # <<<<<<<<<<<<<< * for key, value in self.query_eq: * evalue = event[key] */ - __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error)) + __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) - /* "hunter/_predicates.pyx":307 + /* "hunter/_predicates.pyx":310 * return Not(self) * * cdef inline fast_When_call(When self, Event event): # <<<<<<<<<<<<<< * cdef object result * */ - __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __pyx_L1_error)) + __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) - /* "hunter/_predicates.pyx":364 + /* "hunter/_predicates.pyx":367 * return Not(self) * * cdef inline fast_From_call(From self, Event event): # <<<<<<<<<<<<<< * cdef object result * cdef int delta_depth */ - __Pyx_TraceLine(364,0,__PYX_ERR(0, 364, __pyx_L1_error)) + __Pyx_TraceLine(367,0,__PYX_ERR(0, 367, __pyx_L1_error)) - /* "hunter/_predicates.pyx":437 + /* "hunter/_predicates.pyx":464 + * ) + * + * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< + * cdef object result + * cdef Event first_event + */ + __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error)) + + + /* "hunter/_predicates.pyx":579 * return Not(self) * * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: * if not fast_call(predicate, event): */ - __Pyx_TraceLine(437,0,__PYX_ERR(0, 437, __pyx_L1_error)) + __Pyx_TraceLine(579,0,__PYX_ERR(0, 579, __pyx_L1_error)) - /* "hunter/_predicates.pyx":490 + /* "hunter/_predicates.pyx":632 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: * if fast_call(predicate, event): */ - __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __pyx_L1_error)) + __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error)) - /* "hunter/_predicates.pyx":538 + /* "hunter/_predicates.pyx":680 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< * return not fast_call(self.predicate, event) * */ - __Pyx_TraceLine(538,0,__PYX_ERR(0, 538, __pyx_L1_error)) + __Pyx_TraceLine(680,0,__PYX_ERR(0, 680, __pyx_L1_error)) - /* "hunter/_predicates.pyx":542 + /* "hunter/_predicates.pyx":684 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< * if type(callable) is Query: * return fast_Query_call( callable, event) */ - __Pyx_TraceLine(542,0,__PYX_ERR(0, 542, __pyx_L1_error)) + __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __pyx_L1_error)) /* "(tree fragment)":1 @@ -22640,10 +26771,10 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_result */ __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_1__pyx_unpickle_Query, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Query, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_1__pyx_unpickle_Query, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Query, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Query__set_state( __pyx_result, __pyx_state) @@ -22661,10 +26792,10 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_result */ __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_3__pyx_unpickle_When, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_When, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_3__pyx_unpickle_When, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_When, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":11 * __pyx_unpickle_When__set_state( __pyx_result, __pyx_state) @@ -22682,10 +26813,10 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_result */ __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_5__pyx_unpickle_From, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_From, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_5__pyx_unpickle_From, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_From, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":11 * __pyx_unpickle_From__set_state( __pyx_result, __pyx_state) @@ -22697,16 +26828,37 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) + /* "(tree fragment)":1 + * def __pyx_unpickle_Backlog(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * cdef object __pyx_PickleError + * cdef object __pyx_result + */ + __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_7__pyx_unpickle_Backlog, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Backlog, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "(tree fragment)":11 + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * return __pyx_result + * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result._filter = __pyx_state[0]; __pyx_result.action = __pyx_state[1]; __pyx_result.condition = __pyx_state[2]; __pyx_result.queue = __pyx_state[3]; __pyx_result.size = __pyx_state[4]; __pyx_result.stack = __pyx_state[5]; __pyx_result.strip = __pyx_state[6]; __pyx_result.vars = __pyx_state[7] + * if len(__pyx_state) > 8 and hasattr(__pyx_result, '__dict__'): + */ + __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) + + /* "(tree fragment)":1 * def __pyx_unpickle_And(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_7__pyx_unpickle_And, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_And, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_9__pyx_unpickle_And, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_And, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":11 * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) @@ -22724,10 +26876,10 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_result */ __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_9__pyx_unpickle_Or, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Or, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_11__pyx_unpickle_Or, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Or, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) @@ -22745,10 +26897,10 @@ if (!__Pyx_RefNanny) { * cdef object __pyx_result */ __Pyx_TraceLine(1,0,__PYX_ERR(2, 1, __pyx_L1_error)) - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_11__pyx_unpickle_Not, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Not, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_13__pyx_unpickle_Not, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Not, __pyx_t_2) < 0) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":11 * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) @@ -22766,10 +26918,10 @@ if (!__Pyx_RefNanny) { * */ __Pyx_TraceLine(1,0,__PYX_ERR(0, 1, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_TraceReturn(Py_None, 0); /*--- Wrapped vars code ---*/ @@ -24386,6 +28538,19 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { } #endif +/* ExtTypeTest */ +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; @@ -24465,6 +28630,37 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { return value; } +/* PyObjectCallMethod1 */ +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + 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); +} + +/* 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_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + /* HasAttr */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; @@ -25644,24 +29840,6 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, } #endif -/* PyObjectCallMethod1 */ -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { - PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); - Py_DECREF(method); - return result; -} -static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { - 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); -} - /* CoroutineBase */ #include #include diff --git a/src/hunter/_predicates.pxd b/src/hunter/_predicates.pxd index 8fefd42..518dc9d 100644 --- a/src/hunter/_predicates.pxd +++ b/src/hunter/_predicates.pxd @@ -57,7 +57,8 @@ cdef class Backlog: bool vars bool strip object action - object filter + object _filter + object queue cdef fast_And_call(And self, Event event) cdef fast_From_call(From self, Event event) diff --git a/src/hunter/_predicates.pyx b/src/hunter/_predicates.pyx index 6aff0c5..ebe6b40 100644 --- a/src/hunter/_predicates.pyx +++ b/src/hunter/_predicates.pyx @@ -10,6 +10,8 @@ cimport cython from cpython.object cimport PyObject_RichCompare from cpython.object cimport Py_EQ from cpython.object cimport Py_NE +from cpython cimport bool +from ._tracer cimport * from ._event cimport Event @@ -462,13 +464,15 @@ cdef class Backlog(object): cdef inline fast_Backlog_call(Backlog self, Event event): cdef object result cdef Event first_event - cdef basestring first_is_call + cdef bool first_is_call cdef int first_depth cdef int backlog_call_depth cdef int missing_depth cdef int depth_delta - cdef object stack_events # ?? + cdef object stack_events cdef object detached_event + cdef FrameType frame + cdef FrameType first_frame result = fast_call(self.condition, event) if result: @@ -489,6 +493,7 @@ cdef inline fast_Backlog_call(Backlog self, Event event): stack_events = deque() depth_delta = 0 + frame = first_frame while first_frame and depth_delta < missing_depth: stack_event = Event( frame=frame, kind='call', arg=None, @@ -497,9 +502,7 @@ cdef inline fast_Backlog_call(Backlog self, Event event): ) if not self.vars: # noinspection PyPropertyAccess - stack_event.locals = {} - stack_event.globals = {} - stack_event.detached = True + stack_event.make_fake_event() stack_events.appendleft(stack_event) depth_delta += 1 @@ -523,7 +526,7 @@ cdef inline fast_Backlog_call(Backlog self, Event event): self.queue.clear() if self._filter is None or self._filter(event): detached_event = event.detach(self.action.try_repr if self.vars else None) - detached_event.frame = event.frame + detached_event.set_frame(event.frame) self.queue.append(detached_event) return result diff --git a/src/hunter/_tracer.c b/src/hunter/_tracer.c index 0d346b0..1198c93 100644 --- a/src/hunter/_tracer.c +++ b/src/hunter/_tracer.c @@ -824,6 +824,7 @@ struct __pyx_obj_6hunter_11_predicates_Or; struct __pyx_obj_6hunter_11_predicates_Not; struct __pyx_obj_6hunter_11_predicates_When; struct __pyx_obj_6hunter_11_predicates_From; +struct __pyx_obj_6hunter_11_predicates_Backlog; struct __pyx_obj_6hunter_7_tracer_Tracer; /* "_event.pxd":11 @@ -952,6 +953,26 @@ struct __pyx_obj_6hunter_11_predicates_From { }; +/* "_predicates.pxd":52 + * + * @cython.final + * cdef class Backlog: # <<<<<<<<<<<<<< + * cdef: + * object condition + */ +struct __pyx_obj_6hunter_11_predicates_Backlog { + PyObject_HEAD + PyObject *condition; + int size; + int stack; + PyBoolObject *vars; + PyBoolObject *strip; + PyObject *action; + PyObject *_filter; + PyObject *queue; +}; + + /* "hunter/_tracer.pxd":28 * * @cython.final @@ -1709,6 +1730,7 @@ static PyTypeObject *__pyx_ptype_6hunter_11_predicates_Or = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates_Not = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates_When = 0; static PyTypeObject *__pyx_ptype_6hunter_11_predicates_From = 0; +static PyTypeObject *__pyx_ptype_6hunter_11_predicates_Backlog = 0; static PyObject *(*__pyx_f_6hunter_11_predicates_fast_call)(PyObject *, struct __pyx_obj_6hunter_6_event_Event *); /*proto*/ /* Module declarations from 'hunter._tracer' */ @@ -4584,6 +4606,8 @@ static int __Pyx_modinit_type_import_code(void) { if (!__pyx_ptype_6hunter_11_predicates_When) __PYX_ERR(7, 37, __pyx_L1_error) __pyx_ptype_6hunter_11_predicates_From = __Pyx_ImportType(__pyx_t_1, "hunter._predicates", "From", sizeof(struct __pyx_obj_6hunter_11_predicates_From), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_6hunter_11_predicates_From) __PYX_ERR(7, 43, __pyx_L1_error) + __pyx_ptype_6hunter_11_predicates_Backlog = __Pyx_ImportType(__pyx_t_1, "hunter._predicates", "Backlog", sizeof(struct __pyx_obj_6hunter_11_predicates_Backlog), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_6hunter_11_predicates_Backlog) __PYX_ERR(7, 52, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; diff --git a/tests/test_tracer.py b/tests/test_tracer.py index b5d76f1..e583aeb 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -1425,7 +1425,7 @@ def test_stack_printer_2(LineMatcher): @pytest.mark.parametrize('vars', [True, False], ids="vars={}".format) @pytest.mark.parametrize('filter', [None, ~Q(function='six')], ids="filter={}".format) @pytest.mark.parametrize('condition', [{'fullsource_has': 'return i'}, {'function': 'five'}], ids=urlencode) -def test_backlog(LineMatcher, size, stack, vars, condition, filter): +def test_backlog_specific(LineMatcher, size, stack, vars, condition, filter): buff = StringIO() from sample7args import one with trace( @@ -1438,6 +1438,7 @@ def test_backlog(LineMatcher, size, stack, vars, condition, filter): output = buff.getvalue() # print(re.sub(r'([\[\]])', r'[\1]', output)) lm = LineMatcher(output.splitlines()) + import pdb;pdb.set_trace() lm.fnmatch_lines([ "depth=0 calls=*sample7args.py:* call => one(a=*, b=*, c=*) [[]backlog[]]", "depth=1 calls=*sample7args.py:* call => two(a=*, b=*, c=*) [[]backlog[]]",